diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2012-05-06 12:30:23 +0400 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2012-05-07 11:39:01 +0200 |
commit | efbe35787fc6b9825e26d85c22faa926d21f4e5d (patch) | |
tree | 58065b2acb2201de0febe445ee73ff03e17c6be0 /src/plugins | |
parent | 077c7741f63cab9c09beee0a432f95ea8afb5f46 (diff) | |
download | qt-creator-efbe35787fc6b9825e26d85c22faa926d21f4e5d.tar.gz |
Translate editor display names in correct context.
These strings were internationalized long ago, but wrong context prevented
them from being actually tranlated in GUI.
This patch won't break anything - if these strings were not translated
for particular language, they stay untranslated, but if they were,
translations are used (e.g. for RU).
Change-Id: I175e29e8b0cee2bff9306623dad4a5956db69288
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/bineditor/bineditorplugin.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cppeditor/cppplugin.cpp | 2 | ||||
-rw-r--r-- | src/plugins/designer/formeditorfactory.cpp | 3 | ||||
-rw-r--r-- | src/plugins/genericprojectmanager/genericprojectfileseditor.cpp | 4 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditorfactory.cpp | 3 | ||||
-rw-r--r-- | src/plugins/imageviewer/imageviewerfactory.cpp | 3 | ||||
-rw-r--r-- | src/plugins/qmljseditor/qmljseditorfactory.cpp | 3 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/profileeditorfactory.cpp | 3 | ||||
-rw-r--r-- | src/plugins/resourceeditor/resourceeditorfactory.cpp | 3 | ||||
-rw-r--r-- | src/plugins/texteditor/plaintexteditorfactory.cpp | 3 |
10 files changed, 20 insertions, 10 deletions
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp index 9a26c4a1cb..2446a29543 100644 --- a/src/plugins/bineditor/bineditorplugin.cpp +++ b/src/plugins/bineditor/bineditorplugin.cpp @@ -36,6 +36,7 @@ #include <coreplugin/icore.h> +#include <QCoreApplication> #include <QDir> #include <QFile> #include <QFileInfo> @@ -423,7 +424,7 @@ Core::Id BinEditorFactory::id() const QString BinEditorFactory::displayName() const { - return tr(Constants::C_BINEDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", Constants::C_BINEDITOR_DISPLAY_NAME); } Core::IDocument *BinEditorFactory::open(const QString &fileName) diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index ca3476bd40..920c954696 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -105,7 +105,7 @@ Core::Id CppEditorFactory::id() const QString CppEditorFactory::displayName() const { - return tr(CppEditor::Constants::CPPEDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", CppEditor::Constants::CPPEDITOR_DISPLAY_NAME); } Core::IDocument *CppEditorFactory::open(const QString &fileName) diff --git a/src/plugins/designer/formeditorfactory.cpp b/src/plugins/designer/formeditorfactory.cpp index 87bbb5fbcc..323d15c0f3 100644 --- a/src/plugins/designer/formeditorfactory.cpp +++ b/src/plugins/designer/formeditorfactory.cpp @@ -44,6 +44,7 @@ #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/modemanager.h> +#include <QCoreApplication> #include <QFileInfo> #include <QDebug> @@ -68,7 +69,7 @@ Core::Id FormEditorFactory::id() const QString FormEditorFactory::displayName() const { - return tr(C_DESIGNER_XML_DISPLAY_NAME); + return qApp->translate("Designer", C_DESIGNER_XML_DISPLAY_NAME); } Core::IDocument *FormEditorFactory::open(const QString &fileName) diff --git a/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp b/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp index 6869454520..c9f3ddfd67 100644 --- a/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp +++ b/src/plugins/genericprojectmanager/genericprojectfileseditor.cpp @@ -39,6 +39,8 @@ #include <texteditor/texteditoractionhandler.h> #include <texteditor/texteditorsettings.h> +#include <QCoreApplication> + using namespace GenericProjectManager; using namespace GenericProjectManager::Internal; @@ -76,7 +78,7 @@ Core::Id ProjectFilesFactory::id() const QString ProjectFilesFactory::displayName() const { - return tr(Constants::FILES_EDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", Constants::FILES_EDITOR_DISPLAY_NAME); } Core::IDocument *ProjectFilesFactory::open(const QString &fileName) diff --git a/src/plugins/glsleditor/glsleditorfactory.cpp b/src/plugins/glsleditor/glsleditorfactory.cpp index 397e392241..c58a67c0f9 100644 --- a/src/plugins/glsleditor/glsleditorfactory.cpp +++ b/src/plugins/glsleditor/glsleditorfactory.cpp @@ -43,6 +43,7 @@ #include <coreplugin/icore.h> #include <coreplugin/editormanager/editormanager.h> +#include <QCoreApplication> #include <QFileInfo> #include <QDebug> #include <QSettings> @@ -72,7 +73,7 @@ Core::Id GLSLEditorFactory::id() const QString GLSLEditorFactory::displayName() const { - return tr(C_GLSLEDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", C_GLSLEDITOR_DISPLAY_NAME); } Core::IDocument *GLSLEditorFactory::open(const QString &fileName) diff --git a/src/plugins/imageviewer/imageviewerfactory.cpp b/src/plugins/imageviewer/imageviewerfactory.cpp index 74baf6b601..851822b4d9 100644 --- a/src/plugins/imageviewer/imageviewerfactory.cpp +++ b/src/plugins/imageviewer/imageviewerfactory.cpp @@ -36,6 +36,7 @@ #include "imageviewerconstants.h" #include "imageviewer.h" +#include <QCoreApplication> #include <QMap> #include <QImageReader> #include <QtDebug> @@ -102,7 +103,7 @@ Core::Id ImageViewerFactory::id() const QString ImageViewerFactory::displayName() const { - return tr(Constants::IMAGEVIEWER_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME); } Core::IDocument *ImageViewerFactory::open(const QString & /*fileName*/) diff --git a/src/plugins/qmljseditor/qmljseditorfactory.cpp b/src/plugins/qmljseditor/qmljseditorfactory.cpp index 42dfcabab6..50c4bc4935 100644 --- a/src/plugins/qmljseditor/qmljseditorfactory.cpp +++ b/src/plugins/qmljseditor/qmljseditorfactory.cpp @@ -46,6 +46,7 @@ #include <coreplugin/infobar.h> #include <coreplugin/editormanager/editormanager.h> +#include <QCoreApplication> #include <QFileInfo> #include <QDebug> #include <QSettings> @@ -74,7 +75,7 @@ Core::Id QmlJSEditorFactory::id() const QString QmlJSEditorFactory::displayName() const { - return tr(C_QMLJSEDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", C_QMLJSEDITOR_DISPLAY_NAME); } diff --git a/src/plugins/qt4projectmanager/profileeditorfactory.cpp b/src/plugins/qt4projectmanager/profileeditorfactory.cpp index 20dea31896..47ac3af1ef 100644 --- a/src/plugins/qt4projectmanager/profileeditorfactory.cpp +++ b/src/plugins/qt4projectmanager/profileeditorfactory.cpp @@ -41,6 +41,7 @@ #include <texteditor/texteditoractionhandler.h> #include <texteditor/texteditorsettings.h> +#include <QCoreApplication> #include <QFileInfo> #include <QAction> #include <QMenu> @@ -75,7 +76,7 @@ Core::Id ProFileEditorFactory::id() const QString ProFileEditorFactory::displayName() const { - return tr(Qt4ProjectManager::Constants::PROFILE_EDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", Qt4ProjectManager::Constants::PROFILE_EDITOR_DISPLAY_NAME); } Core::IDocument *ProFileEditorFactory::open(const QString &fileName) diff --git a/src/plugins/resourceeditor/resourceeditorfactory.cpp b/src/plugins/resourceeditor/resourceeditorfactory.cpp index 30f25de2e4..952a9def2b 100644 --- a/src/plugins/resourceeditor/resourceeditorfactory.cpp +++ b/src/plugins/resourceeditor/resourceeditorfactory.cpp @@ -38,6 +38,7 @@ #include <coreplugin/fileiconprovider.h> #include <coreplugin/editormanager/editormanager.h> +#include <QCoreApplication> #include <QFileInfo> #include <qdebug.h> @@ -61,7 +62,7 @@ Core::Id ResourceEditorFactory::id() const QString ResourceEditorFactory::displayName() const { - return tr(C_RESOURCEEDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", C_RESOURCEEDITOR_DISPLAY_NAME); } Core::IDocument *ResourceEditorFactory::open(const QString &fileName) diff --git a/src/plugins/texteditor/plaintexteditorfactory.cpp b/src/plugins/texteditor/plaintexteditorfactory.cpp index 308819e11b..ac86038ac6 100644 --- a/src/plugins/texteditor/plaintexteditorfactory.cpp +++ b/src/plugins/texteditor/plaintexteditorfactory.cpp @@ -44,6 +44,7 @@ #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/infobar.h> +#include <QCoreApplication> #include <QDebug> using namespace TextEditor; @@ -72,7 +73,7 @@ Core::Id PlainTextEditorFactory::id() const QString PlainTextEditorFactory::displayName() const { - return tr(Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME); + return qApp->translate("OpenWith::Editors", Core::Constants::K_DEFAULT_TEXT_EDITOR_DISPLAY_NAME); } Core::IDocument *PlainTextEditorFactory::open(const QString &fileName) |