keys.append(key)
keys.sort()
+ ContextRe = re.compile(r'(.*)(\[\[.*\]\])')
+
print >> out, '''# This file has been automatically generated by po/lyx_pot.py.
# PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to regenerate
# this file from the translations, run `make ../lib/layouttranslations' in po.
# also print untranslated entries to help translators
elif not lang in oldlanguages:
key = key.replace('\\', '\\\\').replace('"', '\\"')
+ res = ContextRe.search(key)
+ if res != None:
+ val = res.group(1)
+ else:
+ val = key
print >> out, '\t"%s" "%s"' % \
- (key.encode('utf-8'), key.encode('utf-8'))
+ (key.encode('utf-8'), val.encode('utf-8'))
print >> out, 'End'
out.close()