Closed
Bug 891376
Opened 12 years ago
Closed 12 years ago
Submitting an app using a locale not in the manifest results in a nameless app
Categories
(Marketplace Graveyard :: Developer Pages, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
2013-07-25
People
(Reporter: mat, Assigned: mat)
References
Details
Steps to reproduce:
- Create a new test app using http://testpackagedapp.appspot.com/
- Verify that the manifest inside the .zip file has translations for the name
of the app in a couple languages but not for the 'fr' locale.
- Using the developer pages in 'fr' (add ?lang=fr or change your browser
settings to prefer french), submit your app.
- Notice that the app has no name in the submission process, the developer pages once the submission is done, and the reviewer pages, as long as you stay in french
- Once you switch to english everything works fine.
Initial investigation results: It's NOT bug 836147 (the locale is supported), not bug 888831 (We don't use the call_unless_empty macro here) and not bug 835407 either.
Looking in the database, I can only find an 'en-US' Translation for the name, and that's it. I expected to find a Translation for 'fr' with an empty string (which would have been a bug too, just a different kind :) but no. Even weirder is the fact that the Translations in other languages specified in the manifest aren't present either!
You can see the nameless app in action on -dev : https://marketplace-dev.allizom.org/developers/app/trapourin-bagrar-broardbasp/edit
Comment 1•12 years ago
|
||
in the test app I note that the 'default locale' setting for the app is French. Although the manifest itself mentions French no-where.
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mpillard
Assignee | ||
Comment 2•12 years ago
|
||
So, here is what happens:
- The default_locale is used as the fallback. Because I was submitting in french, the default_locale we store in the marketplace gets set to french. This causes the nameless part because it has no 'fr' translation.
- The fact that there was only one translation in the db for the name is caused by a different issue, that's tracked in bug 893855
Assignee | ||
Comment 3•12 years ago
|
||
Setting the default_locale for an app follows an interesting path:
- When submitting, we parse the manifest. This happens in files/utils.py, in WebAppParser.parse().
- This picks up the default_locale from the manifest, with a fallback on translation.get_language()
- But then, in addons/models.py, if the locale we picked up is the same as settings.LANGUAGE_CODE (i.e., it's 'en-US'), default_locale is overridden with translation.get_language() again!
Assignee | ||
Updated•12 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•12 years ago
|
||
This is fixed in https://github.com/mozilla/zamboni/commit/0afc211cee97e07a7b7aa43c534817f5405c9385
See initial description for STR for testing on -dev. It's important to make sure the site is translated in any language not present in the manifest for the whole duration of the submission. To verify it's FIXED, in the details step, instead of noticing your app is nameless, you should see a name :-)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-07-25
Comment 5•12 years ago
|
||
Verified as fixed : http://screencast.com/t/UuVe8xGKB3fb
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•