Skip to content

Commit

Permalink
Added optional parameter "optional-translatable" to some rare cases
Browse files Browse the repository at this point in the history
  • Loading branch information
macabeus authored and Elvish-Hunter committed Mar 22, 2016
1 parent a2f8d93 commit 98833e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/schema.cfg
Expand Up @@ -2,7 +2,7 @@
[schema]
identifier="re ^[a-zA-Z0-9_ ]+$"
symbol="re ^[A-Z][A-Z0-9_]*$"
string="re ^[ -~]+$"
string="re ^[^\x7f\x80]+$"
integer="re ^(\+|-)?[0-9]+$"
float="re ^(\+|-)?[0-9]+(\.[0-9]*)?$"
boolean="enum true,false,yes,no,on,off"
Expand Down Expand Up @@ -105,7 +105,7 @@
comment="optional string"
email="optional string"
ircuser="optional string"
name="required string"
name="required string optional-translatable"
wikiuser="optional string"
[/entry]
[female:unit_type]
Expand Down
2 changes: 1 addition & 1 deletion data/tools/wmlvalidator
Expand Up @@ -78,7 +78,7 @@ class Validator:
for match in matches:
if 'translatable' in attribute.optionals and match.is_translatable() == False:
self.validate_result_add(node.file, node.line, "Attribute [%s] %s" % (verbosename, attribute.name), "Value is translatable, but haven't _ at the beginning")
elif 'translatable' not in attribute.optionals and match.is_translatable() == True:
elif 'translatable' not in attribute.optionals and 'optional-translatable' not in attribute.optionals and match.is_translatable() == True:
self.validate_result_add(node.file, node.line, "Attribute [%s] %s" % (verbosename, attribute.name), "Value isn't translatable, but have a _ at the beginning")

if 'list' in attribute.optionals:
Expand Down

0 comments on commit 98833e2

Please sign in to comment.