Update Polish translation
alemart opened this issue · 8 comments
Hi @suve . Did you receive my e-mail? We're releasing a new version of the game in the next few days. How is the translation work going?
@suve Please submit your translation no later than August 30th, so that I can ship it for the players with the new version of the game - to be released this week. Thank you.
I have opened PR #75 to address this.
I looked a bit through the game's menus before submitting and noticed one instance where the font is missing a Polish letter - this being in the main menu. The "exit" text is missing the "Ź" letter.
The most straight-forward solution is to extend the font and add the missing character, but as far as I can see, in-engine, bitmap fonts only support ASCII. I have tried to circumvent this by using one of the non-printable ASCII characters (namely, ESC) but that made the game crash with the following error:
nanoparser error! Lexical error in "languages/polish.lng" on line 133: unknown symbol (27).
If you could give me some tips on how to work around this, it'd be great. Alternatively, if this is too big of an issue to late into the release schedule - you could work around by simply changing the translated text from WYJDŹ
to WYJDZ
(i.e. change the Ź
to your usual latin Z
). It won't be perfect, but people should have no problem understanding it.
Hi @suve,
You can just use a TrueType font instead. We're currently taking this approach for the Russian, Bosnian and Serbian translations. Add the following entry to file fonts/title_screen.fnt
:
font "Title Screen - Menu Item" for "pl_PL"
{
truetype
{
source_file "fonts/Roboto-Black.ttf"
size 12
shadow
antialias
}
}
Let me know if it works for you.
It's too late to change the bitmap fonts or the engine now, but using a TrueType font should work fine.
I await your modifications today. Thank you.
Huh. For some reason, I was fiddling with fonts/boxy_bold.fnt
instead of title_screen.fnt
. I guess because I didn't see a title_screen.png
.
Anyway, after experimenting a bit, it turns out that while some ASCII chars cause the error mentioned above, some don't - e.g. DEL works fine.
So, I can update the PR either way:
- Encode the
Ź
usingDEL
and update the bitmap font. - Use a TrueType font for the Polish title screen text.
I have both patches ready, so just let me know which one you prefer.
Use a TrueType font.
Even though using DEL
would work, this isn't the ideal approach because we also support other languages. Letter "Ź" belongs to unicode block Latin Extended-A, which is (currently) not supported when using bitmap fonts.
I've updated the PR to use a TrueType font. I tried a couple of different weights and sizes to pick one that looked best to me.
Thank you very much.