Commit 0688b27d authored by Sergey Belyashov's avatar Sergey Belyashov Committed by Oswald Buddenhagen
Browse files

make more strings translatable



Added translation macros to some editor kinds.
Added possibility to translate names of editors in Open With context menu. Translation context is "OpenWith::Editors".

Merge-request: 808
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
parent 9bc155ea
......@@ -91,8 +91,8 @@ const char * const C_NAVIGATION_PANE = "Core.NavigationPane";
const char * const C_PROBLEM_PANE = "Core.ProblemPane";
//default editor kind
const char * const K_DEFAULT_TEXT_EDITOR = "Plain Text Editor";
const char * const K_DEFAULT_BINARY_EDITOR = "Binary Editor";
const char * const K_DEFAULT_TEXT_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", "Plain Text Editor");
const char * const K_DEFAULT_BINARY_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", "Binary Editor");
//actions
const char * const UNDO = "QtCreator.Undo";
......
......@@ -36,7 +36,7 @@ namespace Constants {
const char * const FORMATCODE = "CppEditor.FormatCode";
const char * const M_CONTEXT = "CppEditor.ContextMenu";
const char * const C_CPPEDITOR = "C++ Editor";
const char * const CPPEDITOR_KIND = "C++ Editor";
const char * const CPPEDITOR_KIND = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
const char * const SWITCH_DECLARATION_DEFINITION = "CppEditor.SwitchDeclarationDefinition";
const char * const JUMP_TO_DEFINITION = "CppEditor.JumpToDefinition";
......
......@@ -1917,7 +1917,7 @@ void ProjectExplorerPlugin::populateOpenWithMenu()
// Add all suitable editors
foreach (Core::IEditorFactory *editorFactory, factories) {
// Add action to open with this very editor factory
QString const actionTitle(editorFactory->kind());
QString const actionTitle = qApp->translate("OpenWith::Editors", editorFactory->kind().toAscii());
QAction * const action = m_openWithMenu->addAction(actionTitle);
action->setData(qVariantFromValue(editorFactory));
// File already open in an editor -> only enable that entry since
......@@ -1934,7 +1934,7 @@ void ProjectExplorerPlugin::populateOpenWithMenu()
} // for editor factories
// Add all suitable external editors
foreach (Core::IExternalEditor *externalEditor, externalEditors) {
QAction * const action = m_openWithMenu->addAction(externalEditor->kind());
QAction * const action = m_openWithMenu->addAction(qApp->translate("OpenWith::Editors", externalEditor->kind().toAscii()));
action->setData(qVariantFromValue(externalEditor));
}
} // matches
......
......@@ -39,7 +39,7 @@ const char * const C_PROFILEEDITOR_PANEL = ".pro File Editor (embedded)";
// kinds
const char * const PROJECT_KIND = "Qt4";
const char * const PROFILE_EDITOR = ".pro File Editor";
const char * const PROFILE_EDITOR = QT_TRANSLATE_NOOP("OpenWith::Editors", ".pro File Editor");
const char * const PROFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeprofile";
const char * const PROINCLUDEFILE_MIMETYPE = "application/vnd.nokia.qt.qmakeproincludefile";
const char * const CPP_SOURCE_MIMETYPE = "text/x-c++src";
......
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