mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 09:57:40 +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
|
lang = Translations.FALLBACK
|
||||||
|
|
||||||
if lang not in self.available():
|
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:
|
else:
|
||||||
regexp = re.compile(r'\s*"([^"]+)"\s*=\s*"([^"]+)"\s*;\s*$')
|
regexp = re.compile(r'\s*"([^"]+)"\s*=\s*"([^"]+)"\s*;\s*$')
|
||||||
comment= re.compile(r'\s*/\*.*\*/\s*$')
|
comment= re.compile(r'\s*/\*.*\*/\s*$')
|
||||||
@ -56,12 +56,12 @@ class Translations:
|
|||||||
def translate(self, x):
|
def translate(self, x):
|
||||||
if not self.translations.get(x):
|
if not self.translations.get(x):
|
||||||
print 'Missing translation: "%s"' % x
|
print 'Missing translation: "%s"' % x
|
||||||
return unicode(x)
|
return unicode(x).replace(u'{CR}', u'\n')
|
||||||
else:
|
else:
|
||||||
return self.translations.get(x) or unicode(x)
|
return self.translations.get(x) or unicode(x).replace(u'{CR}', u'\n')
|
||||||
else:
|
else:
|
||||||
def translate(self, x):
|
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
|
# Returns list of available language codes
|
||||||
def available(self):
|
def available(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user