From f901478c6ae5710a030e529e015dbbf6d57b99f8 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 8 Jul 2022 16:34:37 +0200 Subject: [PATCH] Bookmarks: Convert to Tr::tr Change-Id: I3fd7472b731264b4399412ed36b1b9aba9b7d1c3 Reviewed-by: Reviewed-by: hjk --- share/qtcreator/translations/qtcreator_cs.ts | 21 ++--------- share/qtcreator/translations/qtcreator_da.ts | 22 +----------- share/qtcreator/translations/qtcreator_de.ts | 20 ++--------- share/qtcreator/translations/qtcreator_es.ts | 5 +-- share/qtcreator/translations/qtcreator_fr.ts | 21 ++--------- share/qtcreator/translations/qtcreator_hr.ts | 22 +----------- share/qtcreator/translations/qtcreator_hu.ts | 8 +---- share/qtcreator/translations/qtcreator_it.ts | 5 +-- share/qtcreator/translations/qtcreator_ja.ts | 22 +----------- share/qtcreator/translations/qtcreator_pl.ts | 13 ++----- share/qtcreator/translations/qtcreator_ru.ts | 22 +----------- share/qtcreator/translations/qtcreator_sl.ts | 9 ++--- share/qtcreator/translations/qtcreator_uk.ts | 17 ++------- .../qtcreator/translations/qtcreator_zh_CN.ts | 15 ++------ .../qtcreator/translations/qtcreator_zh_TW.ts | 7 ++-- src/plugins/bookmarks/bookmarkfilter.cpp | 5 +-- src/plugins/bookmarks/bookmarkmanager.cpp | 28 +++++++-------- src/plugins/bookmarks/bookmarksplugin.cpp | 35 ++++++++++--------- 18 files changed, 64 insertions(+), 233 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_cs.ts b/share/qtcreator/translations/qtcreator_cs.ts index c5541d9d258..fa7f3d9a9f9 100644 --- a/share/qtcreator/translations/qtcreator_cs.ts +++ b/share/qtcreator/translations/qtcreator_cs.ts @@ -149,7 +149,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Záložky @@ -194,9 +194,6 @@ Remove all Bookmarks Odstranit všechny záložky - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Záložky @@ -213,14 +210,6 @@ Meta+M Meta+M - - Move Up - Posunout nahoru - - - Move Down - Posunout dolů - Previous Bookmark Předchozí záložka @@ -55443,7 +55432,7 @@ Nainstalujte, prosím, alespoň jedno SDK. - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M Alt+Meta+M @@ -59832,11 +59821,7 @@ nelze najít v cestě. - Bookmarks::Internal::BookmarkManager - - Edit Note - Upravit poznámku - + Bookmarks Note text: Text poznámky: diff --git a/share/qtcreator/translations/qtcreator_da.ts b/share/qtcreator/translations/qtcreator_da.ts index 9c6533a9ccf..29bc4ed90eb 100644 --- a/share/qtcreator/translations/qtcreator_da.ts +++ b/share/qtcreator/translations/qtcreator_da.ts @@ -4096,7 +4096,7 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15. - Bookmarks::Internal::BookmarkManager + Bookmarks Edit Bookmark Rediger bogmærke @@ -4109,9 +4109,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Line number: Linjenummer: - - - Bookmarks::Internal::BookmarkView Bookmarks Bogmærker @@ -4144,9 +4141,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Are you sure you want to remove all bookmarks from all files in the current session? Er du sikker på, at du fjerne alle bogmærker fra alle filer i den aktuelle session? - - - Bookmarks::Internal::BookmarkViewFactory Alt+Meta+M Alt+Meta+M @@ -4155,9 +4149,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Alt+M Alt+M - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Bogmærker @@ -4206,10 +4197,6 @@ F.eks., vil "Revision: 15" efterlade grenen ved revision 15.Next Bookmark in Document Næste bogmærke i dokument - - Edit Bookmark - Rediger bogmærke - BorderImageSpecifics @@ -44481,13 +44468,6 @@ Spordataene er tabt. &Omgør - - Bookmarks::Internal::BookmarkFilter - - Bookmarks - Bogmærker - - ClangCodeModel::Internal::ClangCodeModelPlugin diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index ec2c01afcb4..a847269b722 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -110,7 +110,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Lesezeichen @@ -143,9 +143,6 @@ Are you sure you want to remove all bookmarks from all files in the current session? Möchten Sie wirklich alle Lesezeichen aus allen Dateien der aktuellen Sitzung löschen? - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Lesezeichen @@ -19512,7 +19509,7 @@ manuellen Herunterladen im Browser des System zu öffnen. - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M Alt+Meta+M @@ -21057,11 +21054,7 @@ Sie können hier eine andere Verbindung wählen, beispielsweise eine serielle Ve - Bookmarks::Internal::BookmarkManager - - Edit Bookmark - Lesezeichen bearbeiten - + Bookmarks Note text: Anmerkungstext: @@ -41517,13 +41510,6 @@ Breche ausstehende Operationen ab... Deployment auf Gerät - - Bookmarks::Internal::BookmarkFilter - - Bookmarks - Lesezeichen - - ClangHoverHandler diff --git a/share/qtcreator/translations/qtcreator_es.ts b/share/qtcreator/translations/qtcreator_es.ts index 2197fb4ac9a..43cc7231e67 100644 --- a/share/qtcreator/translations/qtcreator_es.ts +++ b/share/qtcreator/translations/qtcreator_es.ts @@ -190,7 +190,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Marcadores @@ -203,9 +203,6 @@ Remove all Bookmarks Suprimir todos los marcadores - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Marcadores diff --git a/share/qtcreator/translations/qtcreator_fr.ts b/share/qtcreator/translations/qtcreator_fr.ts index e1bbe20e1a4..cb57eecaa38 100644 --- a/share/qtcreator/translations/qtcreator_fr.ts +++ b/share/qtcreator/translations/qtcreator_fr.ts @@ -157,7 +157,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Signets @@ -202,9 +202,6 @@ Remove all Bookmarks Supprimer tous les signets - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Signets @@ -221,14 +218,6 @@ Meta+M Meta+M - - Move Up - Déplacer vers le haut - - - Move Down - Déplacer vers le bas - Previous Bookmark Signet précédent @@ -56255,7 +56244,7 @@ Veuillez choisir un nom de paquet valide pour votre application (par exemple &qu - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M Alt+Meta+M @@ -62118,11 +62107,7 @@ Les noms partiels peuvent êtres utilisé s'ils ne sont pas ambigües. - Bookmarks::Internal::BookmarkManager - - Edit Note - Éditer une note - + Bookmarks Note text: Note : diff --git a/share/qtcreator/translations/qtcreator_hr.ts b/share/qtcreator/translations/qtcreator_hr.ts index f63f223a130..b56ec747992 100644 --- a/share/qtcreator/translations/qtcreator_hr.ts +++ b/share/qtcreator/translations/qtcreator_hr.ts @@ -17133,14 +17133,7 @@ Check the test environment. - Bookmarks::Internal::BookmarkFilter - - Bookmarks - Knjižne oznake - - - - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Knjižne oznake @@ -17173,9 +17166,6 @@ Check the test environment. Are you sure you want to remove all bookmarks from all files in the current session? Zaista želiš ukloniti sve knjižne oznake iz svih datoteka trenutačne sesije? - - - Bookmarks::Internal::BookmarkManager Edit Bookmark Uredi knjižnu oznaku @@ -17188,9 +17178,6 @@ Check the test environment. Line number: Broj retka: - - - Bookmarks::Internal::BookmarkViewFactory Alt+Meta+M Alt+Meta+M @@ -17199,9 +17186,6 @@ Check the test environment. Alt+M Alt+M - - - Bookmarks::Internal::BookmarksPlugin Toggle Bookmark Uključi/isključi knjižnu oznaku @@ -17222,10 +17206,6 @@ Check the test environment. Next Bookmark in Document Sljedeća knjižna oznaka u dokumentu - - Edit Bookmark - Uredi knjižnu oznaku - &Bookmarks &Knjižne oznake diff --git a/share/qtcreator/translations/qtcreator_hu.ts b/share/qtcreator/translations/qtcreator_hu.ts index 565cf6f3ac1..433bf2e2e2e 100644 --- a/share/qtcreator/translations/qtcreator_hu.ts +++ b/share/qtcreator/translations/qtcreator_hu.ts @@ -170,7 +170,7 @@ - Bookmarks::Internal::0 + Bookmarks Bookmarks Könyvjelzők @@ -239,9 +239,6 @@ Next Bookmark In Document Következő könyvjelző a dokumentumban - - - Bookmarks::Internal::BookmarkView Bookmarks Könyvjelzők @@ -254,9 +251,6 @@ Remove all Bookmarks Az összes könyvjelző eltávolítása - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Könyvjelzők diff --git a/share/qtcreator/translations/qtcreator_it.ts b/share/qtcreator/translations/qtcreator_it.ts index c3cd1064e87..628af655a80 100644 --- a/share/qtcreator/translations/qtcreator_it.ts +++ b/share/qtcreator/translations/qtcreator_it.ts @@ -199,7 +199,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Segnalibri @@ -212,9 +212,6 @@ Remove all Bookmarks Rimuovi tutti i Segnalibri - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Segnalibri diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index 70e9932726a..3b8ba34d318 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -13178,7 +13178,7 @@ in the system's browser for manual download. - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks ブックマーク @@ -13211,9 +13211,6 @@ in the system's browser for manual download. Are you sure you want to remove all bookmarks from all files in the current session? 現在のセッションのすべてのファイルからすべてのブックマークを本当に削除しますか? - - - Bookmarks::Internal::BookmarkManager Edit Bookmark ブックマークの編集 @@ -13226,9 +13223,6 @@ in the system's browser for manual download. Line number: 行番号: - - - Bookmarks::Internal::BookmarkViewFactory Alt+Meta+M Alt+Meta+M @@ -13237,9 +13231,6 @@ in the system's browser for manual download. Alt+M Alt+M - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks ブックマーク(&B) @@ -13288,10 +13279,6 @@ in the system's browser for manual download. Next Bookmark in Document ドキュメント内の次のブックマークに移動 - - Edit Bookmark - ブックマークの編集 - ClassView::Internal::NavigationWidgetFactory @@ -51116,13 +51103,6 @@ The name of the release build configuration created by default for a qmake proje 拡大率: %1% - - Bookmarks::Internal::BookmarkFilter - - Bookmarks - ブックマーク - - Qdb::Internal::DeviceDetector diff --git a/share/qtcreator/translations/qtcreator_pl.ts b/share/qtcreator/translations/qtcreator_pl.ts index c9c6ced1d1e..62140871230 100644 --- a/share/qtcreator/translations/qtcreator_pl.ts +++ b/share/qtcreator/translations/qtcreator_pl.ts @@ -1994,7 +1994,7 @@ Przyczyna: %3 - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Zakładki @@ -2027,9 +2027,6 @@ Przyczyna: %3 Are you sure you want to remove all bookmarks from all files in the current session? Czy usunąć wszystkie zakładki ze wszystkich plików w bieżącej sesji? - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Zakładki @@ -21731,7 +21728,7 @@ Wersje Qt można dodać w: Opcje > Budowanie i uruchamianie > Wersje Qt. - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M Alt+Meta+M @@ -25547,11 +25544,7 @@ Więcej informacji w dokumentacji "Checking Code Syntax". - Bookmarks::Internal::BookmarkManager - - Edit Bookmark - Zmodyfikuj zakładkę - + Bookmarks Note text: Tekst notatki: diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index 72ff5dffb16..0aafb09209e 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -5747,14 +5747,11 @@ For example, "Revision: 15" will leave the branch at revision 15. - Bookmarks::Internal::BookmarkFilter + Bookmarks Bookmarks Закладки - - - Bookmarks::Internal::BookmarkManager Edit Bookmark Изменение закладки @@ -5767,13 +5764,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Line number: Номер строки: - - - Bookmarks::Internal::BookmarkView - - Bookmarks - Закладки - Move Up Поднять @@ -5802,9 +5792,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Are you sure you want to remove all bookmarks from all files in the current session? Желаете удалить все закладки из всех файлов текущей сессии? - - - Bookmarks::Internal::BookmarkViewFactory Alt+Meta+M Alt+Meta+M @@ -5813,9 +5800,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Alt+M Alt+M - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Закладки @@ -5864,10 +5848,6 @@ For example, "Revision: 15" will leave the branch at revision 15.Next Bookmark in Document Следующая закладка в документе - - Edit Bookmark - Изменить закладку - BoostSettingsPage diff --git a/share/qtcreator/translations/qtcreator_sl.ts b/share/qtcreator/translations/qtcreator_sl.ts index 13faa8b637d..f9063edfef6 100644 --- a/share/qtcreator/translations/qtcreator_sl.ts +++ b/share/qtcreator/translations/qtcreator_sl.ts @@ -209,7 +209,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Zaznamki @@ -230,9 +230,6 @@ Remove All Odstrani vse - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Zaznamki @@ -31007,7 +31004,7 @@ Preverite pravice za dostop do mape. Timed out after %1s waiting for the process %2 to finish. - Po %1 s čakanja na zaključek procesa %2 je potekel čas. + Po %1 s čakanja na zaključek procesa %2 je potekel čas. @@ -33737,7 +33734,7 @@ Preverite, ali je telefon priključen in ali App TRK teče. Timed out after %1s waiting for mercurial process to finish. - Po %1 s čakanja na zaključek procesa mercurial je potekel čas. + Po %1 s čakanja na zaključek procesa mercurial je potekel čas. diff --git a/share/qtcreator/translations/qtcreator_uk.ts b/share/qtcreator/translations/qtcreator_uk.ts index 5bcd08fb394..e271c2df4ec 100644 --- a/share/qtcreator/translations/qtcreator_uk.ts +++ b/share/qtcreator/translations/qtcreator_uk.ts @@ -958,7 +958,7 @@ Local pulls are not applied to the master branch. - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks Закладки @@ -999,9 +999,6 @@ Local pulls are not applied to the master branch. Edit Note Редагувати примітку - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks &Закладки @@ -32369,7 +32366,7 @@ To add the Qt versions, select Options > Build & Run > Qt Versions. - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M Alt+Meta+M @@ -36978,15 +36975,7 @@ cannot be found in the path. - Bookmarks::Internal::BookmarkManager - - Edit Note - Редагувати примітку - - - Edit Bookmark - Редагування закладки - + Bookmarks Note text: Текст примітки: diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index 77f2c5af3f8..f6efb91e5f1 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -211,7 +211,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks 书签 @@ -240,9 +240,6 @@ Remove all Bookmarks 删除所有书签 - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks 书签(&B) @@ -259,14 +256,6 @@ Meta+M Meta+M - - Move Up - 上移 - - - Move Down - 下移 - Previous Bookmark 上个书签 @@ -50117,7 +50106,7 @@ Please choose a valid package name for your application (e.g. "org.example. - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M Alt+Meta+M diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts index 5560b23279d..020bf6e0d9b 100644 --- a/share/qtcreator/translations/qtcreator_zh_TW.ts +++ b/share/qtcreator/translations/qtcreator_zh_TW.ts @@ -121,7 +121,7 @@ - Bookmarks::Internal::BookmarkView + Bookmarks Bookmarks 書籤 @@ -142,9 +142,6 @@ Remove All 全部移除 - - - Bookmarks::Internal::BookmarksPlugin &Bookmarks 書籤(&B) @@ -33347,7 +33344,7 @@ Please choose a valid package name for your application (e.g. "org.example. - Bookmarks::Internal::BookmarkViewFactory + Bookmarks Alt+Meta+M diff --git a/src/plugins/bookmarks/bookmarkfilter.cpp b/src/plugins/bookmarks/bookmarkfilter.cpp index 594b18e11c9..44892ded2c4 100644 --- a/src/plugins/bookmarks/bookmarkfilter.cpp +++ b/src/plugins/bookmarks/bookmarkfilter.cpp @@ -27,6 +27,7 @@ #include "bookmark.h" #include "bookmarkmanager.h" +#include "bookmarkstr.h" #include @@ -38,8 +39,8 @@ BookmarkFilter::BookmarkFilter(BookmarkManager *manager) : m_manager(manager) { setId("Bookmarks"); - setDisplayName(tr("Bookmarks")); - setDescription(tr("Matches all bookmarks. Filter by file name, by the text on the line of the " + setDisplayName(Tr::tr("Bookmarks")); + setDescription(Tr::tr("Matches all bookmarks. Filter by file name, by the text on the line of the " "bookmark, or by the bookmark's note text.")); setPriority(Medium); setDefaultShortcutString("b"); diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index 3ddb2ddf143..d242af53dc0 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -26,8 +26,8 @@ #include "bookmarkmanager.h" #include "bookmark.h" -#include "bookmarksplugin.h" #include "bookmarks_global.h" +#include "bookmarkstr.h" #include #include @@ -188,7 +188,7 @@ BookmarkView::BookmarkView(BookmarkManager *manager) : m_bookmarkContext(new IContext(this)), m_manager(manager) { - setWindowTitle(tr("Bookmarks")); + setWindowTitle(Tr::tr("Bookmarks")); m_bookmarkContext->setWidget(this); m_bookmarkContext->setContext(Context(Constants::BOOKMARKS_CONTEXT)); @@ -228,13 +228,13 @@ QList BookmarkView::createToolBarWidgets() void BookmarkView::contextMenuEvent(QContextMenuEvent *event) { QMenu menu; - QAction *moveUp = menu.addAction(tr("Move Up")); - QAction *moveDown = menu.addAction(tr("Move Down")); - QAction *edit = menu.addAction(tr("&Edit")); + QAction *moveUp = menu.addAction(Tr::tr("Move Up")); + QAction *moveDown = menu.addAction(Tr::tr("Move Down")); + QAction *edit = menu.addAction(Tr::tr("&Edit")); menu.addSeparator(); - QAction *remove = menu.addAction(tr("&Remove")); + QAction *remove = menu.addAction(Tr::tr("&Remove")); menu.addSeparator(); - QAction *removeAll = menu.addAction(tr("Remove All")); + QAction *removeAll = menu.addAction(Tr::tr("Remove All")); m_contextMenuIndex = indexAt(event->pos()); if (!m_contextMenuIndex.isValid()) { @@ -280,8 +280,8 @@ void BookmarkView::keyPressEvent(QKeyEvent *event) void BookmarkView::removeAll() { if (CheckableMessageBox::doNotAskAgainQuestion(this, - tr("Remove All Bookmarks"), - tr("Are you sure you want to remove all bookmarks from all files in the current session?"), + Tr::tr("Remove All Bookmarks"), + Tr::tr("Are you sure you want to remove all bookmarks from all files in the current session?"), ICore::settings(), QLatin1String("RemoveAllBookmarks")) != QDialogButtonBox::Yes) return; @@ -676,7 +676,7 @@ void BookmarkManager::edit() Bookmark *b = m_bookmarksList.at(current.row()); QDialog dlg; - dlg.setWindowTitle(tr("Edit Bookmark")); + dlg.setWindowTitle(Tr::tr("Edit Bookmark")); auto layout = new QFormLayout(&dlg); auto noteEdit = new QLineEdit(b->note()); noteEdit->setMinimumWidth(300); @@ -687,8 +687,8 @@ void BookmarkManager::edit() auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); connect(buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject); - layout->addRow(tr("Note text:"), noteEdit); - layout->addRow(tr("Line number:"), lineNumberSpinbox); + layout->addRow(Tr::tr("Note text:"), noteEdit); + layout->addRow(Tr::tr("Line number:"), lineNumberSpinbox); layout->addWidget(buttonBox); if (dlg.exec() == QDialog::Accepted) { b->move(lineNumberSpinbox->value()); @@ -804,10 +804,10 @@ bool BookmarkManager::isAtCurrentBookmark() const BookmarkViewFactory::BookmarkViewFactory(BookmarkManager *bm) : m_manager(bm) { - setDisplayName(BookmarkView::tr("Bookmarks")); + setDisplayName(Tr::tr("Bookmarks")); setPriority(300); setId("Bookmarks"); - setActivationSequence(QKeySequence(useMacShortcuts ? tr("Alt+Meta+M") : tr("Alt+M"))); + setActivationSequence(QKeySequence(useMacShortcuts ? Tr::tr("Alt+Meta+M") : Tr::tr("Alt+M"))); } NavigationView BookmarkViewFactory::createWidget() diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index db0bd49bebe..898c030b52c 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -28,6 +28,7 @@ #include "bookmarkfilter.h" #include "bookmarkmanager.h" #include "bookmarks_global.h" +#include "bookmarkstr.h" #include #include @@ -71,14 +72,14 @@ public: BookmarkFilter m_bookmarkFilter; BookmarkViewFactory m_bookmarkViewFactory; - QAction m_toggleAction{BookmarksPlugin::tr("Toggle Bookmark"), nullptr}; - QAction m_editAction{BookmarksPlugin::tr("Edit Bookmark"), nullptr}; - QAction m_prevAction{BookmarksPlugin::tr("Previous Bookmark"), nullptr}; - QAction m_nextAction{BookmarksPlugin::tr("Next Bookmark"), nullptr}; - QAction m_docPrevAction{BookmarksPlugin::tr("Previous Bookmark in Document"), nullptr}; - QAction m_docNextAction{BookmarksPlugin::tr("Next Bookmark in Document"), nullptr}; - QAction m_editBookmarkAction{BookmarksPlugin::tr("Edit Bookmark"), nullptr}; - QAction m_bookmarkMarginAction{BookmarksPlugin::tr("Toggle Bookmark"), nullptr}; + QAction m_toggleAction{Tr::tr("Toggle Bookmark"), nullptr}; + QAction m_editAction{Tr::tr("Edit Bookmark"), nullptr}; + QAction m_prevAction{Tr::tr("Previous Bookmark"), nullptr}; + QAction m_nextAction{Tr::tr("Next Bookmark"), nullptr}; + QAction m_docPrevAction{Tr::tr("Previous Bookmark in Document"), nullptr}; + QAction m_docNextAction{Tr::tr("Next Bookmark in Document"), nullptr}; + QAction m_editBookmarkAction{Tr::tr("Edit Bookmark"), nullptr}; + QAction m_bookmarkMarginAction{Tr::tr("Toggle Bookmark"), nullptr}; int m_marginActionLineNumber = 0; Utils::FilePath m_marginActionFileName; @@ -102,7 +103,7 @@ BookmarksPluginPrivate::BookmarksPluginPrivate() ActionContainer *mtools = ActionManager::actionContainer(Core::Constants::M_TOOLS); ActionContainer *touchBar = ActionManager::actionContainer(Core::Constants::TOUCH_BAR); ActionContainer *mbm = ActionManager::createMenu(Id(BOOKMARKS_MENU)); - mbm->menu()->setTitle(BookmarksPlugin::tr("&Bookmarks")); + mbm->menu()->setTitle(Tr::tr("&Bookmarks")); mtools->addMenu(mbm); const Context editorManagerContext(Core::Constants::C_EDITORMANAGER); @@ -110,16 +111,16 @@ BookmarksPluginPrivate::BookmarksPluginPrivate() // Toggle Command *cmd = ActionManager::registerAction(&m_toggleAction, BOOKMARKS_TOGGLE_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+M") - : BookmarksPlugin::tr("Ctrl+M"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+M") + : Tr::tr("Ctrl+M"))); cmd->setTouchBarIcon(Utils::Icons::MACOS_TOUCHBAR_BOOKMARK.icon()); mbm->addAction(cmd); cmd = ActionManager::registerAction(&m_editAction, BOOKMARKS_EDIT_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+Shift+M") - : BookmarksPlugin::tr("Ctrl+Shift+M"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+M") + : Tr::tr("Ctrl+Shift+M"))); mbm->addAction(cmd); touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_EDITOR); @@ -130,16 +131,16 @@ BookmarksPluginPrivate::BookmarksPluginPrivate() m_prevAction.setIcon(Utils::Icons::PREV_TOOLBAR.icon()); m_prevAction.setIconVisibleInMenu(false); cmd = ActionManager::registerAction(&m_prevAction, BOOKMARKS_PREV_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+,") - : BookmarksPlugin::tr("Ctrl+,"))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+,") + : Tr::tr("Ctrl+,"))); mbm->addAction(cmd); // Next m_nextAction.setIcon(Utils::Icons::NEXT_TOOLBAR.icon()); m_nextAction.setIconVisibleInMenu(false); cmd = ActionManager::registerAction(&m_nextAction, BOOKMARKS_NEXT_ACTION, editorManagerContext); - cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? BookmarksPlugin::tr("Meta+.") - : BookmarksPlugin::tr("Ctrl+."))); + cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+.") + : Tr::tr("Ctrl+."))); mbm->addAction(cmd); mbm->addSeparator();