[wmlunits] Don't store translations which are the same.

This commit is contained in:
Allefant 2014-01-19 21:32:19 +01:00
parent ed4fe91b44
commit db98a2af1c
2 changed files with 5 additions and 6 deletions

View file

@ -1169,7 +1169,6 @@ def html_postprocess_file(filename, isocode, batchlist):
else:
eids[1].append(e)
for i in xrange(2):
eras = eids[i]
eras.sort(key = lambda x: x[2])

View file

@ -102,17 +102,17 @@ def list_contents():
info[-1]["name"] = name
info[-1]["units"] = "?"
info[-1]["translations"] = {}
info[-1]["translations"] = {}
for isocode in languages:
translation = html_output.Translation(options.transdir, isocode)
def translate(string, domain):
return translation.translate(string, domain)
if c:
info[-1]["translations"][isocode] = c.get_text_val("name",
translation = translate)
t = c.get_text_val("name", translation = translate)
else:
info[-1]["translations"][isocode] = translate(name, domain)
t = translate(name, domain)
if t != info[-1]["name"]:
info[-1]["translations"][isocode] = t
def list_eras(addon):
eras = local.wesnoth.parser.get_all(tag = "era")