i18n for argument strings

This commit is contained in:
Juergen Spitzmueller 2012-11-23 14:50:52 +01:00
parent 9914f21bce
commit 29d48665fa

View File

@ -83,6 +83,7 @@ def layouts_l10n(input_files, output, base, layouttranslations):
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)
Tooltip = re.compile(r'^[^#]*Tooltip\S*\s+(.*)\s*$', re.IGNORECASE)
GuiName = re.compile(r'^\s*GuiName\s+(.*)\s*$', re.IGNORECASE)
ListName = re.compile(r'^\s*ListName\s+(.*)\s*$', re.IGNORECASE)
CategoryName = re.compile(r'^\s*Category\s+(.*)\s*$', re.IGNORECASE)
@ -236,6 +237,12 @@ def layouts_l10n(input_files, output, base, layouttranslations):
writeString(out, src, base, lineno, string)
continue
res = LabelString.search(line)
if res != None:
string = res.group(1)
if not layouttranslations:
writeString(out, src, base, lineno, string)
continue
res = Tooltip.search(line)
if res != None:
string = res.group(1)
if not layouttranslations: