Chinese translation


#1

Hi,

I have written a Chinese translation for Frogatto. However here are some caveats:

[ul][li]Chinese is my first language, but I moved to the US 10 years ago, so I’m not very good at either language really. There might be errors in the translation, and the language is quite bland. I’m hoping this will be a good start for someone else to refine it though, and once I see it working in game, I can find people to do it.[/li]
[li]It doesn’t work in game yet because there is currently no “font” for Chinese characters. I am trying to write a few scripts to produce this font and other related data, but that’s also not quite working yet. What I have so far is included in the linked zip file.[/li][/ul]

Zip file:
http://www.megaupload.com/?d=UMYXJ3V0
http://www.easy-share.com/1913564902/chinese-translation.zip

It contains:

[ul][li]po/zh_CN.po Chinese translation text[/li]
[li]data/fonts.cfg modified to use Chinese font (currently breaks some text display for all languages)[/li]
[li]images/gui/chinese.png Chinese font[/li][/ul]

[ul][li]Makefile modified to include Chinese po/mo files[/li][/ul]

And the other files are scripts used to generate the font file:

[ul][li]utils/make-chinese a script to generate the character list and font file[/li]
[li]utils/chinese-characters.txt list of Chinese characters used in the translation[/li]
[li]utils/make-font-sheet a script to generate the font file[/li]
[li]utils/non-ascii a script used to generate the character list[/li][/ul]

To try the Chinese translation on Linux, you can compile the game from source, extract files from the zip, and run in the source directory:

make update-mo LANG=zh_CN.UTF-8 ./game

For me the result is that all dialog text is blank when using Chinese. What I’m doing is basically replacing the texture file for the [font]id=“default”, and adding a [chars] section:

[font] id="default" texture=gui/chinese.png [chars] chars=<All the Chinese characters in one line> rect=1,1,17321,21 width=15 [/chars]

17321,21 is the size of gui/chinese.png, and each character is 15 pixels wide, 21 pixels tall. Also, the image has a background color of #6f6d51 and text color of #f5f5f5, which I got by using color-picker on the existing _font.png files.


#2

[ul]Update:

I’ve done some more work on the font texture, and a lot more works now. Here are some screenshots:



There are still some glitches:
[list]
[li]The door labels on starting screen don’t show up.[/li]
[li]There is no outline font yet, and I’m just using the same font everywhere.[/li]
[li]A few characters are shown as two halves of two characters, this is because just one character (full-width question mark) in my Chinese font is not the same width as the rest, and my font texture building script can’t
deal with it yet.[/li]
[li]Some characters look “dirty”[/li]
[li]Some key characters in the configuration don’t get shown[/li]
[li]Sometimes none of the Chinese characters shows up at all, even though I don’t remember changing anything. I’m not sure if I forgot something.[/li]
[/list]

I’ve uploaded what I have to https://github.com/hagabaka/Frogatto, and will update it with new progress until everything is stable enough to be integrated into the main development repository. It should be quite easy to try the Chinese translation for at least Linux users:
[list]
[li]Clone or download from https://github.com/hagabaka/Frogatto[/li]
[li]Compile the game (although if you already have a compiled game executable, copying it to the download directory should work too[/li]
[li]Run “make update-mo”[/li]
[li]Run the game using “LANG=zh_CN.UTF-8 sh -c ‘utils/switch_font.rb; ./game’”[/li]
[li]utils/switch_font adjusts a data file to make the game load the Chinese font texture, and if you want to use one of the other languages again, use utils/switch_font again, with your default LANG setting.[/li][/list][/ul]