Author Topic: Translation Instructions  (Read 5250 times)

marcavis

  • Developer
  • Posts: 186
    • View Profile
Translation Instructions
« on: April 26, 2011, 12:19:58 pm »
So you're planning on translating Frogatto & Friends? Great!
Although complete, Frogatto is still under development, so its textual content will continue to evolve as we release new versions. But that doesn't mean, at all, that your help with translation at any given time will not be appreciated.

These instructions are, with minor changes, the response I gave to pawiecki on this thread:

Create a transifex account if you haven't already, and request for the creation of a translation team for your language.
After the translation team is approved, there are two ways for you to actually start translating:
  a) Install a translation catalog editor like poedit: http://www.poedit.net/ and choose the "Download for translation" option from your language page. When you are done editing, just upload the file from that same page.
  b) You may also work online on transifex itself, with the "Translate Now" option; then it's just a matter of saving your progress there.


While translating, there's some things you have to be aware of:
  1. Make sure we already have the font characters your language needs, and if they're to your liking - since we use a custom bitmap font, we've been drawing the characters and diacritics as we need them, so some may be missing/off for your language. You'll be able to find the fontsheets in the images/gui folder.
  2. Some messages have format strings, like this one:
Code: [Select]
The price is ${final_price} coins. In these cases, leave the content of the curly brackets intact, while positioning it in the way that best fits the grammar of your language.
  3. The Frogatto engine won't automatically break the lines in the messages; you have to do that manually by inputting the newline escape sequence (\n) where appropriate. Not doing this would cause the text to exceed the width of the dialogue box, making parts of it unreadable. As a rule of thumb, the dialogue lines should be about 50 characters wide at most, including spaces; a couple of characters over that may still fit.
There's a script in the utils folder that may be helpful, as it shows you what messages are over a specific width limit. After opening and saving the file in Poedit, which makes the formatting more consistent, run it from frogatto's module folder (frogatto/modules/frogatto) as such:
Code: [Select]
python utils/text_width_check.py po/<lang>.po Where <lang> is the gettext locale code of your language.
(Or you can ask me to run the script for you, no problem)
 
Testing the translation for yourself involves saving the file in the translation catalogs folder (po/<lang>.po) and compiling the catalog by running
Code: [Select]
make update-mo in the top-level folder; you must have gettext utilities installed for that, though, so you can just ask me if you need a file compiled, after you have it uploaded to transifex.
« Last Edit: August 14, 2012, 03:27:03 pm by marcavis »

radifar

  • Member
  • Posts: 1
    • View Profile
Re: Translation Instructions
« Reply #1 on: August 22, 2011, 08:58:13 am »
And since the resource file keep changing, don't forget to watch for it, there's a feature in Transifex that allows you to get notification every time the resource file is changing. Just click the language you're working on then click the "watch it button" at the top-right corner.


When this feature got activated you'll receive an email everytime the resource file is changing.
« Last Edit: August 22, 2011, 08:59:45 am by radifar »

GunChleoc

  • Forum Regular
  • Posts: 64
    • View Profile
    • Fòram na Gàidhlig
Re: Translation Instructions
« Reply #2 on: September 21, 2012, 05:29:10 am »
Here's a tool for offline translation that you can use as an alternative to Poedit. It creates a translation memory as well.

http://translate.sourceforge.net/wiki/virtaal/index

You can also use Virtaal or Poedit to generate the .mo file which you then stick in modules\frogatto\locale\<language ISO-code>\LC_MESSAGES. The full path on Windows is C:\Program Files (x86)\Frogatto\modules\frogatto\locale\<language ISO-code>\LC_MESSAGES
« Last Edit: December 02, 2012, 01:22:01 am by GunChleoc »

 

anything