Closed
Bug 1129082
Opened 11 years ago
Closed 11 years ago
[discussion] Improvements to rendering of localized video URL's for the Hello product page
Categories
(www.mozilla.org :: L10N, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ckprice, Unassigned)
References
Details
Attachments
(2 files)
The Hello product page currently displays translated versions of the Hello video based on locale.
This bug is created to improve this implementation in terms of scalability and ease of maintenance, especially as more videos/locales are added.
References (current):
https://github.com/mozilla/bedrock/blob/2c8024b2a4d97d3d6831ff21620bb399b41afee3/bedrock/firefox/views.py#L502
https://github.com/mozilla/bedrock/blob/master/bedrock/firefox/templates/firefox/hello/index.html#L238
Options
1. Create bedrock function which reads fallback languages in headers and render accordingly
2. Embed video URL's in .lang files
3. Automatically ship the fallback locales in the .lang file e.g.
;locales
br,fr,en-US
4. Implement #3, then include the locales in data attributes to be read in with Javascript
Team to discuss with jgmize/pmac possible issues with headers and caching.
Comment 1•11 years ago
|
||
After a call with pmac and jgmize, we're thinking the best option is #0 - staying with the current system. All logic and data remain grouped together, no need to peek inside .lang files or do any client side processing. Submitting a PR/doing a push aren't barriers on the webdev side.
#1 - Would not be great in terms of caching.
#2 - No testing on dev or stage, but this would be the second best option.
#3 - Distribution of logic, clearer to keep mapping and video URLs in single location.
:flod & :pascalc - Are there any reasons we're missing on why staying with the current system is not desirable?
Comment 2•11 years ago
|
||
(In reply to Jon Petto [:jpetto] from comment #1)
> :flod & :pascalc - Are there any reasons we're missing on why staying with
> the current system is not desirable?
The problem is not opening PRs, it's waiting for the PR to move to production once merged.
To avoid delays, we need to setup as many locales as we can without waiting for the page to be completely localized. I'll try to dig up some data tomorrow from the current accept-languages, and match each locale to one available video. Leaving NI to myself to avoid forgetting.
Flags: needinfo?(francesco.lodolo)
Comment 3•11 years ago
|
||
This script reads accept_languages values from Transvision API, and try to find a match in the available localized videos.
Flags: needinfo?(francesco.lodolo)
Comment 4•11 years ago
|
||
Resulting array. Code will still need a default fallback to en-US, which we currently don't have
https://github.com/mozilla/bedrock/blob/d2071af4077c5c566e6a89a33357ca00f1ccdb27/bedrock/firefox/views.py#L487
| Reporter | ||
Comment 5•11 years ago
|
||
We're going to stay with the current setup per the reasons laid out in comment 1.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: Improvements to rendering of localized video URL's for the Hello product page → [discussion] Improvements to rendering of localized video URL's for the Hello product page
You need to log in
before you can comment on or make changes to this bug.
Description
•