Small fixes for the translation util

This commit is contained in:
Tomas Groth 2015-03-10 23:47:17 +00:00
parent 8fe254e576
commit 7ac79f0ede
1 changed files with 4 additions and 6 deletions

View File

@ -300,7 +300,7 @@ def check_format_strings():
This method runs through the ts-files and looks for mismatches between format strings in the original text This method runs through the ts-files and looks for mismatches between format strings in the original text
and in the translations. and in the translations.
""" """
path = os.path.join(os.path.abspath('..'), 'resources', 'i18n', 'da.ts') path = os.path.join(os.path.abspath('..'), 'resources', 'i18n', '*.ts')
file_list = glob.glob(path) file_list = glob.glob(path)
for filename in file_list: for filename in file_list:
print_quiet('Checking %s' % filename) print_quiet('Checking %s' % filename)
@ -312,8 +312,6 @@ def check_format_strings():
line = tag.location.get('line') line = tag.location.get('line')
org_text = tag.source.text org_text = tag.source.text
translation = tag.translation.text translation = tag.translation.text
#org_text = "".join([x for x in tag.source.xpath('text()')]) #tag.source.text
#translation = "".join([x for x in tag.translation.xpath('text()')]) # tag.translation.text
if not translation: if not translation:
for num in tag.iter('numerusform'): for num in tag.iter('numerusform'):
print_verbose('parsed numerusform: location: %s, source: %s, translation: %s' % ( print_verbose('parsed numerusform: location: %s, source: %s, translation: %s' % (