Skip to content

Commit

Permalink
Merge pull request #975 from dorkster/bugfixes
Browse files Browse the repository at this point in the history
Trim spaces at the end of data strings collected by xgettext.py
  • Loading branch information
clintbellanger committed Sep 15, 2012
2 parents 5d29fb6 + 58c8b66 commit 32d6f69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/fantasycore/languages/xgettext.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def extract(filename):
aString += str(i+1) aString += str(i+1)
comments.append(aString) comments.append(aString)
del 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} # handle the special case: bonus={stat},{value}
if line.startswith('bonus='): if line.startswith('bonus='):
aString = filename aString = filename
aString += ':' aString += ':'
aString += str(i+1) aString += str(i+1)
comments.append(aString) comments.append(aString)
del 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) # this removes duplicates from keys in a clean way (without screwing up the order)
def remove_duplicates(): def remove_duplicates():
Expand Down

0 comments on commit 32d6f69

Please sign in to comment.