Adde extended translation-mark checking and fixed some bugs it found.
This commit is contained in:
parent
727f8d6116
commit
9c7005d08d
7 changed files with 20 additions and 10 deletions
|
@ -88,7 +88,7 @@
|
|||
[modifications]
|
||||
[trait]
|
||||
id=loyal
|
||||
male_name= _ "loyal"
|
||||
name= _ "loyal"
|
||||
description= _ "to himself"
|
||||
[effect]
|
||||
apply_to=loyal
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
[label]
|
||||
x,y=16,28
|
||||
text="Elensefar"
|
||||
text= _ "Elensefar"
|
||||
[/label]
|
||||
|
||||
{BIGMAP_SIEGE_OF_ELENSEFAR}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
[label]
|
||||
x,y=9,1
|
||||
text="Dallben"
|
||||
text= _ "Dallben"
|
||||
[/label]
|
||||
|
||||
[story]
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
|
||||
[label]
|
||||
x,y=16,15
|
||||
text="Elensefar"
|
||||
text= _ "Elensefar"
|
||||
[/label]
|
||||
|
||||
[label]
|
||||
x,y=8,13
|
||||
text="Port of Elensefar"
|
||||
text= _ "Port of Elensefar"
|
||||
[/label]
|
||||
|
||||
[story]
|
||||
|
|
|
@ -409,7 +409,7 @@
|
|||
[/filter]
|
||||
[message]
|
||||
speaker=narrator
|
||||
caption=Thursagan
|
||||
caption=_"Thursagan"
|
||||
image=portraits/thursagan.png
|
||||
message= _ "Go away, you birds! Or I shall burn you out of the air!"
|
||||
[/message]
|
||||
|
|
|
@ -277,7 +277,7 @@
|
|||
|
||||
[message]
|
||||
speaker=narrator
|
||||
caption=Garak
|
||||
caption=_ "Garak"
|
||||
image=portraits/garak.png
|
||||
message= _ "Do you see that brown spot sticking up on the northern horizon? That's Pinnacle Rock. It's the highest land for miles around, and has a spring at its base, or did the last time I camped there. If we make it to Pinnacle Rock we will be just a few miles from the edge of the mountains."
|
||||
[/message]
|
||||
|
|
|
@ -741,11 +741,18 @@ def sanity_check(filename, lines):
|
|||
has_tr_mark = value.lstrip().startswith("_")
|
||||
if key == 'role':
|
||||
present.append(value)
|
||||
if key == "speaker" and has_tr_mark:
|
||||
elif key.startswith("#"): # FIXME: parse_attribute is confused.
|
||||
pass
|
||||
elif key == 'letter': # May be led with _s for void
|
||||
pass
|
||||
elif key == 'name': # FIXME: check this someday
|
||||
pass
|
||||
elif key == "speaker" and has_tr_mark:
|
||||
print '"%s", line %d: %s should not have translation mark' \
|
||||
% (filename, i+1, key)
|
||||
elif key in ("message", "user_description") and not value.startswith("$") and not has_tr_mark:
|
||||
print '"%s", line %d: %s needs translation mark' \
|
||||
elif key in ("message", "user_description", "story", "note", "text", "summary", "caption", "label", "unit_description") and not value.startswith("$"):
|
||||
if not has_tr_mark:
|
||||
print '"%s", line %d: %s needs translation mark' \
|
||||
% (filename, i+1, key)
|
||||
elif key == "description":
|
||||
if (in_trait or in_objective) and not has_tr_mark:
|
||||
|
@ -761,6 +768,9 @@ def sanity_check(filename, lines):
|
|||
elif not in_objective and value not in present:
|
||||
print '"%s", line %d: unknown \'%s\' referred to by description' \
|
||||
% (filename, i+1, value)
|
||||
elif has_tr_mark:
|
||||
print '"%s", line %d: %s has translation mark: correct?' \
|
||||
% (filename, i+1, key)
|
||||
except TypeError:
|
||||
pass
|
||||
# Interpret magic comments for setting the sage pattern of units.
|
||||
|
|
Loading…
Add table
Reference in a new issue