forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Eike Ziller
parent
077c7741f6
commit
efbe35787f
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -423,7 +424,7 @@ Core::Id BinEditorFactory::id() const
|
|||||||
|
|
||||||
QString BinEditorFactory::displayName() 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)
|
Core::IDocument *BinEditorFactory::open(const QString &fileName)
|
||||||
|
@@ -105,7 +105,7 @@ Core::Id CppEditorFactory::id() const
|
|||||||
|
|
||||||
QString CppEditorFactory::displayName() 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)
|
Core::IDocument *CppEditorFactory::open(const QString &fileName)
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <coreplugin/modemanager.h>
|
#include <coreplugin/modemanager.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ Core::Id FormEditorFactory::id() const
|
|||||||
|
|
||||||
QString FormEditorFactory::displayName() 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)
|
Core::IDocument *FormEditorFactory::open(const QString &fileName)
|
||||||
|
@@ -39,6 +39,8 @@
|
|||||||
#include <texteditor/texteditoractionhandler.h>
|
#include <texteditor/texteditoractionhandler.h>
|
||||||
#include <texteditor/texteditorsettings.h>
|
#include <texteditor/texteditorsettings.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
using namespace GenericProjectManager;
|
using namespace GenericProjectManager;
|
||||||
using namespace GenericProjectManager::Internal;
|
using namespace GenericProjectManager::Internal;
|
||||||
|
|
||||||
@@ -76,7 +78,7 @@ Core::Id ProjectFilesFactory::id() const
|
|||||||
|
|
||||||
QString ProjectFilesFactory::displayName() 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)
|
Core::IDocument *ProjectFilesFactory::open(const QString &fileName)
|
||||||
|
@@ -43,6 +43,7 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@@ -72,7 +73,7 @@ Core::Id GLSLEditorFactory::id() const
|
|||||||
|
|
||||||
QString GLSLEditorFactory::displayName() 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)
|
Core::IDocument *GLSLEditorFactory::open(const QString &fileName)
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
#include "imageviewerconstants.h"
|
#include "imageviewerconstants.h"
|
||||||
#include "imageviewer.h"
|
#include "imageviewer.h"
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
@@ -102,7 +103,7 @@ Core::Id ImageViewerFactory::id() const
|
|||||||
|
|
||||||
QString ImageViewerFactory::displayName() 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*/)
|
Core::IDocument *ImageViewerFactory::open(const QString & /*fileName*/)
|
||||||
|
@@ -46,6 +46,7 @@
|
|||||||
#include <coreplugin/infobar.h>
|
#include <coreplugin/infobar.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@@ -74,7 +75,7 @@ Core::Id QmlJSEditorFactory::id() const
|
|||||||
|
|
||||||
QString QmlJSEditorFactory::displayName() 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/texteditoractionhandler.h>
|
||||||
#include <texteditor/texteditorsettings.h>
|
#include <texteditor/texteditorsettings.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@@ -75,7 +76,7 @@ Core::Id ProFileEditorFactory::id() const
|
|||||||
|
|
||||||
QString ProFileEditorFactory::displayName() 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)
|
Core::IDocument *ProFileEditorFactory::open(const QString &fileName)
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
#include <coreplugin/fileiconprovider.h>
|
#include <coreplugin/fileiconprovider.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ Core::Id ResourceEditorFactory::id() const
|
|||||||
|
|
||||||
QString ResourceEditorFactory::displayName() 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)
|
Core::IDocument *ResourceEditorFactory::open(const QString &fileName)
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <coreplugin/infobar.h>
|
#include <coreplugin/infobar.h>
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
@@ -72,7 +73,7 @@ Core::Id PlainTextEditorFactory::id() const
|
|||||||
|
|
||||||
QString PlainTextEditorFactory::displayName() 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)
|
Core::IDocument *PlainTextEditorFactory::open(const QString &fileName)
|
||||||
|
Reference in New Issue
Block a user