ramiismail / dopresskit

presskit() - spend time making games, not press.
GNU General Public License v3.0
133 stars 50 forks source link

Translation #29

Open ramiismail opened 9 years ago

ramiismail commented 9 years ago

The static text on presskit() needs to be translatable in some way. This would mean that on a presskit(), if translation files are provided, people can offer their presskit() and content in a different language.

I am not sure how the functionality would be implemented, but my current thought is presskit() scans for language files in a /lang/ folder in root. Files there will be loaded as 'language', and project folders will be scanned for data-[language].xml files to see if language specific content exists. Note that both index.php and sheet.php will need to be affected by the translations.

presskit() will default to English always, and English content is expected from the default data.xml file. Even though I'm passionate about breaking language barriers, the reality is that the majority of gaming press is English. In that regard, presskit() will continue its tradition of nudging users to do things that are good for them.

Changing language would be done with a dropdown presented in the top right of every language page.

Notes

empty-fortress commented 9 years ago

It's been a looooong time since I last used it, but PHP has gettext support: http://php.net/manual/en/ref.gettext.php it does pretty much everything you need, is relatively simple to use (there are plenty of docs online for a bazillion prog languages), and there are plenty of free tools available to edit the strings database file.

I'd volunteer but I'm just swamped with stuff rn; that said, I'll keep an eye on this and see if I can help if you choose to use gettext.

DaanBroekhof commented 9 years ago

Hiya! I've made a little rough first draft for a translation/localization setup in my fork: https://github.com/DaanBroekhof/dopresskit (commit: https://github.com/DaanBroekhof/dopresskit/commit/a80104d3bb4ae07d7c4b20ee4b41ed0ce8feee24) Live demo: http://yarr.me/demo-presskit

Some assumptions / choices for this implementation:

Some rudimentary RTL marking & logic also implemented by wrapping (see 'Projects' in Dutch). Lemme know what you think, willing & able to hack/rewrite it some more. :smile: :hocho:

ramiismail commented 9 years ago

@DaanBroekhof That's almost perfect. I saw some minor errors (not all text seems to be translated, dropdown in the top right would look better), but this seems to be pretty close to what I need. Shall I merge it later or would you like to finish things up first yourself? Can I add you to the credits?

DaanBroekhof commented 9 years ago

@ramiismail Good to hear it is what you seek! I'll give it a good cleanup & doublecheck and will offer you a pull request when I'm done. And credits are nice. :) (uhh don't have a real central URL to offer I guess... twitter I guess? https://twitter.com/McDaan - got a disused tumblr I should update too http://joror.tumblr.com/ - but twitter will suffice)

Some specific features explained:

Things I will add:

Some questions/edge cases/possibilities:

DaanBroekhof commented 9 years ago

The partially translated pages are probably where I was too lazy to edit the data-nl_NL.xml for the testgame, but will double check the things. You can see the 'static' translatables when you pick a language that doesn't exist (http://yarr.me/demo-presskit/?l=moo)

For the language toggling: maybe some nice flags? http://www.famfamfam.com/lab/icons/flags/ are public domain (tho country != language, often)

ramiismail commented 9 years ago

Let's go with a dropbox, that's probably better. Anchors can stay as they are, and the other .php files can stay. _template/index.php does't need translation. Allowing HTML in as little as possible would be nice. No reason to allow it, really.

On Wed, Dec 10, 2014 at 11:07 AM, Daan Broekhof notifications@github.com wrote:

The partially translated pages are probably where I was too lazy to edit the data-nl_NL.xml for the testgame, but will double check the things. You can see the 'static' translatables when you pick a language that doesn't exist (http://yarr.me/demo-presskit/?l=moo)

For the language toggling: maybe some nice flags? http://www.famfamfam.com/lab/icons/flags/ are public domain (tho country != language, often)

— Reply to this email directly or view it on GitHub https://github.com/ramiismail/dopresskit/issues/29#issuecomment-66448702 .

DaanBroekhof commented 9 years ago

In the pull request I used a dropdown, and also translated _template/index.php already, which did contain some incomplete logic/vlambeer references. (prob why it doesn't need translating?) I will remove that that from the pull request. :)

(demo also updated at http://yarr.me/demo-presskit / http://yarr.me/demo-presskit/testgame)

DaanBroekhof commented 9 years ago

There, pullrequest https://github.com/ramiismail/dopresskit/pull/30 is done (fixed some more missing things). Let me know if there are any other things you would like changed/fixed.

DaanBroekhof commented 9 years ago

Note that I did leave the dropdown in the lefthand navigation menu, because I did not find a suitable 'right' page aligned styling to use within uikit - feel free to relocate/restyle.