Closed Bug 776214 Opened 12 years ago Closed 12 years ago

Accessing the Albanian locale result in Internal Server Error

Categories

(developer.mozilla.org Graveyard :: Localization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: teoli, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Firefox/17.0 Build ID: 20120719030543 Steps to reproduce: Went to: https://developer-new.mozilla.org/sq/ (Albanian home page) Actual results: Got an Internal Server Error Expected results: Should have been redirected to the en-US home page (as it is a valid locale). Or at least to a regular 404 page (usual behavior w/ a non-valid locale string).
Thanks for reporting this, Jean-Yves! I cannot reproduce, either by clicking the link above or by using the dropdown manually.
I still get the problem. I've attached the headers of the request and the response as an image.
Blocks: 773295
This looks like an issue with localized strings in kuma/apps/landing/templates/home.html Specifically, I'm guessing the string "{username}". I think this will need to be fixed in Verbatim, and not necessarily something we can easily fix in site code. Traceback (most recent call last): File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/handlers/base.py", line 100, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/www/developer.mozilla.org/kuma/apps/landing/views.py", line 34, in home 'demos': demos, 'updates': updates, 'tweets': tweets}) File "/data/www/developer.mozilla.org/kuma/vendor/src/jingo/jingo/__init__.py", line 78, in render rendered = render_to_string(request, template, context) File "/data/www/developer.mozilla.org/kuma/vendor/src/jingo/jingo/__init__.py", line 96, in render_to_string return template.render(**get_context()) File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render return self.environment.handle_exception(exc_info, True) File "/data/www/developer.mozilla.org/kuma/apps/landing/templates/landing/home.html", line 11, in top-level template code {% set scripts = ('mdn_home',) %} File "/data/www/developer.mozilla.org/kuma/templates/base.html", line 136, in top-level template code {% include "includes/login.html" %} File "/data/www/developer.mozilla.org/kuma/templates/includes/login.html", line 5, in top-level template code <li><a href="{{ url('devmo.views.profile_view', username=username) }}">{{ _('{username}') | f(username=username) }}</a></li> File "/data/www/developer.mozilla.org/kuma/vendor/src/jingo/jingo/helpers.py", line 25, in f return string.format(*args, **kwargs) KeyError: u'em\xebr p\xebrdoruesi'
For example: http://viewvc.svn.mozilla.org/vc/projects/mdn/trunk/locale/sq/LC_MESSAGES/messages.po?view=markup#l6675 6675 #: templates/includes/login.html:5 6676 msgid "{username}" 6677 msgstr "{emër përdoruesi}" Basically, anything inside {...} should *not* be localized. I could probably fix that myself with an svn commit, but I suspect Verbatim may turn around and undo that.
Jean-Yves, Sheppy: It looks like this does not require development work, as the problem is due to variables being localized when they should not have (see comment 5). Would you be able to help fix this? Let me know if you have any questions.
Blocks: 779532
No longer blocks: 773295
I know nothing about localizing stuff outside the wiki, and don't know who does. I assume someone does. :)
Jean-Yves: Would you be able to fix this? I'm not familiar with Verbatim. I think lines 6675-6677 of the following file need to be removed. http://viewvc.svn.mozilla.org/vc/projects/mdn/trunk/locale/sq/LC_MESSAGES/messages.po?view=markup#l6675
I just did it. I will check in a few days if my suggestions have been accepted (I can only make suggestions).
Component: Docs Platform → Localization
Suggestions accepted, Web site working now :-)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Version: Kuma → unspecified
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: