From 3f47819893856702789d51d68a192952adb04639 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 8 Jul 2024 11:57:36 +0200 Subject: [PATCH] Translations: Add an english file for short-term spelling fixes If there is just a spelling error in the source text that can be fixed without changing the text's semantics, we can do that after string freeze without interfering with the work of translators that might already have run lupdate and started translating, by adding an english translation file. This should never be used to fix the meaning of the string in any way, and should be dissolved into the tr() calls (+ fixing source tags in translations) before the next string freeze. Change-Id: If72505b0ca22c35ef41c0cfabed669a800315f20 Reviewed-by: Leena Miettinen Reviewed-by: Christian Stenger Reviewed-by: hjk --- share/qtcreator/translations/CMakeLists.txt | 2 +- share/qtcreator/translations/qtcreator_en.ts | 50 ++++++++++++++++++++ src/app/main.cpp | 12 +++-- 3 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 share/qtcreator/translations/qtcreator_en.ts diff --git a/share/qtcreator/translations/CMakeLists.txt b/share/qtcreator/translations/CMakeLists.txt index f32138e7791..32152d8cdff 100644 --- a/share/qtcreator/translations/CMakeLists.txt +++ b/share/qtcreator/translations/CMakeLists.txt @@ -1,4 +1,4 @@ -set(languages cs da de fr hr ja pl ru sl uk zh_CN zh_TW) +set(languages cs da de en fr hr ja pl ru sl uk zh_CN zh_TW) set(bad_languages hu) # Fix these before including them in languages! find_package(Python3 COMPONENTS Interpreter) diff --git a/share/qtcreator/translations/qtcreator_en.ts b/share/qtcreator/translations/qtcreator_en.ts new file mode 100644 index 00000000000..3524a5f1146 --- /dev/null +++ b/share/qtcreator/translations/qtcreator_en.ts @@ -0,0 +1,50 @@ + + + + + + + + + QtC::Lua + + Allow the extension "%1" to fetch datafrom the following URL: + + + Allow the extension "%1" to fetch data from the following URL: + + + + + + QtC::RemoteLinux + + Enable debugging on remote targes which cannot expose gdbserver ports. +The ssh tunneling is used to map the remote gdbserver port to localhost. +The local and remote ports are determined automatically. + Enable debugging on remote targets which cannot expose gdbserver ports. +The SSH tunneling is used to map the remote gdbserver port to localhost. +The local and remote ports are determined automatically. + + + diff --git a/src/app/main.cpp b/src/app/main.cpp index 43712c6836a..37c6d5220fc 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -752,11 +752,13 @@ int main(int argc, char **argv) break; } Q_UNUSED(translator.load(QString())); // unload() - } else if (locale == QLatin1String("C") /* overrideLanguage == "English" */) { - // use built-in - break; - } else if (locale.startsWith(QLatin1String("en")) /* "English" is built-in */) { - // use built-in + } else if ( + locale == QLatin1String("C") /* overrideLanguage == "English" */ + || locale.startsWith(QLatin1String("en")) /* "English" is built-in */) { + // Load any spelling fixes that might have been done temporarily after string freeze, + // for the rest use the built-in source text + if (translator.load("qtcreator_en", creatorTrPath)) + app.installTranslator(&translator); break; } }