]> git.lyx.org Git - features.git/commitdiff
l7n
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 9 Jan 2017 08:50:34 +0000 (09:50 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 9 Jan 2017 08:50:34 +0000 (09:50 +0100)
po/Rules-lyx
po/lyx_pot.py

index 23d4c061af98c19bf96dcc473a27c880f45bc1dd..a70a61d1c48e0bb15c437153d56b64e88c31f571 100644 (file)
@@ -28,14 +28,15 @@ qt4_l10n.pot: $(top_srcdir)/src/frontends/qt4/ui/*.ui
 
 layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout \
                 $(top_srcdir)/lib/layouts/*.inc \
-               $(top_srcdir)/lib/layouts/*.module
+               $(top_srcdir)/lib/layouts/*.module \
+               $(top_srcdir)/lib/citeengines/*.citeengine
        $(LYX_POT) -o $@ -t layouts $^
 
 # Read translatable strings from layouts and translations from the po files and
 # create the layouttranslations file containing all LaTeX relevant translations
 $(top_srcdir)/lib/layouttranslations: $(POFILES) $(top_srcdir)/lib/layouts/*.layout \
                 $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module $(top_srcdir)/lib/citeengines/*.citeengines
-       $(LYX_POT) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module
+       $(LYX_POT) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module $(top_srcdir)/lib/citeengines/*.citeengines
 
 languages_l10n.pot: $(top_srcdir)/lib/languages
        $(LYX_POT) -o $@ -t languages $^
index 0fc7ee481c4234570b72b2f8ef1db7b3d3fc3e5d..0fc3acaa08c09e0c0ff7a33a429dc6af187a837b 100755 (executable)
@@ -78,7 +78,7 @@ def ui_l10n(input_files, output, base):
 
 
 def layouts_l10n(input_files, output, base, layouttranslations):
-    '''Generate pot file from lib/layouts/*.{layout,inc,module}'''
+    '''Generate pot file from lib/layouts/*.{layout,inc,module} and lib/citeengines/*.citeengine'''
     ClassDescription = re.compile(r'^\s*#\s*\\Declare(LaTeX|DocBook)Class.*\{(.*)\}$', re.IGNORECASE)
     ClassCategory = re.compile(r'^\s*#\s*\\DeclareCategory\{(.*)\}$', re.IGNORECASE)
     Style = re.compile(r'^\s*Style\s+(.*\S)\s*$', re.IGNORECASE)
@@ -91,7 +91,7 @@ def layouts_l10n(input_files, output, base, layouttranslations):
     ListName = re.compile(r'^\s*ListName\s+(.*\S)\s*$', re.IGNORECASE)
     CategoryName = re.compile(r'^\s*Category\s+(.*\S)\s*$', re.IGNORECASE)
     NameRE = re.compile(r'^\s*#\s*\\DeclareLyXModule.*{(.*)}$', re.IGNORECASE)
-    CiteNameRE = re.compile(r'^\s*#\s*\\DeclareLyXCiteEngine.*{(.*)}$', re.IGNORECASE)
+    CiteNameRE = re.compile(r'^\s*#\s*\\DeclareLyXCiteEngine.*\{(.*)\}$', re.IGNORECASE)
     InsetLayout = re.compile(r'^InsetLayout\s+\"?(.*)\"?\s*$', re.IGNORECASE)
     FlexCheck = re.compile(r'^Flex:(.*)', re.IGNORECASE)
     CaptionCheck = re.compile(r'^Caption:(.*)', re.IGNORECASE)
@@ -103,7 +103,8 @@ def layouts_l10n(input_files, output, base, layouttranslations):
     I18nString = re.compile(r'_\(([^\)]+)\)')
     CounterFormat = re.compile(r'^\s*PrettyFormat\s+"?(.*)"?\s*$', re.IGNORECASE)
     CiteFormat = re.compile(r'^\s*CiteFormat', re.IGNORECASE)
-    KeyVal = re.compile(r'^\s*_\w+\s+(.*\S)\s*$')
+    # Note: preceding and trailing space in the val below matters
+    KeyVal = re.compile(r'^\s*_\w+\s(.*\S)*$')
     Float = re.compile(r'^\s*Float\s*$', re.IGNORECASE)
     UsesFloatPkg = re.compile(r'^\s*UsesFloatPkg\s+(.*\S)\s*$', re.IGNORECASE)
     IsPredefined = re.compile(r'^\s*IsPredefined\s+(.*\S)\s*$', re.IGNORECASE)