diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-11-30 11:02:19 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-11-30 11:02:19 (GMT) |
commit | cdc7cfd24f22245ed6b565f23db5717c88552b3b (patch) | |
tree | ee73ea7da7c53ed554243634a116270cef582c25 /mathlib.py | |
parent | 5acbca906319215efdd2b6d2a65760e22affcd9c (diff) |
i18n of help functions; not the final solution!
Diffstat (limited to 'mathlib.py')
-rw-r--r-- | mathlib.py | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -27,6 +27,7 @@ import logging _logger = logging.getLogger('MathLib') from gettext import gettext as _ +import locale class MathLib: ANGLE_DEG = math.pi/180 @@ -55,22 +56,20 @@ class MathLib: self.setup_i18n() def setup_i18n(self): + loc = locale.localeconv() + # The separator to mark thousands (default: ',') - self.thousand_sep = _('thousand_sep') - if self.thousand_sep == 'thousand_sep': - self.thousand_sep = ',' + self.thousand_sep = loc['thousands_sep'] # The separator to mark fractions (default: '.') - self.fraction_sep = _('fraction_sep') - if self.fraction_sep == 'fraction_sep': - self.fraction_sep = '.' + self.fraction_sep = loc['decimal_point'] - # The multiplication symbol (default: '*') + # TRANS: multiplication symbol (default: '*') self.mul_sym = _('mul_sym') if self.mul_sym == 'mul_sym': self.mul_sym = '*' - # The division symbol (default: '/') + # TRANS: division symbol (default: '/') self.div_sym = _('div_sym') if self.div_sym == 'div_sym': self.div_sym = '/' |