Closed
Bug 632547
Opened 13 years ago
Closed 13 years ago
[traceback] SyntaxError: invalid syntax
Categories
(support.mozilla.org :: Localization, task)
support.mozilla.org
Localization
Tracking
(Not tracked)
VERIFIED
FIXED
2.5
People
(Reporter: stephend, Assigned: smolejv)
References
()
Details
Attachments
(1 file)
109.04 KB,
text/x-po
|
Details |
https://master.support.mozilla.com/sl/jsi18n//build:fe2f998 throws a traceback: Traceback (most recent call last): File "/data/www/support.allizom.org/kitsune/vendor/src/django/django/core/handlers/base.py", line 100, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/www/support.allizom.org/kitsune/vendor/src/django/django/utils/decorators.py", line 76, in _wrapped_view response = view_func(request, *args, **kwargs) File "/data/www/support.allizom.org/kitsune/vendor/src/django/django/views/i18n.py", line 219, in javascript_catalog catalog = gettext_module.translation(domain, path, [locale]) File "/usr/lib64/python2.6/gettext.py", line 480, in translation t = _translations.setdefault(key, class_(open(mofile, 'rb'))) File "/usr/lib64/python2.6/gettext.py", line 180, in __init__ self._parse(fp) File "/usr/lib64/python2.6/gettext.py", line 317, in _parse self.plural = c2py(plural) File "/usr/lib64/python2.6/gettext.py", line 126, in c2py return eval('lambda n: int(%s)' % plural) File "<string>", line 1 lambda n: int((n%100==1. 0 : n%100==2. 1 : n%100==3 or n%100==4. 2 : 3)) ^ SyntaxError: invalid syntax
Reporter | ||
Comment 1•13 years ago
|
||
Hi Vito; mind taking a look at this? Thanks!
Assignee | ||
Comment 2•13 years ago
|
||
The question marks have miracously changed into periods; the statement should instead of lambda n: int((n%100==1. 0 : n%100==2. 1 : n%100==3 or n%100==4. 2 : 3)) read like lambda n: int((n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 or n%100==4 ? 2 : 3)) I am attaching the correct messages.po file - there was already trouble once with this same sentence. I have evidently corrected it to the worse. Sorry for extra work! I will also upload a changed file into Verbatim, so that it will come down the pipeline without this error. Regards Vito
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•13 years ago
|
||
here's the messages.po file, corrected for the "period-instead-of-?" error: "Content-Transfer-Encoding: 8bit\n" ""Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"" "X-Generator: Pootle 2.1.5\n"
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → smolejv
Comment 4•13 years ago
|
||
Vito, Kadir, can we please get this fixed today before our release?
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 5•13 years ago
|
||
Oops, did not mean to resolve.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•13 years ago
|
||
Hey Vito, was there an issue with checking-in into Verbatim? I'll need to do that now on my end, since we are pushing the new version today. I hope that it doesn't break anything with your tools. But let me know please if it does, and we can talk about how to avoid that in the future.
Comment 7•13 years ago
|
||
Now we're getting "ValueError: plural forms expression error, maybe unbalanced parenthesis" errors again.
Comment 8•13 years ago
|
||
fixed, hopefully: r82649
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Comment 9•13 years ago
|
||
Ah, perhaps we were unclear: This is coming from javascript.po, not messages.po.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 10•13 years ago
|
||
r82650
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 11•13 years ago
|
||
Verified FIXED on https://support.allizom.org/sl/jsi18n/
Status: RESOLVED → VERIFIED
Target Milestone: --- → 2.5
Comment 12•13 years ago
|
||
r82649 broke messages.po. Fixed in r82651.
You need to log in
before you can comment on or make changes to this bug.
Description
•