mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 16:27:13 +03:00
Fix for English verification text.
This commit is contained in:
parent
ef75242291
commit
a1a1a17987
8
l10n.py
8
l10n.py
@ -38,7 +38,7 @@ class Translations:
|
||||
lang = Translations.FALLBACK
|
||||
|
||||
if lang not in self.available():
|
||||
__builtin__.__dict__['_'] = lambda x: unicode(x) # Promote strings to Unicode for consistency
|
||||
__builtin__.__dict__['_'] = lambda x: unicode(x).replace(u'{CR}', u'\n') # Promote strings to Unicode for consistency
|
||||
else:
|
||||
regexp = re.compile(r'\s*"([^"]+)"\s*=\s*"([^"]+)"\s*;\s*$')
|
||||
comment= re.compile(r'\s*/\*.*\*/\s*$')
|
||||
@ -56,12 +56,12 @@ class Translations:
|
||||
def translate(self, x):
|
||||
if not self.translations.get(x):
|
||||
print 'Missing translation: "%s"' % x
|
||||
return unicode(x)
|
||||
return unicode(x).replace(u'{CR}', u'\n')
|
||||
else:
|
||||
return self.translations.get(x) or unicode(x)
|
||||
return self.translations.get(x) or unicode(x).replace(u'{CR}', u'\n')
|
||||
else:
|
||||
def translate(self, x):
|
||||
return self.translations.get(x) or unicode(x)
|
||||
return self.translations.get(x) or unicode(x).replace(u'{CR}', u'\n')
|
||||
|
||||
# Returns list of available language codes
|
||||
def available(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user