]> git.lyx.org Git - features.git/commitdiff
* src/frontends/qt4/Menus.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 16 Jun 2008 15:19:31 +0000 (15:19 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 16 Jun 2008 15:19:31 +0000 (15:19 +0000)
* po/lyx_pot.py:
- make flex insets in the menus translatable.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25276 a592a061-630c-0410-9148-cb99ea01b6c8

po/lyx_pot.py
src/frontends/qt4/Menus.cpp

index daeb2d1485cc48db1c4eddd083768f5668708861..d1b4bdba6914dfd0b5d44fe9b5048bb9f7b06626 100755 (executable)
@@ -81,6 +81,7 @@ def layouts_l10n(input_files, output, base):
     ListName = re.compile(r'\s*ListName\s+(.*)')
     CategoryName = re.compile(r'\s*Category\s+(.*)')
     NameRE = re.compile(r'DeclareLyXModule.*{(.*)}')
+    InsetLayout = re.compile(r'^InsetLayout\s+(.*)')
     DescBegin = re.compile(r'#+\s*DescriptionBegin\s*$')
     DescEnd = re.compile(r'#+\s*DescriptionEnd\s*$')
 
@@ -139,6 +140,12 @@ def layouts_l10n(input_files, output, base):
                 string = res.group(1)
                 writeString(out, src, base, lineno, string)
                 continue
+            res = InsetLayout.search(line)
+            if res != None:
+                string = res.group(1)
+                string = string.replace('_', ' ')
+                writeString(out, src, base, lineno, string)
+                continue
     out.close()
 
 
index 7acb9e11b35ee4b35c3d1d44bea6f4ddd0d47d87..c124469e821ea0ed140e9c76e2a3916bb54a4ef8 100644 (file)
@@ -849,8 +849,8 @@ void MenuDefinition::expandFlexInsert(Buffer const * buf, string s)
                docstring const label = cit->first;
                if (cit->second.lyxtype() == s)
                        addWithStatusCheck(MenuItem(MenuItem::Command, 
-                               toqstr(label), FuncRequest(LFUN_FLEX_INSERT,
-                                               label)));
+                               toqstr(translateIfPossible(label)),
+                               FuncRequest(LFUN_FLEX_INSERT, label)));
        }
 }