From 006f5683e02ffb5ca41d0a08be1492e8ff01ea38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Tue, 4 Nov 2008 15:38:37 +0000 Subject: [PATCH] * GuiDocument.cpp: * module names and descriptions might contain non-ASCII chars, so we must use translateIfPossible instead of the native _(). Alas, some manual conversion is necessary. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27248 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiDocument.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 12812649c6..0bb0dfdcd5 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -202,7 +202,7 @@ docstring getModuleDescription(string const & modName) LyXModule const * const mod = moduleList[modName]; if (!mod) return _("Module not found!"); - return _(mod->getDescription()); + return translateIfPossible(from_utf8(mod->getDescription())); } @@ -2309,7 +2309,7 @@ list const m.id = *it; LyXModule * mod = moduleList[*it]; if (mod) - m.name = qt_(mod->getName()); + m.name = toqstr(translateIfPossible(from_utf8(mod->getName()))); else m.name = toqstr(*it) + toqstr(" (") + qt_("Not Found") + toqstr(")"); mInfo.push_back(m); @@ -2464,9 +2464,9 @@ void GuiDocument::loadModuleInfo() for (; it != end; ++it) { modInfoStruct m; m.id = it->getID(); - m.name = qt_(it->getName()); + m.name = toqstr(translateIfPossible(from_utf8(it->getName()))); // this is supposed to give us the first sentence of the description - QString desc = qt_(it->getDescription()); + QString desc = toqstr(translateIfPossible(from_utf8(it->getDescription()))); int const pos = desc.indexOf("."); if (pos > 0) desc.truncate(pos + 1); -- 2.39.2