From 405094c167b573d196faa40a0e13ef2d059333d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 30 May 2016 19:30:39 +0200 Subject: [PATCH] i18n: Enable parsing RTR strings TTR is used in the editor, and RTR is for content that it shared between the editor and games (e.g. in scenes/gui) --- tools/translations/extract.py | 9 +++++++-- tools/translations/fr.po | 20 ++++++++++++++++---- tools/translations/it.po | 20 ++++++++++++++++---- tools/translations/ru.po | 20 ++++++++++++++++---- tools/translations/tools.pot | 20 ++++++++++++++++---- tools/translations/zh_CN.po | 20 ++++++++++++++++---- tools/translations/zh_HK.po | 20 ++++++++++++++++---- 7 files changed, 103 insertions(+), 26 deletions(-) diff --git a/tools/translations/extract.py b/tools/translations/extract.py index 237664ab6a7..b2fa6d8af38 100755 --- a/tools/translations/extract.py +++ b/tools/translations/extract.py @@ -59,11 +59,16 @@ for fname in matches: lc = 1 while (l): + patterns = ['RTR(\"', 'TTR(\"'] + idx = 0 pos = 0 while (pos >= 0): - pos = l.find('TTR(\"', pos) + pos = l.find(patterns[idx], pos) if (pos == -1): - break + if (idx < len(patterns) - 1): + idx += 1 + pos = 0 + continue pos += 5 msg = "" diff --git a/tools/translations/fr.po b/tools/translations/fr.po index ac83dbb1f50..72ec7902f4a 100644 --- a/tools/translations/fr.po +++ b/tools/translations/fr.po @@ -234,6 +234,22 @@ msgstr "" "popup() ou une des fonctions popup*(). Les rendre visibles pour l'édition ne " "pose pas de problème, mais elles seront cachées lors de l'exécution." +#: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp +msgid "Cancel" +msgstr "Annuler" + +#: scene/gui/dialogs.cpp +msgid "OK" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Alert!" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Please Confirm..." +msgstr "" + #: scene/gui/text_edit.cpp scene/gui/line_edit.cpp #: tools/editor/plugins/shader_editor_plugin.cpp #: tools/editor/plugins/script_editor_plugin.cpp @@ -5708,10 +5724,6 @@ msgstr "Les fichiers suivants sont manquants :" msgid "Import Anyway" msgstr "Importer quand même" -#: tools/editor/io_plugins/editor_scene_import_plugin.cpp -msgid "Cancel" -msgstr "Annuler" - #: tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Import & Open" msgstr "Importer et ouvrir" diff --git a/tools/translations/it.po b/tools/translations/it.po index 5b376957541..e4a8940c736 100644 --- a/tools/translations/it.po +++ b/tools/translations/it.po @@ -251,6 +251,22 @@ msgstr "" "popup() o qualsiasi altra funzione popup*(). Renderli visibili per la " "modifica nell'editor è okay, ma verranno nascosti una volta in esecuzione." +#: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp +msgid "Cancel" +msgstr "Cancella" + +#: scene/gui/dialogs.cpp +msgid "OK" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Alert!" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Please Confirm..." +msgstr "" + #: scene/gui/text_edit.cpp scene/gui/line_edit.cpp #: tools/editor/plugins/shader_editor_plugin.cpp #: tools/editor/plugins/script_editor_plugin.cpp @@ -5740,10 +5756,6 @@ msgstr "I File Seguenti sono Mancanti:" msgid "Import Anyway" msgstr "Importa ComunqueImporta Comunque" -#: tools/editor/io_plugins/editor_scene_import_plugin.cpp -msgid "Cancel" -msgstr "Cancella" - #: tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Import & Open" msgstr "Importa e Apri" diff --git a/tools/translations/ru.po b/tools/translations/ru.po index 7a60d2bdfaa..ea9311cb83f 100644 --- a/tools/translations/ru.po +++ b/tools/translations/ru.po @@ -246,6 +246,22 @@ msgstr "" "или любой из popup*(). Делая их доступными для редактирования хорошая мысль, " "хотя они будут прятаться при запуске." +#: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp +msgid "Cancel" +msgstr "Отмена" + +#: scene/gui/dialogs.cpp +msgid "OK" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Alert!" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Please Confirm..." +msgstr "" + #: scene/gui/text_edit.cpp scene/gui/line_edit.cpp #: tools/editor/plugins/shader_editor_plugin.cpp #: tools/editor/plugins/script_editor_plugin.cpp @@ -5711,10 +5727,6 @@ msgstr "Отсутствуют следующие файлы:" msgid "Import Anyway" msgstr "Импорт в любом случае" -#: tools/editor/io_plugins/editor_scene_import_plugin.cpp -msgid "Cancel" -msgstr "Отмена" - #: tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Import & Open" msgstr "Импортировать & Открыть" diff --git a/tools/translations/tools.pot b/tools/translations/tools.pot index 52ec6b5791d..70e0255aabe 100644 --- a/tools/translations/tools.pot +++ b/tools/translations/tools.pot @@ -186,6 +186,22 @@ msgid "" "upon running." msgstr "" +#: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp +msgid "Cancel" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "OK" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Alert!" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Please Confirm..." +msgstr "" + #: scene/gui/text_edit.cpp scene/gui/line_edit.cpp #: tools/editor/plugins/shader_editor_plugin.cpp #: tools/editor/plugins/script_editor_plugin.cpp @@ -5592,10 +5608,6 @@ msgstr "" msgid "Import Anyway" msgstr "" -#: tools/editor/io_plugins/editor_scene_import_plugin.cpp -msgid "Cancel" -msgstr "" - #: tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Import & Open" msgstr "" diff --git a/tools/translations/zh_CN.po b/tools/translations/zh_CN.po index b6724d90215..2c4f62794a8 100644 --- a/tools/translations/zh_CN.po +++ b/tools/translations/zh_CN.po @@ -221,6 +221,22 @@ msgstr "" "Popup对象在你调用popup()方法之前将保持隐藏,这里设置为可见并不代表执行场景时它" "会出现。" +#: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp +msgid "Cancel" +msgstr "取消" + +#: scene/gui/dialogs.cpp +msgid "OK" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Alert!" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Please Confirm..." +msgstr "" + #: scene/gui/text_edit.cpp scene/gui/line_edit.cpp #: tools/editor/plugins/shader_editor_plugin.cpp #: tools/editor/plugins/script_editor_plugin.cpp @@ -5637,10 +5653,6 @@ msgstr "找不到下列文件:" msgid "Import Anyway" msgstr "仍然导入" -#: tools/editor/io_plugins/editor_scene_import_plugin.cpp -msgid "Cancel" -msgstr "取消" - #: tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Import & Open" msgstr "导入|打开" diff --git a/tools/translations/zh_HK.po b/tools/translations/zh_HK.po index 18bba18ee0b..2ff54e70c29 100644 --- a/tools/translations/zh_HK.po +++ b/tools/translations/zh_HK.po @@ -190,6 +190,22 @@ msgid "" "upon running." msgstr "" +#: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp +msgid "Cancel" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "OK" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Alert!" +msgstr "" + +#: scene/gui/dialogs.cpp +msgid "Please Confirm..." +msgstr "" + #: scene/gui/text_edit.cpp scene/gui/line_edit.cpp #: tools/editor/plugins/shader_editor_plugin.cpp #: tools/editor/plugins/script_editor_plugin.cpp @@ -5596,10 +5612,6 @@ msgstr "" msgid "Import Anyway" msgstr "" -#: tools/editor/io_plugins/editor_scene_import_plugin.cpp -msgid "Cancel" -msgstr "" - #: tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Import & Open" msgstr ""