Skip to content

Commit

Permalink
Trim spaces at the end of data strings collected by xgettext.py
Browse files Browse the repository at this point in the history
Closes #485
  • Loading branch information
dorkster committed Sep 15, 2012
1 parent 5d29fb6 commit 58c8b66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/fantasycore/languages/xgettext.py
Expand Up @@ -38,15 +38,15 @@ def extract(filename):
aString += str(i+1)
comments.append(aString)
del aString
keys.append(line[line.find('=') + 1:].strip('\n').replace("\"", "\\\""))
keys.append(line[line.find('=') + 1:].strip('\n').replace("\"", "\\\"").rstrip())
# handle the special case: bonus={stat},{value}
if line.startswith('bonus='):
aString = filename
aString += ':'
aString += str(i+1)
comments.append(aString)
del aString
keys.append(line[line.find('=') + 1: line.find(',')])
keys.append(line[line.find('=') + 1: line.find(',')].rstrip())

# this removes duplicates from keys in a clean way (without screwing up the order)
def remove_duplicates():
Expand Down

0 comments on commit 58c8b66

Please sign in to comment.