Commit efbe3578 authored by Konstantin Tokarev's avatar Konstantin Tokarev Committed by Eike Ziller

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: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 077c7741
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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*/)
......
......@@ -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);
}
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment