diff options
author | hjk <hjk@qt.io> | 2022-08-22 14:29:12 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-08-22 16:05:33 +0000 |
commit | bc19a26c068de6ac78c8405f622bcc2574f7e4d7 (patch) | |
tree | 5c5b5c6026127c11904725bb7b8e01835e13f2d1 | |
parent | 708df011b436e5000b9a6128d453a06efef95940 (diff) |
ResourceEditor: Convert to using Tr::tr
Change-Id: Ia9a04dc76bf84e9e9078894be3459fe65fcd5fff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
29 files changed, 184 insertions, 317 deletions
diff --git a/share/qtcreator/translations/qtcreator_cs.ts b/share/qtcreator/translations/qtcreator_cs.ts index e40973670a..a08377236c 100644 --- a/share/qtcreator/translations/qtcreator_cs.ts +++ b/share/qtcreator/translations/qtcreator_cs.ts @@ -14154,7 +14154,7 @@ Další podrobnosti hledejte v /etc/sysctl.d/10-ptrace.conf </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Creates a Qt Resource file (.qrc).</source> <translation type="obsolete">Vytvoří zdrojový soubor Qt (.qrc).</translation> @@ -14216,10 +14216,6 @@ Další podrobnosti hledejte v /etc/sysctl.d/10-ptrace.conf <translation>Otevřít v textovém editoru</translation> </message> <message> - <source>Add Prefix</source> - <translation>Přidat předponu</translation> - </message> - <message> <source>Remove Prefix</source> <translation>Odstranit předponu</translation> </message> @@ -14245,7 +14241,7 @@ Další podrobnosti hledejte v /etc/sysctl.d/10-ptrace.conf </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Otevřít soubor</translation> @@ -54428,7 +54424,7 @@ nelze najít v cestě.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>Přidat soubory</translation> @@ -54479,7 +54475,7 @@ nelze najít v cestě.</translation> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Název souboru je prázdný.</translation> @@ -54498,11 +54494,7 @@ nelze najít v cestě.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> - <message> - <source>Open File</source> - <translation>Otevřít soubor</translation> - </message> + <name>ResourceEditor</name> <message> <source>All files (*)</source> <translation>Všechny soubory (*)</translation> @@ -64132,14 +64124,7 @@ Tento průvodce vás provede základními kroky, které jsou nutné pro nasazen </message> </context> <context> - <name>ResourceEditor::ResourceTopLevelNode</name> - <message> - <source>%1 Prefix: %2</source> - <translation>%1 Předpona: %2</translation> - </message> -</context> -<context> - <name>ResourceEditor::Internal::ResourceFolderNode</name> + <name>ResourceEditor</name> <message> <source>%1 Prefix: %2</source> <translation>%1 Předpona: %2</translation> diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts index 4269b6d43b..99bffc2d3b 100644 --- a/share/qtcreator/translations/qtcreator_da.ts +++ b/share/qtcreator/translations/qtcreator_da.ts @@ -35739,7 +35739,7 @@ Derudover testes enhedens forbindelse.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>Præfiks:</translation> @@ -35750,7 +35750,7 @@ Derudover testes enhedens forbindelse.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>Tilføj filer</translation> @@ -35801,7 +35801,7 @@ Derudover testes enhedens forbindelse.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>&Undo</source> <translation>&Fortryd</translation> @@ -35863,10 +35863,6 @@ Derudover testes enhedens forbindelse.</translation> <translation>Kopiér URL'en "%1"</translation> </message> <message> - <source>Add Prefix</source> - <translation>Tilføj præfiks</translation> - </message> - <message> <source>Remove Prefix</source> <translation>Fjern præfiks</translation> </message> @@ -35888,16 +35884,12 @@ Derudover testes enhedens forbindelse.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Åbn fil</translation> </message> <message> - <source>Open With</source> - <translation>Åbn med</translation> - </message> - <message> <source>Rename File...</source> <translation>Omdøb fil...</translation> </message> @@ -35907,18 +35899,14 @@ Derudover testes enhedens forbindelse.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> - <message> - <source>Open File</source> - <translation>Åbn fil</translation> - </message> + <name>ResourceEditor</name> <message> <source>All files (*)</source> <translation>Alle filer (*)</translation> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Filnavnet er tomt.</translation> diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index df4bff08e6..1316129255 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -7503,7 +7503,7 @@ Rename %2 to %3 anyway?</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>&Undo</source> <translation>&Rückgängig</translation> @@ -7590,16 +7590,12 @@ Rename %2 to %3 anyway?</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Datei öffnen</translation> </message> <message> - <source>Open With</source> - <translation>Öffnen mit</translation> - </message> - <message> <source>Rename File...</source> <translation>Datei umbenennen...</translation> </message> @@ -19971,7 +19967,7 @@ gehören nicht zu den verifizierten Remotes in %3. Anderes Verzeichnis angeben?< </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Invalid file location</source> <translation>Ungültiger Pfad</translation> @@ -20014,11 +20010,7 @@ gehören nicht zu den verifizierten Remotes in %3. Anderes Verzeichnis angeben?< </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> - <message> - <source>Open File</source> - <translation>Datei öffnen</translation> - </message> + <name>ResourceEditor</name> <message> <source>All files (*)</source> <translation>Alle Dateien (*)</translation> @@ -20630,7 +20622,7 @@ Sie können hier eine andere Verbindung wählen, beispielsweise eine serielle Ve </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Der Dateiname ist leer.</translation> @@ -31301,7 +31293,7 @@ konnte dem Projekt "%2" nicht hinzugefügt werden.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>Präfix:</translation> diff --git a/share/qtcreator/translations/qtcreator_es.ts b/share/qtcreator/translations/qtcreator_es.ts index b06d6bacb7..05ca6f1083 100644 --- a/share/qtcreator/translations/qtcreator_es.ts +++ b/share/qtcreator/translations/qtcreator_es.ts @@ -9813,7 +9813,7 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Create a Qt Resource file (.qrc).</source> <translation type="obsolete">Crear un archivo de recursos Qt (.qrc).</translation> @@ -9840,7 +9840,7 @@ Para hacerlo, introduzca el atajo y un espacio en el campo Localización, y lueg </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>untitled</source> <translation>sin título</translation> diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts index 756477b217..20d2614271 100644 --- a/share/qtcreator/translations/qtcreator_fr.ts +++ b/share/qtcreator/translations/qtcreator_fr.ts @@ -15496,7 +15496,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Creates a Qt Resource file (.qrc).</source> <translation type="obsolete">Crée une fichier ressource Qt (.qrc).</translation> @@ -15531,11 +15531,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> - <message> - <source>Open File</source> - <translation>Ouvrir le fichier</translation> - </message> + <name>ResourceEditor</name> <message> <source>Open With</source> <translation>Ouvrir avec</translation> @@ -52965,7 +52961,7 @@ n'a pas pu être trouvé dans le dossier.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>Ajouter des fichiers</translation> @@ -53016,7 +53012,7 @@ n'a pas pu être trouvé dans le dossier.</translation> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Le nom de fichier est vide.</translation> @@ -53035,7 +53031,7 @@ n'a pas pu être trouvé dans le dossier.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Ouvrir le fichier</translation> diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts index 259878b040..92ae17534f 100644 --- a/share/qtcreator/translations/qtcreator_hr.ts +++ b/share/qtcreator/translations/qtcreator_hr.ts @@ -37379,16 +37379,12 @@ Saving failed.</source> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation type="unfinished">Dodaj datoteke</translation> </message> <message> - <source>Add Prefix</source> - <translation type="unfinished">Dodaj prefiks</translation> - </message> - <message> <source>Invalid file location</source> <translation type="unfinished"></translation> </message> @@ -37430,7 +37426,7 @@ Saving failed.</source> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation type="unfinished"></translation> @@ -37445,7 +37441,7 @@ Saving failed.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Otvori datoteku</translation> @@ -37456,7 +37452,7 @@ Saving failed.</source> </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>Prefiks:</translation> @@ -37467,7 +37463,7 @@ Saving failed.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>&Undo</source> <translation>&Poništi</translation> @@ -37509,10 +37505,6 @@ Saving failed.</source> <translation type="unfinished"></translation> </message> <message> - <source>Open With</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Copy Path</source> <translation type="unfinished">Kopiraj stazu</translation> </message> @@ -37554,11 +37546,7 @@ Saving failed.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> - <message> - <source>Open File</source> - <translation>Otvori datoteku</translation> - </message> + <name>ResourceEditor</name> <message> <source>Open With</source> <translation type="unfinished"></translation> diff --git a/share/qtcreator/translations/qtcreator_hu.ts b/share/qtcreator/translations/qtcreator_hu.ts index e87af3f821..80173da922 100644 --- a/share/qtcreator/translations/qtcreator_hu.ts +++ b/share/qtcreator/translations/qtcreator_hu.ts @@ -15796,7 +15796,7 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok </message> </context> <context> - <name>ResourceEditor::Internal::0</name> + <name>ResourceEditor</name> <message> <source>Resource file</source> <translation type="obsolete">Forrás fájl</translation> @@ -15831,7 +15831,7 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Creates a Qt Resource file (.qrc).</source> <translation>Egy Qt forrásfájl létrehozása (.qrc).</translation> @@ -15854,7 +15854,7 @@ Hogy ezt megtehesse, gépelje be ezt a gyorsbillentyűt és egy szóközt a Lok </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>untitled</source> <translation>címtelen</translation> diff --git a/share/qtcreator/translations/qtcreator_it.ts b/share/qtcreator/translations/qtcreator_it.ts index 7a65e1d330..ee5f2e0eaf 100644 --- a/share/qtcreator/translations/qtcreator_it.ts +++ b/share/qtcreator/translations/qtcreator_it.ts @@ -9718,7 +9718,7 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Creates a Qt Resource file (.qrc).</source> <translation>Crea un file di Risorse Qt (.qrc).</translation> @@ -9741,7 +9741,7 @@ Per eseguire la ricerca, scrivi questo prefisso, uno spazio e poi il termine da </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>untitled</source> <translation>senza titolo</translation> diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index b34585fa64..a448e0fbe7 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -31946,7 +31946,7 @@ In addition, device connectivity will be tested.</source> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>ファイルを追加</translation> @@ -31997,7 +31997,7 @@ In addition, device connectivity will be tested.</source> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>ファイル名が未入力です。</translation> @@ -32012,18 +32012,14 @@ In addition, device connectivity will be tested.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> - <message> - <source>Open File</source> - <translation>ファイルを開く</translation> - </message> + <name>ResourceEditor</name> <message> <source>All files (*)</source> <translation>すべてのファイル (*)</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>&Undo</source> <translation>元に戻す(&U)</translation> @@ -32065,10 +32061,6 @@ In addition, device connectivity will be tested.</source> <translation>エディタで開く</translation> </message> <message> - <source>Open With</source> - <translation>エディタを指定して開く</translation> - </message> - <message> <source>Copy path "%1"</source> <translation>パス "%1" をコピー</translation> </message> @@ -32077,10 +32069,6 @@ In addition, device connectivity will be tested.</source> <translation>URL "%1" をコピー</translation> </message> <message> - <source>Add Prefix</source> - <translation>プレフィックスの追加</translation> - </message> - <message> <source>Remove Prefix</source> <translation>プレフィックスを削除する</translation> </message> @@ -32102,7 +32090,7 @@ In addition, device connectivity will be tested.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>ファイルを開く</translation> @@ -45229,7 +45217,7 @@ Android パッケージソースディレクトリのファイルはビルドデ </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>プレフィックス:</translation> diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index 99db5c19c6..87c1d6fd9e 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -8922,7 +8922,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>&Undo</source> <translation>&Cofnij</translation> @@ -8964,10 +8964,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos <translation>Otwórz w edytorze</translation> </message> <message> - <source>Open With</source> - <translation>Otwórz przy pomocy</translation> - </message> - <message> <source>Copy Path</source> <translation>Skopiuj ścieżkę</translation> </message> @@ -8984,10 +8980,6 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos <translation>Skopiuj URL "%1"</translation> </message> <message> - <source>Add Prefix</source> - <translation>Dodaj przedrostek</translation> - </message> - <message> <source>Remove Prefix</source> <translation>Usuń przedrostek</translation> </message> @@ -9009,11 +9001,7 @@ Wstępnie wybiera wersję desktopową Qt do budowania aplikacji (jeśli jest dos </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> - <message> - <source>Open File</source> - <translation>Otwórz plik</translation> - </message> + <name>ResourceEditor</name> <message> <source>Open With</source> <translation>Otwórz przy pomocy</translation> @@ -22944,7 +22932,7 @@ poinstruuje Qt Creatora o URI.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>Dodaj pliki</translation> @@ -22995,7 +22983,7 @@ poinstruuje Qt Creatora o URI.</translation> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Otwórz plik</translation> @@ -23700,7 +23688,7 @@ You can choose another communication channel here, such as a serial line or cust </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Nazwa pliku jest pusta.</translation> @@ -33926,7 +33914,7 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>Przedrostek:</translation> diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index 2a15783365..1e18187683 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -45697,7 +45697,7 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>Префикс:</translation> @@ -45708,7 +45708,7 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Invalid file location</source> <translation>Неверное размещение файла</translation> @@ -45751,7 +45751,7 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>&Undo</source> <translation>От&менить</translation> @@ -45838,15 +45838,7 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> - <message> - <source>Open File</source> - <translation>Открыть файл</translation> - </message> - <message> - <source>Open With</source> - <translation>Открыть с помощью</translation> - </message> + <name>ResourceEditor</name> <message> <source>Rename File...</source> <translation>Переименовать файл...</translation> @@ -45861,7 +45853,7 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Открытие файла</translation> @@ -45872,7 +45864,7 @@ If you do not have a private key yet, you can also create one here.</source> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Пустое имя файла.</translation> diff --git a/share/qtcreator/translations/qtcreator_sl.ts b/share/qtcreator/translations/qtcreator_sl.ts index f8e39fac8a..5fc69500f6 100644 --- a/share/qtcreator/translations/qtcreator_sl.ts +++ b/share/qtcreator/translations/qtcreator_sl.ts @@ -9182,7 +9182,7 @@ Preselects a desktop Qt for building the application if available.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Qt Resource file</source> <translation>Datoteka z viri za Qt</translation> @@ -9205,7 +9205,7 @@ Preselects a desktop Qt for building the application if available.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>untitled</source> <translation>neimenovana</translation> diff --git a/share/qtcreator/translations/qtcreator_uk.ts b/share/qtcreator/translations/qtcreator_uk.ts index 9887a6d888..65dcad2035 100644 --- a/share/qtcreator/translations/qtcreator_uk.ts +++ b/share/qtcreator/translations/qtcreator_uk.ts @@ -21457,7 +21457,7 @@ Remote stderr was: '%1'</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Creates a Qt Resource file (.qrc) that you can add to a Qt Widget Project.</source> <translation type="vanished">Створення файлу ресурсів Qt (.qrc), який ви можете додати до проекту Qt Widget.</translation> @@ -21523,10 +21523,6 @@ Remote stderr was: '%1'</source> <translation>Копіювати URL "%1"</translation> </message> <message> - <source>Add Prefix</source> - <translation>Додати префікс</translation> - </message> - <message> <source>Remove Prefix</source> <translation>Видалити префікс</translation> </message> @@ -21552,15 +21548,7 @@ Remote stderr was: '%1'</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> - <message> - <source>Open File</source> - <translation>Відкрити файл</translation> - </message> - <message> - <source>Open With</source> - <translation>Відкрити за допомогою</translation> - </message> + <name>ResourceEditor</name> <message> <source>Rename File...</source> <translation>Перейменувати файл...</translation> @@ -33801,7 +33789,7 @@ cannot be found in the path.</source> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>Додати файли</translation> @@ -33852,7 +33840,7 @@ cannot be found in the path.</source> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>Порожнє ім'я файлу.</translation> @@ -33871,7 +33859,7 @@ cannot be found in the path.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>Відкрити файл</translation> @@ -42929,14 +42917,7 @@ This wizard will guide you through the essential steps to deploy a ready-to-go d </message> </context> <context> - <name>ResourceEditor::ResourceTopLevelNode</name> - <message> - <source>%1 Prefix: %2</source> - <translation type="vanished">%1 Префікс: %2</translation> - </message> -</context> -<context> - <name>ResourceEditor::Internal::ResourceFolderNode</name> + <name>ResourceEditor</name> <message> <source>%1 Prefix: %2</source> <translation type="vanished">%1 Префікс: %2</translation> @@ -48109,7 +48090,7 @@ The files in the Android package source directory are copied to the build direct </message> </context> <context> - <name>ResourceEditor::Internal::PrefixLangDialog</name> + <name>ResourceEditor</name> <message> <source>Prefix:</source> <translation>Префікс:</translation> diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index 7c81cd968a..a19b741b93 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -14336,7 +14336,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Creates a Qt Resource file (.qrc).</source> <translation type="obsolete">创建一个Qt 资源文件(.qrc).</translation> @@ -14371,15 +14371,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> - <message> - <source>Open File</source> - <translation>打开文件</translation> - </message> - <message> - <source>Open With</source> - <translation>用...打开</translation> - </message> + <name>ResourceEditor</name> <message> <source>Rename File...</source> <translation>重命名文件...</translation> @@ -49372,7 +49364,7 @@ cannot be found in the path.</source> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation>添加文件</translation> @@ -49423,7 +49415,7 @@ cannot be found in the path.</source> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation>文件名为空。</translation> @@ -49442,7 +49434,7 @@ cannot be found in the path.</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation>打开文件</translation> diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts index 936cb96392..8884be2f76 100644 --- a/share/qtcreator/translations/qtcreator_zh_TW.ts +++ b/share/qtcreator/translations/qtcreator_zh_TW.ts @@ -8865,7 +8865,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorPlugin</name> + <name>ResourceEditor</name> <message> <source>Qt Resource file</source> <translation>Qt 資源檔</translation> @@ -8888,7 +8888,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t </message> </context> <context> - <name>ResourceEditor::Internal::ResourceEditorW</name> + <name>ResourceEditor</name> <message> <source>Open File</source> <translation type="unfinished">開啟檔案</translation> @@ -33725,7 +33725,7 @@ Do you want to retry?</source> </message> </context> <context> - <name>ResourceEditor::Internal::QrcEditor</name> + <name>ResourceEditor</name> <message> <source>Add Files</source> <translation type="unfinished">新增檔案</translation> @@ -33776,7 +33776,7 @@ Do you want to retry?</source> </message> </context> <context> - <name>ResourceFile</name> + <name>ResourceEditor</name> <message> <source>The file name is empty.</source> <translation type="unfinished">檔名為空。</translation> @@ -33795,11 +33795,7 @@ Do you want to retry?</source> </message> </context> <context> - <name>ResourceEditor::Internal::ResourceView</name> - <message> - <source>Open File</source> - <translation type="unfinished">開啟檔案</translation> - </message> + <name>ResourceEditor</name> <message> <source>All files (*)</source> <translation type="unfinished">所有檔案 (*)</translation> diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp index ba48327955..e0ef376641 100644 --- a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp +++ b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp @@ -24,6 +24,8 @@ ****************************************************************************/ #include "qrceditor.h" + +#include "resourceeditortr.h" #include "undocommands_p.h" #include <aggregation/aggregate.h> @@ -39,8 +41,7 @@ #include <QPushButton> #include <QScopedPointer> -using namespace ResourceEditor; -using namespace ResourceEditor::Internal; +namespace ResourceEditor::Internal { QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent) : Core::MiniSplitter(Qt::Vertical, parent), @@ -52,16 +53,16 @@ QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent) m_treeview->setFrameStyle(QFrame::NoFrame); m_treeview->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); - auto addPrefixButton = new QPushButton(tr("Add Prefix")); - m_addFilesButton = new QPushButton(tr("Add Files")); - m_removeButton = new QPushButton(tr("Remove")); - m_removeNonExistingButton = new QPushButton(tr("Remove Missing Files")); + auto addPrefixButton = new QPushButton(Tr::tr("Add Prefix")); + m_addFilesButton = new QPushButton(Tr::tr("Add Files")); + m_removeButton = new QPushButton(Tr::tr("Remove")); + m_removeNonExistingButton = new QPushButton(Tr::tr("Remove Missing Files")); - m_aliasLabel = new QLabel(tr("Alias:")); + m_aliasLabel = new QLabel(Tr::tr("Alias:")); m_aliasText = new QLineEdit; - m_prefixLabel = new QLabel(tr("Prefix:")); + m_prefixLabel = new QLabel(Tr::tr("Prefix:")); m_prefixText = new QLineEdit; - m_languageLabel = new QLabel(tr("Language:")); + m_languageLabel = new QLabel(Tr::tr("Language:")); m_languageText = new QLineEdit; using namespace Utils::Layouting; @@ -74,7 +75,7 @@ QrcEditor::QrcEditor(RelativeResourceModel *model, QWidget *parent) st, }, Group { - title(tr("Properties")), + title(Tr::tr("Properties")), Form { m_aliasLabel, m_aliasText, br, m_prefixLabel, m_prefixText, br, @@ -206,17 +207,18 @@ QAbstractButton *ResolveLocationContext::execLocationMessageBox(QWidget *parent, { if (messageBox.isNull()) { messageBox.reset(new QMessageBox(QMessageBox::Warning, - QrcEditor::tr("Invalid file location"), + Tr::tr("Invalid file location"), QString(), QMessageBox::NoButton, parent)); - copyButton = messageBox->addButton(QrcEditor::tr("Copy"), QMessageBox::ActionRole); - abortButton = messageBox->addButton(QrcEditor::tr("Abort"), QMessageBox::RejectRole); + copyButton = messageBox->addButton(Tr::tr("Copy"), QMessageBox::ActionRole); + abortButton = messageBox->addButton(Tr::tr("Abort"), QMessageBox::RejectRole); messageBox->setDefaultButton(copyButton); } if (wantSkipButton && !skipButton) { - skipButton = messageBox->addButton(QrcEditor::tr("Skip"), QMessageBox::DestructiveRole); + skipButton = messageBox->addButton(Tr::tr("Skip"), QMessageBox::DestructiveRole); messageBox->setEscapeButton(skipButton); } - messageBox->setText(QrcEditor::tr("The file %1 is not in a subdirectory of the resource file. You now have the option to copy this file to a valid location.") + messageBox->setText(Tr::tr("The file %1 is not in a subdirectory of the resource file. " + "You now have the option to copy this file to a valid location.") .arg(QDir::toNativeSeparators(file))); messageBox->exec(); return messageBox->clickedButton(); @@ -226,7 +228,7 @@ QString ResolveLocationContext::execCopyFileDialog(QWidget *parent, const QDir & { // Delayed creation of file dialog. if (copyFileDialog.isNull()) { - copyFileDialog.reset(new QFileDialog(parent, QrcEditor::tr("Choose Copy Location"))); + copyFileDialog.reset(new QFileDialog(parent, Tr::tr("Choose Copy Location"))); copyFileDialog->setFileMode(QFileDialog::AnyFile); copyFileDialog->setAcceptMode(QFileDialog::AcceptSave); } @@ -251,15 +253,15 @@ static inline bool copyFile(const QString &file, const QString ©Name, QWidge { if (QFile::exists(copyName)) { if (!QFile::remove(copyName)) { - QMessageBox::critical(parent, QrcEditor::tr("Overwriting Failed"), - QrcEditor::tr("Could not overwrite file %1.") + QMessageBox::critical(parent, Tr::tr("Overwriting Failed"), + Tr::tr("Could not overwrite file %1.") .arg(QDir::toNativeSeparators(copyName))); return false; } } if (!QFile::copy(file, copyName)) { - QMessageBox::critical(parent, QrcEditor::tr("Copying Failed"), - QrcEditor::tr("Could not copy the file to %1.") + QMessageBox::critical(parent, Tr::tr("Copying Failed"), + Tr::tr("Could not copy the file to %1.") .arg(QDir::toNativeSeparators(copyName))); return false; } @@ -446,3 +448,5 @@ void QrcEditor::onRedo() updateCurrent(); updateHistoryControls(); } + +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.h b/src/plugins/resourceeditor/qrceditor/qrceditor.h index 86cf114692..249c32caaf 100644 --- a/src/plugins/resourceeditor/qrceditor/qrceditor.h +++ b/src/plugins/resourceeditor/qrceditor/qrceditor.h @@ -36,8 +36,7 @@ class QLineEdit; class QPushButton; QT_END_NAMESPACE -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { class QrcEditor : public Core::MiniSplitter { @@ -99,5 +98,4 @@ private: QLineEdit *m_languageText; }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp index 42071539d4..3076e6746e 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourcefile.cpp @@ -25,9 +25,12 @@ #include "resourcefile_p.h" +#include "../resourceeditortr.h" + #include <coreplugin/fileutils.h> #include <coreplugin/icore.h> #include <coreplugin/vcsmanager.h> + #include <projectexplorer/projectexplorerconstants.h> #include <utils/algorithm.h> @@ -39,21 +42,18 @@ #include <QCoreApplication> #include <QDebug> #include <QDir> +#include <QDomDocument> #include <QFile> +#include <QIcon> +#include <QImageReader> #include <QMimeData> -#include <QtAlgorithms> #include <QTextCodec> #include <QTextStream> - -#include <QIcon> -#include <QImageReader> - -#include <QDomDocument> +#include <QtAlgorithms> using namespace Utils; -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { File::File(Prefix *prefix, const QString &_name, const QString &_alias) : Node(this, prefix) @@ -116,7 +116,7 @@ Core::IDocument::OpenResult ResourceFile::load() m_error_message.clear(); if (m_filePath.isEmpty()) { - m_error_message = tr("The file name is empty."); + m_error_message = Tr::tr("The file name is empty."); return Core::IDocument::OpenResult::ReadError; } @@ -142,7 +142,7 @@ Core::IDocument::OpenResult ResourceFile::load() QString error_msg; int error_line, error_col; if (!doc.setContent(data, &error_msg, &error_line, &error_col)) { - m_error_message = tr("XML error on line %1, col %2: %3") + m_error_message = Tr::tr("XML error on line %1, col %2: %3") .arg(error_line).arg(error_col).arg(error_msg); return Core::IDocument::OpenResult::CannotHandle; } @@ -153,7 +153,7 @@ Core::IDocument::OpenResult ResourceFile::load() QString error_msg; int error_line, error_col; if (!doc.setContent(m_contents, &error_msg, &error_line, &error_col)) { - m_error_message = tr("XML error on line %1, col %2: %3") + m_error_message = Tr::tr("XML error on line %1, col %2: %3") .arg(error_line).arg(error_col).arg(error_msg); return Core::IDocument::OpenResult::CannotHandle; } @@ -162,7 +162,7 @@ Core::IDocument::OpenResult ResourceFile::load() QDomElement root = doc.firstChildElement(QLatin1String("RCC")); if (root.isNull()) { - m_error_message = tr("The <RCC> root element is missing."); + m_error_message = Tr::tr("The <RCC> root element is missing."); return Core::IDocument::OpenResult::CannotHandle; } @@ -241,7 +241,7 @@ bool ResourceFile::save() m_error_message.clear(); if (m_filePath.isEmpty()) { - m_error_message = tr("The file name is empty."); + m_error_message = Tr::tr("The file name is empty."); return false; } @@ -461,7 +461,7 @@ void ResourceFile::orderList() } if (!save()) - m_error_message = tr("Cannot save file."); + m_error_message = Tr::tr("Cannot save file."); } bool ResourceFile::contains(const QString &prefix, const QString &lang, const QString &file) const @@ -1268,5 +1268,4 @@ EntryBackup * RelativeResourceModel::removeEntry(const QModelIndex &index) } } -} // Internal -} // ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h index 7c8f3fcf7e..aa79959148 100644 --- a/src/plugins/resourceeditor/qrceditor/resourcefile_p.h +++ b/src/plugins/resourceeditor/qrceditor/resourcefile_p.h @@ -25,18 +25,18 @@ #pragma once +#include <coreplugin/idocument.h> + +#include <utils/textfileformat.h> + #include <QAbstractItemModel> #include <QCoreApplication> +#include <QIcon> #include <QMap> #include <QString> #include <QStringList> -#include <QIcon> -#include <coreplugin/idocument.h> -#include <utils/textfileformat.h> - -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { class File; struct Prefix; @@ -126,8 +126,6 @@ using PrefixList = QList<Prefix *>; */ class ResourceFile { - Q_DECLARE_TR_FUNCTIONS(ResourceFile) - public: ResourceFile(const Utils::FilePath &filePath = {}, const QString &contents = {}); ~ResourceFile(); @@ -332,5 +330,4 @@ private: bool m_resourceDragEnabled; }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/resourceview.cpp b/src/plugins/resourceeditor/qrceditor/resourceview.cpp index 33fcab1ecb..2f827eb6c9 100644 --- a/src/plugins/resourceeditor/qrceditor/resourceview.cpp +++ b/src/plugins/resourceeditor/qrceditor/resourceview.cpp @@ -25,15 +25,15 @@ #include "resourceview.h" +#include "../resourceeditortr.h" #include "undocommands_p.h" #include <coreplugin/fileutils.h> #include <coreplugin/icore.h> -#include <QDebug> - #include <QAction> #include <QApplication> +#include <QDebug> #include <QFileDialog> #include <QHeaderView> #include <QInputDialog> @@ -41,8 +41,7 @@ #include <QMouseEvent> #include <QUndoStack> -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { ResourceView::ResourceView(RelativeResourceModel *model, QUndoStack *history, QWidget *parent) : Utils::TreeView(parent), @@ -205,9 +204,9 @@ void ResourceView::refresh() QStringList ResourceView::fileNamesToAdd() { - return QFileDialog::getOpenFileNames(this, tr("Open File"), + return QFileDialog::getOpenFileNames(this, Tr::tr("Open File"), m_qrcModel->absolutePath(QString()), - tr("All files (*)")); + Tr::tr("All files (*)")); } QString ResourceView::currentAlias() const @@ -359,5 +358,4 @@ bool ResourceView::resourceDragEnabled() const return m_qrcModel->resourceDragEnabled(); } -} // Internal -} // ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/resourceview.h b/src/plugins/resourceeditor/qrceditor/resourceview.h index a783ec84d8..4a00225624 100644 --- a/src/plugins/resourceeditor/qrceditor/resourceview.h +++ b/src/plugins/resourceeditor/qrceditor/resourceview.h @@ -35,8 +35,7 @@ QT_BEGIN_NAMESPACE class QUndoStack; QT_END_NAMESPACE -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { class RelativeResourceModel; @@ -106,5 +105,4 @@ private: int m_mergeId; }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/undocommands.cpp b/src/plugins/resourceeditor/qrceditor/undocommands.cpp index 247ae51982..0c5ccf6eb0 100644 --- a/src/plugins/resourceeditor/qrceditor/undocommands.cpp +++ b/src/plugins/resourceeditor/qrceditor/undocommands.cpp @@ -27,8 +27,7 @@ #include <QModelIndex> -using namespace ResourceEditor; -using namespace ResourceEditor::Internal; +namespace ResourceEditor::Internal { ViewCommand::ViewCommand(ResourceView *view) : m_view(view) @@ -207,3 +206,5 @@ void AddEmptyPrefixCommand::undo() m_prefixArrayIndex, 0, QModelIndex()); delete m_view->removeEntry(prefixModelIndex); } + +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/qrceditor/undocommands_p.h b/src/plugins/resourceeditor/qrceditor/undocommands_p.h index aa871e32cb..4d0e777e48 100644 --- a/src/plugins/resourceeditor/qrceditor/undocommands_p.h +++ b/src/plugins/resourceeditor/qrceditor/undocommands_p.h @@ -34,8 +34,7 @@ QT_BEGIN_NAMESPACE class QModelIndex; QT_END_NAMESPACE -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { /*! \class ViewCommand @@ -170,5 +169,4 @@ private: void undo() override; }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/resourceeditorfactory.cpp b/src/plugins/resourceeditor/resourceeditorfactory.cpp index 10a6f58271..1116db1445 100644 --- a/src/plugins/resourceeditor/resourceeditorfactory.cpp +++ b/src/plugins/resourceeditor/resourceeditorfactory.cpp @@ -24,21 +24,21 @@ ****************************************************************************/ #include "resourceeditorfactory.h" -#include "resourceeditorw.h" -#include "resourceeditorplugin.h" + #include "resourceeditorconstants.h" +#include "resourceeditorplugin.h" +#include "resourceeditorw.h" #include <coreplugin/editormanager/editormanager.h> #include <projectexplorer/projectexplorerconstants.h> #include <utils/fsengine/fileiconprovider.h> #include <QCoreApplication> -#include <QFileInfo> -#include <qdebug.h> -using namespace ResourceEditor::Internal; using namespace ResourceEditor::Constants; +namespace ResourceEditor::Internal { + ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) { setId(RESOURCEEDITOR_ID); @@ -52,3 +52,5 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) return new ResourceEditorW(Core::Context(C_RESOURCEEDITOR), plugin); }); } + +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/resourceeditorfactory.h b/src/plugins/resourceeditor/resourceeditorfactory.h index 1a54515a47..537595e773 100644 --- a/src/plugins/resourceeditor/resourceeditorfactory.h +++ b/src/plugins/resourceeditor/resourceeditorfactory.h @@ -27,8 +27,7 @@ #include <coreplugin/editormanager/ieditorfactory.h> -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { class ResourceEditorPlugin; @@ -38,5 +37,4 @@ public: explicit ResourceEditorFactory(ResourceEditorPlugin *plugin); }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index 182b11205a..3c1ef9f00c 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -25,9 +25,10 @@ #include "resourceeditorplugin.h" -#include "resourceeditorw.h" #include "resourceeditorconstants.h" #include "resourceeditorfactory.h" +#include "resourceeditortr.h" +#include "resourceeditorw.h" #include "resourcenode.h" #include <coreplugin/icore.h> @@ -63,15 +64,13 @@ using namespace ProjectExplorer; using namespace Utils; -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { -static const char resourcePrefix[] = ":"; -static const char urlPrefix[] = "qrc:"; +const char resourcePrefix[] = ":"; +const char urlPrefix[] = "qrc:"; class PrefixLangDialog : public QDialog { - Q_OBJECT public: PrefixLangDialog(const QString &title, const QString &prefix, const QString &lang, QWidget *parent) : QDialog(parent) @@ -80,11 +79,11 @@ public: auto layout = new QFormLayout(this); m_prefixLineEdit = new QLineEdit(this); m_prefixLineEdit->setText(prefix); - layout->addRow(tr("Prefix:"), m_prefixLineEdit); + layout->addRow(Tr::tr("Prefix:"), m_prefixLineEdit); m_langLineEdit = new QLineEdit(this); m_langLineEdit->setText(lang); - layout->addRow(tr("Language:"), m_langLineEdit); + layout->addRow(Tr::tr("Language:"), m_langLineEdit); QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, @@ -114,8 +113,6 @@ private: class ResourceEditorPluginPrivate : public QObject { - Q_DECLARE_TR_FUNCTIONS(ResourceEditor::Internal::ResourceEditorPlugin) - public: explicit ResourceEditorPluginPrivate(ResourceEditorPlugin *q); @@ -167,9 +164,9 @@ ResourceEditorPluginPrivate::ResourceEditorPluginPrivate(ResourceEditorPlugin *q { // Register undo and redo const Core::Context context(Constants::C_RESOURCEEDITOR); - m_undoAction = new QAction(tr("&Undo"), this); - m_redoAction = new QAction(tr("&Redo"), this); - m_refreshAction = new QAction(tr("Recheck Existence of Referenced Files"), this); + m_undoAction = new QAction(Tr::tr("&Undo"), this); + m_redoAction = new QAction(Tr::tr("&Redo"), this); + m_refreshAction = new QAction(Tr::tr("Recheck Existence of Referenced Files"), this); Core::ActionManager::registerAction(m_undoAction, Core::Constants::UNDO, context); Core::ActionManager::registerAction(m_redoAction, Core::Constants::REDO, context); Core::ActionManager::registerAction(m_refreshAction, Constants::REFRESH, context); @@ -184,53 +181,53 @@ ResourceEditorPluginPrivate::ResourceEditorPluginPrivate(ResourceEditorPlugin *q Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_FILECONTEXT); Core::Command *command = nullptr; - m_addPrefix = new QAction(tr("Add Prefix..."), this); + m_addPrefix = new QAction(Tr::tr("Add Prefix..."), this); command = Core::ActionManager::registerAction(m_addPrefix, Constants::C_ADD_PREFIX, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_addPrefix, &QAction::triggered, this, &ResourceEditorPluginPrivate::addPrefixContextMenu); - m_renamePrefix = new QAction(tr("Change Prefix..."), this); + m_renamePrefix = new QAction(Tr::tr("Change Prefix..."), this); command = Core::ActionManager::registerAction(m_renamePrefix, Constants::C_RENAME_PREFIX, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_renamePrefix, &QAction::triggered, this, &ResourceEditorPluginPrivate::renamePrefixContextMenu); - m_removePrefix = new QAction(tr("Remove Prefix..."), this); + m_removePrefix = new QAction(Tr::tr("Remove Prefix..."), this); command = Core::ActionManager::registerAction(m_removePrefix, Constants::C_REMOVE_PREFIX, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_removePrefix, &QAction::triggered, this, &ResourceEditorPluginPrivate::removePrefixContextMenu); - m_removeNonExisting = new QAction(tr("Remove Missing Files"), this); + m_removeNonExisting = new QAction(Tr::tr("Remove Missing Files"), this); command = Core::ActionManager::registerAction(m_removeNonExisting, Constants::C_REMOVE_NON_EXISTING, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_removeNonExisting, &QAction::triggered, this, &ResourceEditorPluginPrivate::removeNonExisting); - m_renameResourceFile = new QAction(tr("Rename..."), this); + m_renameResourceFile = new QAction(Tr::tr("Rename..."), this); command = Core::ActionManager::registerAction(m_renameResourceFile, Constants::C_RENAME_FILE, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_renameResourceFile, &QAction::triggered, this, &ResourceEditorPluginPrivate::renameFileContextMenu); - m_removeResourceFile = new QAction(tr("Remove File..."), this); + m_removeResourceFile = new QAction(Tr::tr("Remove File..."), this); command = Core::ActionManager::registerAction(m_removeResourceFile, Constants::C_REMOVE_FILE, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_removeResourceFile, &QAction::triggered, this, &ResourceEditorPluginPrivate::removeFileContextMenu); - m_openInEditor = new QAction(tr("Open in Editor"), this); + m_openInEditor = new QAction(Tr::tr("Open in Editor"), this); command = Core::ActionManager::registerAction(m_openInEditor, Constants::C_OPEN_EDITOR, projectTreeContext); folderContextMenu->addAction(command, ProjectExplorer::Constants::G_FOLDER_FILES); connect(m_openInEditor, &QAction::triggered, this, &ResourceEditorPluginPrivate::openEditorContextMenu); - m_openWithMenu = new QMenu(tr("Open With"), folderContextMenu->menu()); + m_openWithMenu = new QMenu(Tr::tr("Open With"), folderContextMenu->menu()); folderContextMenu->menu()->insertMenu( folderContextMenu->insertLocation(ProjectExplorer::Constants::G_FOLDER_FILES), m_openWithMenu); - m_copyPath = new Utils::ParameterAction(tr("Copy Path"), tr("Copy Path \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); + m_copyPath = new Utils::ParameterAction(Tr::tr("Copy Path"), Tr::tr("Copy Path \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); command = Core::ActionManager::registerAction(m_copyPath, Constants::C_COPY_PATH, projectTreeContext); command->setAttribute(Core::Command::CA_UpdateText); fileContextMenu->addAction(command, ProjectExplorer::Constants::G_FILE_OTHER); connect(m_copyPath, &QAction::triggered, this, &ResourceEditorPluginPrivate::copyPathContextMenu); - m_copyUrl = new Utils::ParameterAction(tr("Copy URL"), tr("Copy URL \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); + m_copyUrl = new Utils::ParameterAction(Tr::tr("Copy URL"), Tr::tr("Copy URL \"%1\""), Utils::ParameterAction::AlwaysEnabled, this); command = Core::ActionManager::registerAction(m_copyUrl, Constants::C_COPY_URL, projectTreeContext); command->setAttribute(Core::Command::CA_UpdateText); fileContextMenu->addAction(command, ProjectExplorer::Constants::G_FILE_OTHER); @@ -301,7 +298,7 @@ void ResourceEditorPluginPrivate::addPrefixContextMenu() { auto topLevel = dynamic_cast<ResourceTopLevelNode *>(ProjectTree::currentNode()); QTC_ASSERT(topLevel, return); - PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::dialogParent()); + PrefixLangDialog dialog(Tr::tr("Add Prefix"), QString(), QString(), Core::ICore::dialogParent()); if (dialog.exec() != QDialog::Accepted) return; QString prefix = dialog.prefix(); @@ -315,8 +312,8 @@ void ResourceEditorPluginPrivate::removePrefixContextMenu() auto rfn = dynamic_cast<ResourceFolderNode *>(ProjectTree::currentNode()); QTC_ASSERT(rfn, return); if (QMessageBox::question(Core::ICore::dialogParent(), - tr("Remove Prefix"), - tr("Remove prefix %1 and all its files?").arg(rfn->displayName())) + Tr::tr("Remove Prefix"), + Tr::tr("Remove prefix %1 and all its files?").arg(rfn->displayName())) == QMessageBox::Yes) { ResourceTopLevelNode *rn = rfn->resourceNode(); rn->removePrefix(rfn->prefix(), rfn->lang()); @@ -344,8 +341,8 @@ void ResourceEditorPluginPrivate::removeFileContextMenu() QTC_ASSERT(parent, return); if (parent->removeFiles({path}) != RemovedFilesFromProject::Ok) QMessageBox::warning(Core::ICore::dialogParent(), - tr("File Removal Failed"), - tr("Removing file %1 from the project failed.").arg(path.toUserOutput())); + Tr::tr("File Removal Failed"), + Tr::tr("Removing file %1 from the project failed.").arg(path.toUserOutput())); } void ResourceEditorPluginPrivate::openEditorContextMenu() @@ -372,7 +369,7 @@ void ResourceEditorPluginPrivate::renamePrefixContextMenu() auto node = dynamic_cast<ResourceFolderNode *>(ProjectTree::currentNode()); QTC_ASSERT(node, return); - PrefixLangDialog dialog(tr("Rename Prefix"), + PrefixLangDialog dialog(Tr::tr("Rename Prefix"), node->prefix(), node->lang(), Core::ICore::dialogParent()); @@ -471,7 +468,4 @@ void ResourceEditorPlugin::onUndoStackChanged(ResourceEditorW const *editor, } } -} // namespace Internal -} // namespace ResourceEditor - -#include "resourceeditorplugin.moc" +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/resourceeditorplugin.h b/src/plugins/resourceeditor/resourceeditorplugin.h index d1cdba67c8..ceae1107aa 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.h +++ b/src/plugins/resourceeditor/resourceeditorplugin.h @@ -27,8 +27,7 @@ #include <extensionsystem/iplugin.h> -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { class ResourceEditorW; @@ -49,5 +48,4 @@ private: class ResourceEditorPluginPrivate *d = nullptr; }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index a6a2bedadf..7d24a44b58 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -27,9 +27,9 @@ #include "resourceeditorconstants.h" #include "resourceeditorplugin.h" - -#include <resourceeditor/qrceditor/qrceditor.h> -#include <resourceeditor/qrceditor/resourcefile_p.h> +#include "resourceeditortr.h" +#include "qrceditor/qrceditor.h" +#include "qrceditor/resourcefile_p.h" #include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/commandbutton.h> @@ -46,8 +46,7 @@ using namespace Utils; -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { enum { debugResourceEditorW = 0 }; @@ -85,13 +84,13 @@ ResourceEditorW::ResourceEditorW(const Core::Context &context, m_toolBar->addWidget(refreshButton); m_resourceEditor->setResourceDragEnabled(true); - m_contextMenu->addAction(tr("Open File"), this, &ResourceEditorW::openCurrentFile); - m_openWithMenu = m_contextMenu->addMenu(tr("Open With")); - m_renameAction = m_contextMenu->addAction(tr("Rename File..."), this, + m_contextMenu->addAction(Tr::tr("Open File"), this, &ResourceEditorW::openCurrentFile); + m_openWithMenu = m_contextMenu->addMenu(Tr::tr("Open With")); + m_renameAction = m_contextMenu->addAction(Tr::tr("Rename File..."), this, &ResourceEditorW::renameCurrentFile); - m_copyFileNameAction = m_contextMenu->addAction(tr("Copy Resource Path to Clipboard"), + m_copyFileNameAction = m_contextMenu->addAction(Tr::tr("Copy Resource Path to Clipboard"), this, &ResourceEditorW::copyCurrentResourcePath); - m_orderList = m_contextMenu->addAction(tr("Sort Alphabetically"), this, &ResourceEditorW::orderList); + m_orderList = m_contextMenu->addAction(Tr::tr("Sort Alphabetically"), this, &ResourceEditorW::orderList); connect(m_resourceDocument, &ResourceEditorDocument::loaded, m_resourceEditor, &QrcEditor::loaded); @@ -335,5 +334,4 @@ void ResourceEditorW::onRedo() m_resourceEditor->onRedo(); } -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h index 628c6b138e..17ffd65830 100644 --- a/src/plugins/resourceeditor/resourceeditorw.h +++ b/src/plugins/resourceeditor/resourceeditorw.h @@ -33,8 +33,7 @@ class QMenu; class QToolBar; QT_END_NAMESPACE -namespace ResourceEditor { -namespace Internal { +namespace ResourceEditor::Internal { class RelativeResourceModel; class ResourceEditorPlugin; @@ -125,5 +124,4 @@ public: friend class ResourceEditorDocument; }; -} // namespace Internal -} // namespace ResourceEditor +} // ResourceEditor::Internal |