X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2Flyx_pot.py;h=7d9a3fc164de325778fd1018a34f8e32cc36c976;hb=5261ae6a29aef4d517e83580f52e532c91f85a06;hp=94142d14dd761514f2c013f96877dbb98c75dd8b;hpb=c5ef7cfcc4cb9deb7faa587264490ff77f233e04;p=lyx.git diff --git a/po/lyx_pot.py b/po/lyx_pot.py index 94142d14dd..7d9a3fc164 100755 --- a/po/lyx_pot.py +++ b/po/lyx_pot.py @@ -91,6 +91,7 @@ def layouts_l10n(input_files, output, base, layouttranslations): NameRE = re.compile(r'^\s*#\s*\\DeclareLyXModule.*{(.*)}$', 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) DescBegin = re.compile(r'^\s*#DescriptionBegin\s*$', re.IGNORECASE) DescEnd = re.compile(r'^\s*#\s*DescriptionEnd\s*$', re.IGNORECASE) Category = re.compile(r'^\s*#\s*Category:\s+(.*\S)\s*$', re.IGNORECASE) @@ -287,6 +288,10 @@ def layouts_l10n(input_files, output, base, layouttranslations): #if not layouttranslations: # writeString(out, src, base, lineno, string) m = FlexCheck.search(string) + if m: + if not layouttranslations: + writeString(out, src, base, lineno, m.group(1)) + m = CaptionCheck.search(string) if m: if not layouttranslations: writeString(out, src, base, lineno, m.group(1)) @@ -567,7 +572,7 @@ def encodings_l10n(input_files, output, base): output = open(output, 'w') # assuming only one encodings file # Encoding utf8 utf8 "Unicode (utf8)" UTF-8 variable inputenc - reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)]+)"\s+[\w-]+\s+(fixed|variable)\s+\w+.*') + reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)]+)"\s+[\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*') input = open(input_files[0]) for lineno, line in enumerate(input.readlines()): if not line.startswith('Encoding'):