#113 formencode.api.set_stdtranslation stopped working in 1.2.3

closed-fixed
None
5
2011-08-30
2011-01-08
Juliusz Gonera
No

I use Pylons 1.0 and in environment.py I put:
formencode.api.set_stdtranslation(domain='FormEncode', languages=['pl'])
to get Polish messages.

It worked in 1.2.2 but stopped working in 1.2.3dev and I always get English messages.
I use uwsgi for deployment if that matters.

Sorry for the duplicate, please remove the one submitted by "nobody."

Discussion

1 2 > >> (Page 1 of 2)
  • Juliusz Gonera
    Juliusz Gonera
    2011-02-20

    • assigned_to: nobody --> ianbicking
     
  • Juliusz Gonera
    Juliusz Gonera
    2011-02-20

    The problem is that the official release (1.2.3dev) does not include the i18n directory at all!

     

  • Anonymous
    2011-03-29

    Also, on

    python setup.py compile_catalog

    there is an exception:

    python setup.py compile_catalog
    running compile_catalog
    83 of 115 messages (72%) translated in 'formencode/i18n/lt/LC_MESSAGES/FormEncode.po'
    compiling catalog 'formencode/i18n/lt/LC_MESSAGES/FormEncode.po' to 'formencode/i18n/lt/LC_MESSAGES/FormEncode.mo'
    82 of 115 messages (71%) translated in 'formencode/i18n/cs/LC_MESSAGES/FormEncode.po'
    Traceback (most recent call last):
    File "setup.py", line 40, in <module>
    tests_require=tests_require,
    File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
    File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
    File "/home/cezio/vpython26/lib/python2.6/site-packages/babel/messages/frontend.py", line 161, in run
    for message, errors in catalog.check():
    File "/home/cezio/vpython26/lib/python2.6/site-packages/babel/messages/catalog.py", line 598, in check
    errors = message.check(catalog=self)
    File "/home/cezio/vpython26/lib/python2.6/site-packages/babel/messages/catalog.py", line 125, in check
    checker(catalog, self)
    File "/home/cezio/vpython26/lib/python2.6/site-packages/babel/messages/checkers.py", line 63, in python_format
    _validate_format(msgid, msgstr)
    File "/home/cezio/vpython26/lib/python2.6/site-packages/babel/messages/checkers.py", line 132, in _validate_format
    raise ValueError('original string provided does not use string '
    ValueError: original string provided does not use string formatting

     
  • Juliusz Gonera
    Juliusz Gonera
    2011-03-29

    cezio, is this related to this bug in any way?

     
  • Juliusz Gonera
    Juliusz Gonera
    2011-03-29

    • assigned_to: ianbicking --> cito
     

  • Anonymous
    2011-03-29

    I propably did faster than thought. I should fill separate bug report, but I suspect that's the source of the missing translations.

    The offending message is from formencode/validators.py:783:

    782 # Double %'s, because this will be substituted twice:
    783 date_format=_('%%A, %%d %%B %%Y'),

    which fails to compile because of a bug in babel: http://babel.edgewall.org/ticket/150

     
  • Juliusz Gonera
    Juliusz Gonera
    2011-03-30

    The catalog compiles just fine on my machine (Babel==0.9.6).
    The problem probably lies in MANIFEST.in. I already commited a fix and I'm waiting for Ian's response.

     
  • Is this working for you now with 1.2.4?

     
  • Juliusz Gonera
    Juliusz Gonera
    2011-04-06

    Yes, it is. Do you still have problems?

     
  • I am not having problems. I just wanted to know if the bug can be closed.

     
1 2 > >> (Page 1 of 2)