Closed Bug 923492 Opened 6 years ago Closed 2 years ago
[Gaia] Translate all pages for all locales
It would be helpful to pretranslate all html files for all apps into all languages. That would let us ship a phone with all locales for our dogfooder without having to think about it. Maybe this can be hidden behind a flag in the makefile. The attached patch will pre-translate all files into all languages. If you have 4 languages like en-US (default), fr-FR, ar, zh-TW then it will generate index.html (en-US default), index.fr-FR.html, index.ar.html and index.zh-TW.html. Now the patch has some issues since the files are not cleaned up afterward and it ends up generating new files again and again but this is unrelated to the technology used. So one needs to take this patch and fix it now Then Fabrice was suggesting to redirect automatically with some magic in the app:// protocol but we can also: - alter the app manifest at build time to generate a different launch_path based on the locale (thanks locale overidding!). - localize any <a href="foo.html"> so the href will be different based on the current locale. With this approach there is no need for a Gecko fix and nothing prevent us to experiment right now.
A next possible step would be to create a smart diff algorithm since the app are currently zip and zip compress per file afaik which is not helpful in our case.
I got some progress on my branch: https://github.com/zbraniecki/gaia/tree/master-bto It does create file.ab-CD.html per locale and package it properly. It also does not inline JSON at all. What's next Vivien? From what I understand, your idea is to use manifest to point to the right file, and we need to alter all the paths inside the HTML/JS to point to localized htmls. Does it make sense?
(In reply to Zbigniew Braniecki [:gandalf] from comment #2) > I got some progress on my branch: > https://github.com/zbraniecki/gaia/tree/master-bto > > It does create file.ab-CD.html per locale and package it properly. It also > does not inline JSON at all. > > What's next Vivien? > > From what I understand, your idea is to use manifest to point to the right > file, and we need to alter all the paths inside the HTML/JS to point to > localized htmls. > > Does it make sense? Yep that's what we want to do. For the JS I'm not a big fan of altering it during compilation. Is there some cases where some links are hardcoded into JS and are not extracted using the l10n API?
This is exciting stuff. Thanks guys.
Any news on that ?
removing ni on old bugs.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.