diff --git a/share/qtcreator/translations/qtcreator_cs.ts b/share/qtcreator/translations/qtcreator_cs.ts index 365cc091d37..09775b2aeb8 100644 --- a/share/qtcreator/translations/qtcreator_cs.ts +++ b/share/qtcreator/translations/qtcreator_cs.ts @@ -49771,19 +49771,7 @@ Určuje chování odsazení se zřetelem k navazujícím řádkům. - Todo::Internal::KeywordDialog - - Keyword - Klíčové slovo - - - Icon - Ikona - - - Color - Barva - + Todo errorLabel errorLabel @@ -49802,7 +49790,7 @@ Určuje chování odsazení se zřetelem k navazujícím řádkům. - Todo::Internal::OptionsDialog + Todo Form Formulář @@ -49831,18 +49819,6 @@ Určuje chování odsazení se zřetelem k navazujícím řádkům. Scanning scope Oblast prohledávání - - Scan in the whole project - Hledat v celém projektu - - - Scan in the current opened file - Hledat v nyní otevřeném souboru - - - Scan the whole active project - Hledat v celém činném projektu - Scan only the currently edited document Hledat pouze v nyní upravovaném dokumentu @@ -53903,7 +53879,7 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a - Todo::Internal::TodoItemsModel + Todo Description Popis @@ -53918,7 +53894,7 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a - Todo::Internal::TodoOutputPane + Todo To-Do Entries Záznamy CO UDĚLAT @@ -53957,7 +53933,7 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a - Todo::Internal::OptionsPage + Todo To-Do CO UDĚLAT @@ -54002,7 +53978,7 @@ Je zapotřebí mít nějakou verzi Qt a sadu nástrojů, aby modely kódu C++ a - Todo::Internal::AddKeywordDialog + Todo Keyword Klíčové slovo diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts index 9b2b34d78c6..d4a96fdf769 100644 --- a/share/qtcreator/translations/qtcreator_da.ts +++ b/share/qtcreator/translations/qtcreator_da.ts @@ -40246,7 +40246,7 @@ Vil blive anvendt på blanktegn i kommentarer og strenge. - Todo::Internal::KeywordDialog + Todo Keyword Nøgleord @@ -40273,23 +40273,15 @@ Vil blive anvendt på blanktegn i kommentarer og strenge. - Todo::Internal::OptionsDialog + Todo Keywords Nøgleord - - Add - Tilføj - Edit Rediger - - Remove - Fjern - Reset Nulstil @@ -40312,14 +40304,7 @@ Vil blive anvendt på blanktegn i kommentarer og strenge. - Todo::Internal::OptionsPage - - To-Do - To-do - - - - Todo::Internal::TodoItemsModel + Todo Description Beskrivelse @@ -40334,7 +40319,7 @@ Vil blive anvendt på blanktegn i kommentarer og strenge. - Todo::Internal::TodoOutputPane + Todo To-Do Entries To-do-poster @@ -40369,7 +40354,7 @@ Vil blive anvendt på blanktegn i kommentarer og strenge. - Todo::Internal::TodoProjectSettingsWidget + Todo Excluded Files Ekskluderet filer diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index f408279eb13..7434fdcd3ef 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -18646,23 +18646,15 @@ should a repository require SSH-authentication (see documentation on SSH and the - Todo::Internal::OptionsDialog + Todo Keywords Schlüsselworte - - Add - Hinzufügen - Edit Bearbeiten - - Remove - Löschen - Reset Zurücksetzen @@ -18771,7 +18763,7 @@ should a repository require SSH-authentication (see documentation on SSH and the - Todo::Internal::TodoItemsModel + Todo Description Beschreibung @@ -18786,7 +18778,7 @@ should a repository require SSH-authentication (see documentation on SSH and the - Todo::Internal::TodoOutputPane + Todo To-Do Entries To-do-Einträge @@ -19148,7 +19140,7 @@ should a repository require SSH-authentication (see documentation on SSH and the - Todo::Internal::KeywordDialog + Todo Keyword Schlüsselwort @@ -31741,7 +31733,7 @@ Senden selbst auch Zeit benötigt. - Todo::Internal::TodoProjectSettingsWidget + Todo Excluded Files ausgenommene Dateien @@ -31758,10 +31750,6 @@ Senden selbst auch Zeit benötigt. Remove Entfernen - - To-Do - To-do - <Enter regular expression to exclude> <Regulären Ausdruck zum Ausschließen eingeben> @@ -49112,7 +49100,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e - Todo::Internal::TodoOptionsPage + Todo To-Do To-do diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts index e823e2f3444..73602bf46ea 100644 --- a/share/qtcreator/translations/qtcreator_fr.ts +++ b/share/qtcreator/translations/qtcreator_fr.ts @@ -51387,22 +51387,7 @@ Influence l'indentation des lignes de continuation. - Todo::Internal::AddKeywordDialog - - Keyword - mot-clé - - - Icon - Icone - - - Color - Couleur - - - - Todo::Internal::OptionsDialog + Todo Form Formulaire @@ -51431,14 +51416,6 @@ Influence l'indentation des lignes de continuation. Scanning scope Portée de la recherche - - Scan in the whole project - Rechercher dans tout le projet - - - Scan in the current opened file - Rechercher dans le fichier courant - VcsBase::Internal::BaseCheckoutWizardPage @@ -53304,7 +53281,7 @@ Les modèles de code C++ et QML ont besoin d'une version de Qt et d'un - Todo::Internal::TodoItemsModel + Todo Description Description @@ -53319,7 +53296,7 @@ Les modèles de code C++ et QML ont besoin d'une version de Qt et d'un - Todo::Internal::TodoOutputPane + Todo To-Do Entries Fonctionnalités qui recherche les entrées "TODO" dans le code, à voir comment ça s'affiche en partique dans Qt Creator. [Pierre] ça je suis partisant de laisser TODO tel quel, c'est du jargon informatique... @@ -53343,7 +53320,7 @@ Les modèles de code C++ et QML ont besoin d'une version de Qt et d'un - Todo::Internal::OptionsPage + Todo To-Do Quoi que l'on pourrait laisser TODO ? [Pierre] yep, je valide TODO @@ -54376,7 +54353,7 @@ Le fichier APL ne sera pas utilisable sur d'autres périphériques. - Todo::Internal::KeywordDialog + Todo Keyword Mot-clé diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts index f7a2d7621fb..1d22ffbd6aa 100644 --- a/share/qtcreator/translations/qtcreator_hr.ts +++ b/share/qtcreator/translations/qtcreator_hr.ts @@ -9139,7 +9139,7 @@ Utječe na uvlačenje neprekinutih redaka. - Todo::Internal::KeywordDialog + Todo Keyword Ključna riječ @@ -9166,7 +9166,7 @@ Utječe na uvlačenje neprekinutih redaka. - Todo::Internal::OptionsDialog + Todo Keywords Ključne riječi @@ -9205,7 +9205,7 @@ Utječe na uvlačenje neprekinutih redaka. - Todo::Internal::TodoProjectSettingsWidget + Todo Excluded Files Isključene datoteke @@ -9214,18 +9214,6 @@ Utječe na uvlačenje neprekinutih redaka. Regular expressions for file paths to be excluded from scanning. Regularni izrazi za staze datoteka koje se isključuju iz pretrage. - - Add - Dodaj - - - Remove - Ukloni - - - To-Do - Zadatak - <Enter regular expression to exclude> <Upiši regularni izraz koji se isključuje iz pretrage> @@ -41396,7 +41384,7 @@ Neće se primijeniti na bjeline u komentarima i znakovnim nizovima. - Todo::Internal::TodoItemsModel + Todo Description Opis @@ -41411,7 +41399,7 @@ Neće se primijeniti na bjeline u komentarima i znakovnim nizovima. - Todo::Internal::TodoOutputPane + Todo To-Do Entries Unosi zadatka @@ -41446,7 +41434,7 @@ Neće se primijeniti na bjeline u komentarima i znakovnim nizovima. - Todo::Internal::OptionsPage + Todo To-Do Zadatak diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index a24efbf1103..6b07a3606ce 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -7163,7 +7163,7 @@ Influences the indentation of continuation lines. - Todo::Internal::KeywordDialog + Todo Keyword キーワード @@ -7190,7 +7190,7 @@ Influences the indentation of continuation lines. - Todo::Internal::OptionsDialog + Todo Form フォーム @@ -7199,18 +7199,10 @@ Influences the indentation of continuation lines. Keywords キーワード - - Add - 追加 - Edit 編集 - - Remove - 削除 - Reset リセット @@ -33537,7 +33529,7 @@ Will not be applied to whitespace in comments and strings. - Todo::Internal::TodoItemsModel + Todo Description 説明 @@ -33552,7 +33544,7 @@ Will not be applied to whitespace in comments and strings. - Todo::Internal::TodoOutputPane + Todo To-Do Entries To-Do エントリ @@ -33582,13 +33574,6 @@ Will not be applied to whitespace in comments and strings. 現在のサブプロジェクトをスキャンします。 - - Todo::Internal::OptionsPage - - To-Do - To-Do - - UpdateInfo::Internal::UpdateInfoPlugin @@ -38179,7 +38164,7 @@ the program. - Todo::Internal::TodoProjectSettingsWidget + Todo Add 追加 @@ -38196,10 +38181,6 @@ the program. Regular expressions for file paths to be excluded from scanning. スキャンの対象外とするファイルパスを示す正規表現です。 - - To-Do - To-Do - <Enter regular expression to exclude> <除外する正規表現を入力してください> @@ -57396,7 +57377,7 @@ Will not be applied to whitespace in comments and strings. - Todo::Internal::TodoOptionsPage + Todo To-Do To-Do diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index 43df21b93d0..53b5581a6ab 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -20792,7 +20792,7 @@ Wpływa na wcięcia przeniesionych linii. - Todo::Internal::KeywordDialog + Todo Keyword Słowo kluczowe @@ -20819,7 +20819,7 @@ Wpływa na wcięcia przeniesionych linii. - Todo::Internal::OptionsDialog + Todo Form Formularz @@ -20828,18 +20828,10 @@ Wpływa na wcięcia przeniesionych linii. Keywords Słowa kluczowe - - Add - Dodaj - Edit Zmodyfikuj - - Remove - Usuń - Reset Zresetuj @@ -23048,7 +23040,7 @@ poinstruuje Qt Creatora o URI. - Todo::Internal::TodoItemsModel + Todo Description Opis @@ -23063,7 +23055,7 @@ poinstruuje Qt Creatora o URI. - Todo::Internal::TodoOutputPane + Todo To-Do Entries Wpisy "To-Do" @@ -23097,13 +23089,6 @@ poinstruuje Qt Creatora o URI. Pokazuje wpisy "%1" - - Todo::Internal::OptionsPage - - To-Do - "To-Do" - - VcsBase::Internal::UrlTextCursorHandler @@ -34211,7 +34196,7 @@ Pliki z katalogu źródłowego pakietu Android są kopiowane do katalogu budowan - Todo::Internal::TodoProjectSettingsWidget + Todo Excluded Files Wyłączone pliki diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index a7833c627f5..cd0a247e976 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -50781,7 +50781,7 @@ The trace data is lost. - Todo::Internal::KeywordDialog + Todo Keyword Ключевое слово @@ -50808,23 +50808,15 @@ The trace data is lost. - Todo::Internal::OptionsDialog + Todo Keywords Ключевые слова - - Add - Добавить - Edit Изменить - - Remove - Удалить - Reset Сбросить @@ -50847,7 +50839,7 @@ The trace data is lost. - Todo::Internal::TodoItemsModel + Todo Description Описание @@ -50862,14 +50854,7 @@ The trace data is lost. - Todo::Internal::TodoOptionsPage - - To-Do - To-Do - - - - Todo::Internal::TodoOutputPane + Todo To-Do Entries Записи To-Do @@ -50904,7 +50889,7 @@ The trace data is lost. - Todo::Internal::TodoProjectSettingsWidget + Todo Excluded Files Исключаемые файлы diff --git a/share/qtcreator/translations/qtcreator_uk.ts b/share/qtcreator/translations/qtcreator_uk.ts index e33f9194039..3d50d29058d 100644 --- a/share/qtcreator/translations/qtcreator_uk.ts +++ b/share/qtcreator/translations/qtcreator_uk.ts @@ -27591,7 +27591,7 @@ Influences the indentation of continuation lines. - Todo::Internal::OptionsDialog + Todo Form Форма @@ -27600,18 +27600,10 @@ Influences the indentation of continuation lines. Keywords Ключові слова - - Add - Додати - Edit Редагувати - - Remove - Видалити - Reset Скинути @@ -27620,14 +27612,6 @@ Influences the indentation of continuation lines. Scanning scope Область пошуку - - Scan in the whole project - Шукати у всьому проекті - - - Scan in the current opened file - Шукати в поточному відкритому файлі - Scan the whole active project Шукати у всьому активному проекті @@ -29177,7 +29161,7 @@ Do you want to kill it? - Todo::Internal::TodoItemsModel + Todo Description Опис @@ -29192,7 +29176,7 @@ Do you want to kill it? - Todo::Internal::TodoOutputPane + Todo To-Do Entries Записи To-Do @@ -29238,13 +29222,6 @@ Do you want to kill it? Шукати в поточному підпроекті. - - Todo::Internal::OptionsPage - - To-Do - To-Do - - VcsBase::BaseCheckoutWizard @@ -30422,7 +30399,7 @@ The APK will not be usable on any other device. - Todo::Internal::KeywordDialog + Todo Keyword Ключове слово @@ -51012,7 +50989,7 @@ Setting breakpoints by file name and line number may fail. - Todo::Internal::TodoProjectSettingsWidget + Todo Excluded Files Виключені файли diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index 572501228aa..a2e9193d599 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -47921,7 +47921,7 @@ Influences the indentation of continuation lines. - Todo::Internal::KeywordDialog + Todo Keyword 关键字 @@ -47949,7 +47949,7 @@ Influences the indentation of continuation lines. - Todo::Internal::OptionsDialog + Todo Form 界面 @@ -53166,7 +53166,7 @@ cannot be found in the path. - Todo::Internal::TodoItemsModel + Todo Description 说明 @@ -53181,22 +53181,11 @@ cannot be found in the path. - Todo::Internal::TodoOutputPane + Todo To-Do Entries To-Do事项 - - Scan in the current opened file - 扫描当前打开的文件 - - - Scan in the whole project - 在整个项目中扫描 - - - - Todo::Internal::OptionsPage To-Do To-Do diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts index aa90c9d8f66..9dbcfaec4ff 100644 --- a/share/qtcreator/translations/qtcreator_zh_TW.ts +++ b/share/qtcreator/translations/qtcreator_zh_TW.ts @@ -29511,22 +29511,7 @@ Influences the indentation of continuation lines. - Todo::Internal::AddKeywordDialog - - Keyword - 關鍵字 - - - Icon - 圖示 - - - Color - 顏色 - - - - Todo::Internal::OptionsDialog + Todo Form 表單 @@ -31147,7 +31132,7 @@ references to elements in other files, loops, etc.) - Todo::Internal::TodoItemsModel + Todo Description 描述 @@ -31162,22 +31147,11 @@ references to elements in other files, loops, etc.) - Todo::Internal::TodoOutputPane + Todo To-Do Entries 待辦事項條目 - - Scan in the current opened file - 掃描目前已開啟的檔案 - - - Scan in the whole project - 掃描整個專案 - - - - Todo::Internal::OptionsPage To-Do 待辦事項 @@ -32029,7 +32003,7 @@ This option is useful when you want to try your application on devices which don - Todo::Internal::KeywordDialog + Todo Keyword 關鍵字 diff --git a/src/plugins/todo/constants.h b/src/plugins/todo/constants.h index 4b396eb726f..d693c503d82 100644 --- a/src/plugins/todo/constants.h +++ b/src/plugins/todo/constants.h @@ -49,14 +49,9 @@ enum OutputColumnIndex { OUTPUT_COLUMN_COUNT }; -const char OUTPUT_COLUMN_TEXT_TITLE[] = QT_TRANSLATE_NOOP("Todo::Internal::TodoItemsModel", "Description"); -const char OUTPUT_COLUMN_FILE_TITLE[] = QT_TRANSLATE_NOOP("Todo::Internal::TodoItemsModel", "File"); -const char OUTPUT_COLUMN_LINE_TITLE[] = QT_TRANSLATE_NOOP("Todo::Internal::TodoItemsModel", "Line"); - const int OUTPUT_TOOLBAR_SPACER_WIDTH = 25; const int OUTPUT_PANE_UPDATE_INTERVAL = 2000; -const char OUTPUT_PANE_TITLE[] = QT_TRANSLATE_NOOP("Todo::Internal::TodoOutputPane", "To-Do Entries"); const char FILTER_KEYWORD_NAME[] = "filterKeywordName"; diff --git a/src/plugins/todo/keyworddialog.cpp b/src/plugins/todo/keyworddialog.cpp index 4a4f17375d6..8f6a5c1943e 100644 --- a/src/plugins/todo/keyworddialog.cpp +++ b/src/plugins/todo/keyworddialog.cpp @@ -28,6 +28,7 @@ #include "keyword.h" #include "lineparser.h" +#include "todotr.h" #include #include @@ -46,7 +47,7 @@ KeywordDialog::KeywordDialog(const Keyword &keyword, const QSet &alread QDialog(parent), m_alreadyUsedKeywordNames(alreadyUsedKeywordNames) { - setWindowTitle(tr("Keyword")); + setWindowTitle(Tr::tr("Keyword")); m_listWidget = new QListWidget(this); @@ -60,7 +61,7 @@ KeywordDialog::KeywordDialog(const Keyword &keyword, const QSet &alread m_keywordNameEdit = new QLineEdit(keyword.name); - m_errorLabel = new QLabel(tr("errorLabel"), this); + m_errorLabel = new QLabel(Tr::tr("errorLabel"), this); m_errorLabel->setStyleSheet(QString::fromUtf8("color: red;")); m_errorLabel->hide(); @@ -71,15 +72,15 @@ KeywordDialog::KeywordDialog(const Keyword &keyword, const QSet &alread using namespace Utils::Layouting; Column { - new QLabel(tr("Icon")), + new QLabel(Tr::tr("Icon")), m_listWidget, Row { Group { - Title(tr("Color")), + Title(Tr::tr("Color")), Row { m_colorEdit, m_colorButton } }, Group { - Title(tr("Keyword")), + Title(Tr::tr("Keyword")), m_keywordNameEdit } }, @@ -162,12 +163,12 @@ void KeywordDialog::setupColorWidgets(const QColor &color) bool KeywordDialog::canAccept() { if (!isKeywordNameCorrect()) { - showError(tr("Keyword cannot be empty, contain spaces, colons, slashes or asterisks.")); + showError(Tr::tr("Keyword cannot be empty, contain spaces, colons, slashes or asterisks.")); return false; } if (isKeywordNameAlreadyUsed()) { - showError(tr("There is already a keyword with this name.")); + showError(Tr::tr("There is already a keyword with this name.")); return false; } diff --git a/src/plugins/todo/optionsdialog.cpp b/src/plugins/todo/optionsdialog.cpp index 5ec879992a0..7ca9821f583 100644 --- a/src/plugins/todo/optionsdialog.cpp +++ b/src/plugins/todo/optionsdialog.cpp @@ -29,10 +29,10 @@ #include "keyworddialog.h" #include "keyword.h" #include "settings.h" +#include "todotr.h" #include -#include #include #include #include @@ -42,8 +42,6 @@ namespace Todo::Internal { class OptionsDialog final : public Core::IOptionsPageWidget { - Q_DECLARE_TR_FUNCTIONS(Todo::Internal::TodoOptionsPage) - public: OptionsDialog(Settings *settings, const std::function &onApply); @@ -83,24 +81,24 @@ OptionsDialog::OptionsDialog(Settings *settings, const std::function &o m_keywordsList->setSelectionBehavior(QAbstractItemView::SelectRows); m_keywordsList->setSortingEnabled(false); - auto addKeywordButton = new QPushButton(tr("Add")); - m_editKeywordButton = new QPushButton(tr("Edit")); - m_removeKeywordButton = new QPushButton(tr("Remove")); - resetKeywordsButton = new QPushButton(tr("Reset")); + auto addKeywordButton = new QPushButton(Tr::tr("Add")); + m_editKeywordButton = new QPushButton(Tr::tr("Edit")); + m_removeKeywordButton = new QPushButton(Tr::tr("Remove")); + resetKeywordsButton = new QPushButton(Tr::tr("Reset")); - m_scanInProjectRadioButton = new QRadioButton(tr("Scan the whole active project")); + m_scanInProjectRadioButton = new QRadioButton(Tr::tr("Scan the whole active project")); m_scanInProjectRadioButton->setEnabled(true); - m_scanInCurrentFileRadioButton = new QRadioButton(tr("Scan only the currently edited document")); + m_scanInCurrentFileRadioButton = new QRadioButton(Tr::tr("Scan only the currently edited document")); m_scanInCurrentFileRadioButton->setChecked(true); - m_scanInSubprojectRadioButton = new QRadioButton(tr("Scan the current subproject")); + m_scanInSubprojectRadioButton = new QRadioButton(Tr::tr("Scan the current subproject")); using namespace Utils::Layouting; Column { Group { - Title(tr("Keywords")), + Title(Tr::tr("Keywords")), Row { m_keywordsList, Column { @@ -113,7 +111,7 @@ OptionsDialog::OptionsDialog(Settings *settings, const std::function &o } }, Group { - Title(tr("Scanning scope")), + Title(Tr::tr("Scanning scope")), Column { m_scanInProjectRadioButton, m_scanInCurrentFileRadioButton, @@ -270,9 +268,9 @@ void OptionsDialog::apply() TodoOptionsPage::TodoOptionsPage(Settings *settings, const std::function &onApply) { setId("TodoSettings"); - setDisplayName(OptionsDialog::tr("To-Do")); + setDisplayName(Tr::tr("To-Do")); setCategory("To-Do"); - setDisplayCategory(OptionsDialog::tr("To-Do")); + setDisplayCategory(Tr::tr("To-Do")); setCategoryIconPath(":/todoplugin/images/settingscategory_todo.png"); setWidgetCreator([settings, onApply] { return new OptionsDialog(settings, onApply); }); } diff --git a/src/plugins/todo/todoitemsmodel.cpp b/src/plugins/todo/todoitemsmodel.cpp index 7776ec169cb..35f5de4ac18 100644 --- a/src/plugins/todo/todoitemsmodel.cpp +++ b/src/plugins/todo/todoitemsmodel.cpp @@ -25,10 +25,11 @@ ****************************************************************************/ #include "todoitemsmodel.h" + #include "constants.h" +#include "todotr.h" #include - #include #include @@ -116,14 +117,11 @@ QVariant TodoItemsModel::headerData(int section, Qt::Orientation orientation, in switch (section) { case Constants::OUTPUT_COLUMN_TEXT: - return tr(Constants::OUTPUT_COLUMN_TEXT_TITLE); - + return Tr::tr("Description"); case Constants::OUTPUT_COLUMN_FILE: - return tr(Constants::OUTPUT_COLUMN_FILE_TITLE); - + return Tr::tr("File"); case Constants::OUTPUT_COLUMN_LINE: - return tr(Constants::OUTPUT_COLUMN_LINE_TITLE); - + return Tr::tr("Line"); default: return QVariant(); } diff --git a/src/plugins/todo/todooutputpane.cpp b/src/plugins/todo/todooutputpane.cpp index 30be160d56f..d72f974e357 100644 --- a/src/plugins/todo/todooutputpane.cpp +++ b/src/plugins/todo/todooutputpane.cpp @@ -25,9 +25,11 @@ ****************************************************************************/ #include "todooutputpane.h" + #include "constants.h" #include "todoitemsmodel.h" #include "todooutputtreeview.h" +#include "todotr.h" #include #include @@ -81,7 +83,7 @@ QList TodoOutputPane::toolBarWidgets() const QString TodoOutputPane::displayName() const { - return tr(Constants::OUTPUT_PANE_TITLE); + return Tr::tr("To-Do Entries"); } int TodoOutputPane::priorityInStatusBar() const @@ -249,18 +251,18 @@ void TodoOutputPane::createScopeButtons() { m_currentFileButton = new QToolButton(); m_currentFileButton->setCheckable(true); - m_currentFileButton->setText(tr("Current Document")); - m_currentFileButton->setToolTip(tr("Scan only the currently edited document.")); + m_currentFileButton->setText(Tr::tr("Current Document")); + m_currentFileButton->setToolTip(Tr::tr("Scan only the currently edited document.")); m_wholeProjectButton = new QToolButton(); m_wholeProjectButton->setCheckable(true); - m_wholeProjectButton->setText(tr("Active Project")); - m_wholeProjectButton->setToolTip(tr("Scan the whole active project.")); + m_wholeProjectButton->setText(Tr::tr("Active Project")); + m_wholeProjectButton->setToolTip(Tr::tr("Scan the whole active project.")); m_subProjectButton = new QToolButton(); m_subProjectButton->setCheckable(true); - m_subProjectButton->setText(tr("Subproject")); - m_subProjectButton->setToolTip(tr("Scan the current subproject.")); + m_subProjectButton->setText(Tr::tr("Subproject")); + m_subProjectButton->setToolTip(Tr::tr("Scan the current subproject.")); m_scopeButtons = new QButtonGroup(); m_scopeButtons->addButton(m_wholeProjectButton); @@ -272,7 +274,7 @@ void TodoOutputPane::createScopeButtons() m_spacer = new QWidget; m_spacer->setMinimumWidth(Constants::OUTPUT_TOOLBAR_SPACER_WIDTH); - QString tooltip = tr("Show \"%1\" entries"); + QString tooltip = Tr::tr("Show \"%1\" entries"); for (const Keyword &keyword: m_settings->keywords) { QToolButton *button = createCheckableToolButton(keyword.name, tooltip.arg(keyword.name), toolBarIcon(keyword.iconType)); button->setProperty(Constants::FILTER_KEYWORD_NAME, keyword.name); diff --git a/src/plugins/todo/todoplugin.cpp b/src/plugins/todo/todoplugin.cpp index edc8b70cd91..fac4a4ec607 100644 --- a/src/plugins/todo/todoplugin.cpp +++ b/src/plugins/todo/todoplugin.cpp @@ -25,12 +25,12 @@ ****************************************************************************/ #include "todoplugin.h" -#include "constants.h" + #include "optionsdialog.h" -#include "keyword.h" #include "todooutputpane.h" #include "todoitemsprovider.h" #include "todoprojectsettingswidget.h" +#include "todotr.h" #include #include @@ -39,7 +39,6 @@ #include #include -#include #include namespace Todo { @@ -47,8 +46,6 @@ namespace Internal { class TodoPluginPrivate : public QObject { - Q_DECLARE_TR_FUNCTIONS(Todo::Internal::TodoPlugin) - public: TodoPluginPrivate(); @@ -73,7 +70,7 @@ TodoPluginPrivate::TodoPluginPrivate() auto panelFactory = new ProjectExplorer::ProjectPanelFactory; panelFactory->setPriority(100); - panelFactory->setDisplayName(TodoProjectSettingsWidget::tr("To-Do")); + panelFactory->setDisplayName(Tr::tr("To-Do")); panelFactory->setCreateWidgetFunction([this](ProjectExplorer::Project *project) { auto widget = new TodoProjectSettingsWidget(project); connect(widget, &TodoProjectSettingsWidget::projectSettingsChanged, diff --git a/src/plugins/todo/todoprojectsettingswidget.cpp b/src/plugins/todo/todoprojectsettingswidget.cpp index cd5e598a85a..07e185852c2 100644 --- a/src/plugins/todo/todoprojectsettingswidget.cpp +++ b/src/plugins/todo/todoprojectsettingswidget.cpp @@ -26,6 +26,7 @@ #include "todoprojectsettingswidget.h" #include "constants.h" +#include "todotr.h" #include @@ -39,7 +40,7 @@ namespace Internal { static QString excludePlaceholder() { - return Todo::Internal::TodoProjectSettingsWidget::tr(""); + return Tr::tr(""); } TodoProjectSettingsWidget::TodoProjectSettingsWidget(ProjectExplorer::Project *project) @@ -47,17 +48,17 @@ TodoProjectSettingsWidget::TodoProjectSettingsWidget(ProjectExplorer::Project *p { m_excludedPatternsList = new QListWidget; m_excludedPatternsList->setSortingEnabled(true); - m_excludedPatternsList->setToolTip(tr("Regular expressions for file paths to be excluded from scanning.")); + m_excludedPatternsList->setToolTip(Tr::tr("Regular expressions for file paths to be excluded from scanning.")); - m_removeExcludedPatternButton = new QPushButton(tr("Remove")); + m_removeExcludedPatternButton = new QPushButton(Tr::tr("Remove")); - auto addExcludedPatternButton = new QPushButton(tr("Add")); + auto addExcludedPatternButton = new QPushButton(Tr::tr("Add")); using namespace Utils::Layouting; Column { Group { - Title(tr("Excluded Files")), + Title(Tr::tr("Excluded Files")), Row { m_excludedPatternsList, Column { diff --git a/src/plugins/todo/todoprojectsettingswidget.h b/src/plugins/todo/todoprojectsettingswidget.h index 5d22b72a044..0782f71b618 100644 --- a/src/plugins/todo/todoprojectsettingswidget.h +++ b/src/plugins/todo/todoprojectsettingswidget.h @@ -27,8 +27,6 @@ #include -#include - QT_BEGIN_NAMESPACE class QListWidget; class QListWidgetItem;