commit ba8c5bb5112cdeaea507a46cb144c17c12cd5caf
Author: Georg Baum <[email protected]>
Date:   Thu Mar 6 22:00:12 2014 +0100

    Remove context also for translated strings
    
    This is consistent with the treatment in LyX itself (cleanTranslation() is
    also called on the translated strings), and some translators leave the 
context
    in the translated msgstr (e.g. [[List of Listings]]), although that is not
    recommended. Without this, lib/layouttranslations would contain wrong
    translations.

diff --git a/po/lyx_pot.py b/po/lyx_pot.py
index 769fe21..b6f97dc 100755
--- a/po/lyx_pot.py
+++ b/po/lyx_pot.py
@@ -404,6 +404,9 @@ def layouts_l10n(input_files, output, base, 
layouttranslations):
             for key in keys:
                 if key in trans.keys():
                     val = trans[key].replace('\\', '\\\\').replace('"', '\\"')
+                    res = ContextRe.search(val)
+                    if res != None:
+                        val = res.group(1)
                     key = key.replace('\\', '\\\\').replace('"', '\\"')
                     print >> out, '\t"%s" "%s"' % \
                              (key.encode('utf-8'), val.encode('utf-8'))

Reply via email to