The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 195df5765f368bba141135eb56914effa2af27c9
Author: Juergen Spitzmueller <[email protected]>
Date:   Tue Oct 9 07:25:35 2012 +0200

    Make textclass categories and descriptions translatable

diff --git a/po/lyx_pot.py b/po/lyx_pot.py
index 4ee9f55..aa678b8 100755
--- a/po/lyx_pot.py
+++ b/po/lyx_pot.py
@@ -78,6 +78,8 @@ def ui_l10n(input_files, output, base):
 
 def layouts_l10n(input_files, output, base, layouttranslations):
     '''Generate pot file from lib/layouts/*.{layout,inc,module}'''
+    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*$', re.IGNORECASE)
     # match LabelString, EndLabelString, LabelStringAppendix and maybe others 
but no comments
     LabelString = re.compile(r'^[^#]*LabelString\S*\s+(.*)\s*$', re.IGNORECASE)
@@ -174,6 +176,18 @@ def layouts_l10n(input_files, output, base, 
layouttranslations):
         lineno = 0
         for line in open(src).readlines():
             lineno += 1
+            res = ClassDescription.search(line)
+            if res != None:
+                string = res.group(2)
+                if not layouttranslations:
+                    writeString(out, src, base, lineno + 1, string)
+                continue
+            res = ClassCategory.search(line)
+            if res != None:
+                string = res.group(1)
+                if not layouttranslations:
+                    writeString(out, src, base, lineno + 1, string)
+                continue
             if readingDescription:
                 res = DescEnd.search(line)
                 if res != None:

-----------------------------------------------------------------------

Summary of changes:
 po/lyx_pot.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to