Closed Bug 713881 Opened 11 years ago Closed 11 years ago

[traceback] App Submission broken for any non-en-US locale


( Graveyard :: Developer Pages, defect, P1)



(Not tracked)



(Reporter: cvan, Assigned: cvan)




Traceback (most recent call last):

  File "/data/www/
/core/handlers/", line 111, in get_response
    response =3D callback(request, *callback_args, **callback_kwargs)

  File "/data/www/",=
 line 102, in wrapper
    return f(*args, **kw)

  File "/data/www/",=
 line 94, in wrapper
    return f(*args, **kw)

  File "/data/www/
y", line 60, in wrapper
    return f(request, *args, webapp=3Dshow_webapp, **kwargs)

  File "/data/www/
y", line 29, in wrapper
    return f(request, addon, *args, **kw)

  File "/data/www/",=
 line 28, in wrapper
    return func(request, *args, **kw)

  File "/data/www/
y", line 42, in wrapper
    return fun()

  File "/data/www/
y", line 26, in <lambda>
    *args, **kw)

  File "/data/www/", l=
ine 1335, in wrapper
    return f(request, *args, **kw)

  File "/data/www/", l=
ine 1487, in submit_describe
    'step': step, 'webapp': addon.is_webapp()})

  File "/data/www/", line 80, in render
    rendered =3D render_to_string(request, template, context)

  File "/data/www/", line 98, in render_to_string
    return template.render(**get_context())

  File "/usr/lib64/python2.6/site-packages/jinja2/", line 891=
, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/
vhub/addons/submit/describe.html", line 2, in top-level template code
    {% extends "devhub/addons/submit/base.html" %}

  File "/data/www/
vhub/addons/submit/base.html", line 6, in top-level template code
    {% set title =3D _('Submit a New Add-on') %}

  File "/data/www/
vhub/base.html", line 51, in top-level template code
    {% set hide_mobile_link=3DTrue %}

  File "/data/www/", li=
ne 108, in top-level template code
    {% block main_content %}

  File "/data/www/", li=
ne 111, in block "main_content"
    {% block content %}{% endblock %}

  File "/data/www/
vhub/addons/submit/base.html", line 23, in block "content"
    {% block primary %}{% endblock %}

  File "/data/www/
vhub/addons/submit/describe.html", line 51, in block "primary"
    {{ select_cats(amo.MAX_CATEGORIES, form, webapp) }}

  File "/data/www/
vhub/includes/macros.html", line 70, in template
    max)|f(max)|safe }}

  File "/data/www/", line 25, in f
    return string.format(*args, **kwargs)

IndexError: tuple index out of range

I cannot reproduce this issue locally. I have no idea how the locales got wonked up, but the localized strings for this `ngettext` call ("Select <b>up to {0}</b> categories for this app:") appear to be missing the `{0}`, ultimately making the string interpolation impossible.
Closed: 11 years ago
Resolution: --- → FIXED
In bug 710552, we turned off locale detection. So accessing the submission page from any locale, just redirects to en-US.
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.