Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

gettext() issue #15

Open
mzabuawala opened this issue Apr 7, 2018 · 0 comments
Open

gettext() issue #15

mzabuawala opened this issue Apr 7, 2018 · 0 comments

Comments

@mzabuawala
Copy link

I am using flask_babelex module to translate strings in my project earlier I was using flask_babel but with Flask-Security 3.0 it comes pre-bundled and was causing conflicts with flask_babel. So I removed flask_babel and decided to use flask_babelex but it was throwing error, The given scenario below is for English to Japanese translation:

Here is the actual string:

     gettext(
         'The font size to use for the SQL text boxes and editors. '
         'The value specified is in "em" units, in which 1 is the  '
         'default relative font size. For example, to increase the '
         'font size by 20 percent use a value of 1.2, or to reduce '
         'by 20 percent, use a value of 0.8. Minimum 0.1, maximum 10.'
     )

It fails at: ../venv/lib/python3.6/site-packages/flask_babelex/__init__.py +534

with the following error:

File "/Users/admin/Documents/projects/venv/lib/python3.6/site-packages/flask_babelex/__init__.py", line 623, in gettext
   return get_domain().gettext(*args, **kwargs)
 File "/Users/admin/Documents/projects/venv/lib/python3.6/site-packages/flask_babelex/__init__.py", line 534, in gettext
   return t.ugettext(string) % variables

ValueError: unsupported format character '?' (0x5927) at index 70

Screenshot: https://i.stack.imgur.com/dEIHk.png

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant