Polish translation :)


#1

Hello :slight_smile:
Since I played this game and liked it I wanted to make a translation to my native language. I read some topics about it but still Iā€™m a bit confused how to do it correctly. So can someone please advise me where to start and what to do? Maybe a step by step instructions? I would be really thankful for any help with that :slight_smile: Oh and btw I use Ubuntu Linux if that matters. Thanks again and great job making the game :wink:


#2

Good thing you asked, I shouldā€™ve written this ages agoā€¦

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.

On testing the translation:
We donā€™t have released yet a stable build with translation support, so youā€™ll have to make a build yourself from svn.
http://www.frogatto.com/developer gives you the dependencies you need, and a link to the svn checkout information as well.
Save your translation file as .po in the po/ folder (itā€™s in the top-level folder of the game); being your gettext locale code. Basically, just remove the Frogatto_frogattopot_ part of the filename thatā€™s provided by transifex; in your case, that will be pl.po .
Add your locale code to the line beginning with ā€œLINGUAS=ā€ in the Makefile, then run ā€œmake update-moā€ to compile the translation file for in-game usage.
Then, just run the game! If your system locale is set up correctly, the game messages will be in your language.

One thing you have to account for when translating is that 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.
Thereā€™s a script in the utils folder that may be helpful, as it shows you what messages are over a specific width limit. Run it from frogattoā€™s top-level folder as such:

python utils/text_width_check.py po/<lang>.po Where, again, is the gettext locale code of your language.

Alongside that, some messages also have format strings, like this one:

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.

If thereā€™s troubleā€¦
Post here, or join us on IRC: #frogatto room on the server irc.freenode.net .

What kind of trouble, you ask? Well, whenever you get stuck at any of the steps above, or if thereā€™s missing/odd-looking characters - we use custom bitmap fonts in the game, so having the characters you need is something we have to work on in a case-by-case basis. Though I donā€™t expect that youā€™ll have that specific problem as weā€™ve already provided the special characters from the Polish language - stroked L, kreskas (same angle as acute accents, but I hope that still looks okay), a and e + ogonek, and z+dot.