Closed
Bug 988376
Opened 10 years ago
Closed 9 years ago
Always add the en-US locale fallback for translations
Categories
(addons.mozilla.org Graveyard :: Code Quality, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: magopian, Assigned: magopian)
References
Details
(Whiteboard: [repoman])
This bug has been created following a failed implementation attempt to solve https://bugzilla.mozilla.org/show_bug.cgi?id=983749 (PR https://github.com/mozilla/olympia/pull/18). The issue is that when you want a "last chance fallback" that returns just any translation regardless of its locale, you need to do a "LEFT OUTER JOIN" without "ANDing" on the locale, obviously, but that generates duplicates (one for each translation found for the given field). A simple way to remove those duplicates would be to add a "GROUP BY" to the query, but this is very heavy for the database and would hinder the performance. This is thus a first step towards the locale priorization for translations, without the "last chance fallback": Here's the desired behavior: 1/ select the translation for the current language, if it exists 2/ otherwise fallback to the model's fallback language (if it has a "get_fallback()" method), if it exists 3/ otherwise fallback to the "en-US" (settings's default), if it exists
Assignee | ||
Comment 1•10 years ago
|
||
PR: https://github.com/mozilla/olympia/pull/21
Updated•10 years ago
|
Whiteboard: [repoman]
Assignee | ||
Comment 2•9 years ago
|
||
Closing this as wontfix, see the PR for comments.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•