From 6a30c3d8549b2f1fb911ff718e4366a3d47e9701 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Fri, 8 Feb 2019 07:27:30 +0100 Subject: [PATCH] Add quick procedure how to extract DATABASES --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66a051e..03b50c3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,14 @@ 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_UI_LOCALIZATION.xml | awk -F'"' '{print "#. "$2"\n" "msgid " "\""$4"\"" "\n" "msgstr " "\"\""}' > DATABASE_UI_LOCALIZATION.pot.tmp +msguniq --no-wrap DATABASE_UI_LOCALIZATION.pot.tmp > DATABASE_UI_LOCALIZATION.pot +``` + ## Modules @@ -11,6 +19,5 @@ To convert from txt : ``` for text in Modules/game_files/*; do ./extract_module.sh "${text}"; done -for text in Modules/pot/*; do mv "${text}" "${text}.ori"; msguniq --no-wrap "${text}.ori" > "${text}"; rm "${text}.ori"; done ```