Scripting tools to interact with Thea 2 The Shattering files in order to translate them easily.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
LecygneNoir 8756b6f14e Add files for v666 thanks to Shiro vor 4 Wochen
Database Add source files for v622 vor 7 Monaten
Modules Add source files for v622 vor 7 Monaten
Translation/fr Add files for v666 thanks to Shiro vor 4 Wochen
compatibility-tools Patch convert_to_memoq to support untranslated segments and add VillageEncounter and mChapter1 vor 1 Jahr
.gitignore Add modid to gitignore to avoid publish steam secrets vor 1 Jahr
LICENSE Initial commit vor 1 Jahr
README.md Add fr translation for v622 and update mod accordingly vor 7 Monaten
extract_module.sh Add the possibility to manage empty modules in the event .txt files, fix #10 vor 9 Monaten
rollback_database.sh Add more escaping char in the good order to avoid breaking XML quote for Databases vor 1 Jahr
rollback_module.sh Add the possibility to manage empty modules in the event .txt files, fix #10 vor 9 Monaten

README.md

thea2Shattering_i18n_tools

Scripting tools to interact with Thea 2 The Shattering’s files in order to translate them easily.

Databases

To convert from XML

grep Key Database/game_files/DATABASE_UI_LOCALIZATION.xml | grep -v "UI_EMPTY" | grep -v '<!--<Entry' | awk -F'"' '{print "#. "$2"\n" "msgid " "\""$4"\"" "\n" "msgstr " "\"\""}' > /tmp/DATABASE_UI_LOCALIZATION.pot.tmp
dos2unix /tmp/DATABASE_UI_LOCALIZATION.pot.tmp
sed -i 's/\\E/\\\\E/' /tmp/DATABASE_UI_LOCALIZATION.pot.tmp
# Insert header
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
msguniq --no-wrap /tmp/DATABASE_UI_LOCALIZATION.pot.tmp > Database/pot/DATABASE_UI_LOCALIZATION.pot

To rollback from po:

./rollback_database.sh Database/game_files/DATABASE_UI_LOCALIZATION.xml Translation/fr/po/Database/DATABASE_UI_LOCALIZATION.po fr
./rollback_database.sh Database/game_files/DATABASE_QUEST_LOCALIZATION.xml Translation/fr/po/Database/DATABASE_QUEST_LOCALIZATION.po fr
./rollback_database.sh Database/game_files/DATABASE_DES_LOCALIZATION.xml Translation/fr/po/Database/DATABASE_DES_LOCALIZATION.po fr

Modules

To convert from txt:

for text in Modules/game_files/*; do ./extract_module.sh "${text}"; done

To convert back from po:

echo "start at $(date)"; time for i in Translation/fr/po/Modules/*; do echo "rollback ${i}..."; time ./rollback_module.sh "${i}" fr; echo "done"; done; echo "end at $(date)";