Skip to content

Commit

Permalink
l10n fix: don't localize number delimiter and other special chars if …
Browse files Browse the repository at this point in the history
…enableNumLocale=False
  • Loading branch information
ilius committed Jan 15, 2014
1 parent 9d10a77 commit 0ee3468
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions scal2/locale_man.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ def numEncode(num, mode=None, fillZero=0, negEnd=False):
res = u''
for c in unicode(abs(num)):
if c==u'.':
res += tr('.')
if enableNumLocale:
c = tr('.')
res += c
else:
res += dig[int(c)]
if fillZero>0:
Expand Down Expand Up @@ -273,12 +275,13 @@ def textNumEncode(st, mode=None, changeSpecialChars=True, changeDot=False):
try:
i = int(c)
except:
if c in (',', '_'):## FIXME
if changeSpecialChars:
c = tr(c)
elif c=='.':## FIXME
if changeDot:
c = tr(c)
if enableNumLocale:
if c in (',', '_', '%'):## FIXME
if changeSpecialChars:
c = tr(c)
elif c=='.':## FIXME
if changeDot:
c = tr(c)
res += c
else:
res += dig[i]
Expand Down

0 comments on commit 0ee3468

Please sign in to comment.