commit bb04dcdd26f6911e2227fcd16779fb54f407fd92
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Mon Jan 9 09:50:34 2017 +0100

    l7n
---
 po/Rules-lyx  |    5 +++--
 po/lyx_pot.py |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/po/Rules-lyx b/po/Rules-lyx
index 23d4c06..a70a61d 100644
--- a/po/Rules-lyx
+++ b/po/Rules-lyx
@@ -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 $^
diff --git a/po/lyx_pot.py b/po/lyx_pot.py
index 0fc7ee4..0fc3aca 100755
--- a/po/lyx_pot.py
+++ b/po/lyx_pot.py
@@ -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)

Reply via email to