Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1104 (closed defect: fixed)

Opened 11 years ago

Last modified 7 years ago

No Yiddish (yi) i18n

Reported by: mgaiman Owned by: anonymous
Priority: normal Milestone: 1.0.x bugfix
Component: Toolbox.admi18n Version: 0.9a5
Severity: normal Keywords:
Cc:

Description

Turbogears doesn't ship with internationalization support for yiddish. Believe it or not, we're actually getting errors in our production system because of this.

Specifically:

  File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in question
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/controllers.py", line 331, in expose
    output = database.run_with_transaction(
  File "<string>", line 5, in run_with_transaction
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/database.py", line 245, in so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/controllers.py", line 348, in <lambda>
    mapping, fragment, *args, **kw)))
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/controllers.py", line 372, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/errorhandling.py", line 71, in try_call
    return func(self, *args, **kw)
  File "<string>", line 3, in question
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/controllers.py", line 145, in validate
    kw[field] = validator.to_python(
  File "/usr/local/lib/python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/api.py", line 316, in to_python
    value = tp(value, state)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/validators.py", line 56, in _to_python
    value = format.parse_decimal(value)
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/i18n/format.py", line 165, in parse_decimal
    value = value.replace(get_group_format(locale), "")
  File "/usr/local/lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/i18n/format.py", line 109, in get_group_format
    return get(locale, "numericSymbols").get("group", ",")
AttributeError: 'NoneType' object has no attribute 'get'

From a user with an older version of Safari: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; yi) AppleWebKit?/85.8.5 (KHTML, like Gecko) Safari/85.8.1"

Change History

comment:1 Changed 11 years ago by godoy

Patches are welcome ;-)

Somebody that speaks / knows Yiddish can translate one of the files in turbogears/i18n/data/ and send it to me (please reference this ticket so that I know what it is about) or attach it here as a patch.

comment:2 Changed 11 years ago by jorge.vargas

  • Component changed from TurboGears to Toolbox.admi18n
  • Milestone set to 1.0

we add languages as demanded but shouldn't there be a default somewhere in the config so we default to it.

Even though I have never seen this it's not good that we're throwing AttributeError? on a prod. server.

comment:3 Changed 10 years ago by alberto

  • Milestone changed from 1.0 to 1.1

comment:4 Changed 10 years ago by alberto

  • Milestone changed from 1.1 to __unclassified__

Batch moved into unclassified from 1.1 to properly track progress on the later

comment:5 Changed 9 years ago by Chris Arndt

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r5296. i18n.format.parse_decimal was breaking when the locale was unknown, because i18n.format.get_group_format and i18n.format.get_decimal_format where not properly checking for None return value from i18n.format.get function.

comment:6 Changed 7 years ago by chrisz

  • Milestone changed from __unclassified__ to 1.0.x bugfix
Note: See TracTickets for help on using tickets.