Ticket #1104 (closed defect: fixed)

Opened 4 years ago

Last modified 1 week ago

No Yiddish (yi) i18n

Reported by: mgaiman Assigned to: 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

09/10/06 07:52:34 changed 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.

09/23/06 22:37:17 changed 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.

01/12/07 06:27:59 changed by alberto

  • milestone changed from 1.0 to 1.1.

03/28/07 12:42:15 changed by alberto

  • milestone changed from 1.1 to __unclassified__.

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

08/28/08 17:58:25 changed 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.

08/26/10 18:11:22 changed by chrisz

  • milestone changed from __unclassified__ to 1.0.x bugfix.