- Download and install python 2.7 if you don't have one.
- Download script https://raw.githubusercontent.com/Cjkjv ... s/parse.py
- Google how to run python script with arguments on you system (usually you need open console and paste text from script example)
- Create full string file with all tokens present in en.txt (I use ru.txt as example you need to choose your language)
Code: Select all
python parse.py full ru.txt full_ru.txt
- Do all translation staff with full_ru.txt
- Convert it back to small file
Code: Select all
python parse.py small full_ru.txt ru.txt
- Post new file or diff for you file and trunk to forum.
- key: ingame key for object. It is written in capital letters separated with underscore. (ENVIRONMENTAL_PREFERENCES). Values can have references to other value by its key. Keys should never be translated.
- value: text that will be shown in GUI instead of key. (Environmental Preferences:). Value can be single line or multi line. Multi line values should be wrapped to triple single quotes: ('''hello it is wrapped value'''). There is not exact rule about spaces at the end of value, this should be done according to current content.
- reference: will be replaced by text stored by key. Link to missed key it prohibited
Code: Select all
[[AVERAGE_INDUSTRY]]
- links: will be replaces by clickable link to pedia. It is consist of pedia section and title in section see examples:
Code: Select all
[[encyclopedia ORGANIC_SPECIES_TITLE]] [[tech LRN_XENOARCH]] [[buildingtype BLD_CONC_CAMP]] [[special ANCIENT_RUINS_SPECIAL]] [[shippart GT_TROOP_POD]] [[shiphull SH_NANOROBOTIC]] [[predefinedshipdesign SM_KRILL_1]]
- In text file you should have only translated items. Leaving English text in translation is bad. en.txt is changing constantly and values will be desynced. Files already have some desynced values, feel free to remove them.
- If value ends with space wrap it to triple quotes. This will allow to notice it.
- Use reference and links there it is possible. This will reduce amount of text to translate.
- Make translation look uniform in game.
Here is description of possible tags: https://github.com/freeorion/freeorion/ ... ont.h#L108
I check them in message window and in pedia. I don't know does it works in other places.
upd: Here you can find full files https://github.com/Cjkjvfnby/freeorion/ ... ringtables I will update it time to time or by request.