Closed Bug 1247096 Opened 8 years ago Closed 6 years ago

Consider adding inline-l10n support for net_error.html

Categories

(Firefox OS Graveyard :: Gaia::L10n, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: zbraniecki, Unassigned)

Details

net_error.html in System Gaia is an example of a web page that cannot load remote resources.

In l10n.js we use <script> to embed all l10n resources next to stylesheets and JS code in the HTML header.

L20n.js does not have such feature. We need to figure out the path forward that doesn't require l10n.js to be maintained.
Stas, thoughts?
Flags: needinfo?(stas)
This is a very rare use case and perhaps it would be better serviced by a custom build of l20n.js which allows the developer to write the translation logic by themselves.

The idea would be to have a barebones build of l20n.js which includes DOM overlays and the rest of the HTML bindings code, but doesn't do anything automatically on launchtime.  document.l10n isn't created automatically and it doesn't look for <links> in the <head>.  Instead, the developer is responsible for creating a View instance manually in the app logic and feeds it with the right translation strings.

The reason why I'm suggesting this is that it helps us avoid creating a new API used for a rare use-case, which could be abused in scenarios where we wouldn't want it.  Instead, a more atomic version of l20n.js could be used here and also service other rare use-cases.
Flags: needinfo?(stas)
Same problem exists with tv_apps/smart-system/net_error.html of course.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.