diff -r 5526d64e6def webtranslate/newgrf/language_file.py
--- a/webtranslate/newgrf/language_file.py Mon May 25 17:14:35 2015 +0200
+++ b/webtranslate/newgrf/language_file.py Mon May 25 17:59:35 2015 +0200
@@ -420,7 +420,7 @@
@type plurals: C{list} of C{int}
@ivar commands: String commands at each position.
- @type commands: C{list} of C{ParameterInfo}
+ @type commands: C{list} of L{ParameterInfo}
@ivar non_positionals: Mapping of commands without position to their count.
@type non_positionals: C{dict} of C{str} to C{int}
@@ -614,8 +614,7 @@
ok = True
for pos, cmd in enumerate(self.commands):
if cmd is None:
- self.add_error(ErrorMessage(ERROR, None, "String parameter {} has no string command".format(pos)))
- ok = False
+ self.commands[pos] = project_type.SKIP_PARAMETER;
if ok:
for pos in self.plurals:
if pos < 0 or pos >= len(self.commands):
@@ -1034,6 +1033,8 @@
sc = project_type.NL_PARAMETER
elif name == '{':
sc = project_type.CURLY_PARAMETER
+ elif name == 'SKIP':
+ sc = project_type.SKIP_PARAMETER
else:
sc = projtype.text_commands.get(name)
if sc is None: return True
diff -r 5526d64e6def webtranslate/project_type.py
--- a/webtranslate/project_type.py Mon May 25 17:14:35 2015 +0200
+++ b/webtranslate/project_type.py Mon May 25 17:59:35 2015 +0200
@@ -319,6 +319,7 @@
NL_PARAMETER = ParameterInfo("", False, False, False, False, False)
CURLY_PARAMETER = ParameterInfo("{", False, False, False, False, False)
+SKIP_PARAMETER = ParameterInfo("SKIP", True, False, False, False, False)
# Available project types, ordered by internal name.