Permalink
Browse files

Trim spaces at the end of data strings collected by xgettext.py

Closes #485
  • Loading branch information...
1 parent 5d29fb6 commit 58c8b66375b5b165fe6ad00237d00e5608737eb1 @dorkster dorkster committed Sep 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mods/fantasycore/languages/xgettext.py
View
4 mods/fantasycore/languages/xgettext.py
@@ -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():

0 comments on commit 58c8b66

Please sign in to comment.