glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[glob2-devel] Unit settings bug fixed


From: Bradley Arsenault
Subject: [glob2-devel] Unit settings bug fixed
Date: Tue, 27 Mar 2007 20:16:42 -0400

I fixed a bug in the new unit settings code. This is the bug that,
when you entered the settings menu from the game, you would get
blasted with missing translation errors. I also cleaned up allot of
the code related to unit settings. Instead of using static variables
like inn0c, inn0, inn1c, swarm0c, market0c, etc... I replaced it with
a more maintainable and readable array of all the building types,
using IntBuildingType.h

Also, anyone who programs any sort of gui stuff needs to be really
careful with their translation code. The Settings menu would retrieve
"translations" for "Build Swarm 1". This is not a proper translation
key. Translation keys always start with [ and end with ]. They are
preferably lower case and more descriptive. The new keys look like
"[build swarm level 0]" and "[inn level 1]", which are suitable to be
placed in the translation files.

Also, whenever you add a translation key, anywhere inside the game,
you *must* add it to the translation texts as well. Try and fit them
in a good location. I added mine to texts.keys.txt and texts.en.txt.
The check_translations script will tell translators of missing keys in
their translations. If you don't add the keys (and their english
translations) to the translation texts, then the program will spit out
those translation missing errors at you.

--
Really. I'm not lieing. Bradley Arsenault.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]