gecko/b2g
Gaia Pushbot f8aba5da46 Bumping gaia.json for 2 gaia-central revision(s)
========

https://hg.mozilla.org/integration/gaia-central/rev/9621115bda40
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Merge pull request #10709 from fabi1cazenave/l10nOptim-bug853933

Bug 853933 - Don't inline all locales as JSON in the HTML, r=ochameau

========

https://hg.mozilla.org/integration/gaia-central/rev/cf0c69f54763
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Bug 853933 - Don't inline all locales as JSON in the HTML

Currently, in order to ensure that apps are translated before first paint, all l10n resources are included as one multi-locales JSON dictionary, which is serialized in an inline `<script>` element for each HTML document.  This works fine when shipping few locales, but it can increase the document size quite badly for 60+ locales, thus delaying the startup time very significantly.

This patch allows to support 60+ locales more easily by having:
* one minimal JSON dictionary per locale in each HTML file;
* one extensive JSON dictionary per locale in each webapp.

The inline JSON dictionary is split on a per-locale basis (= one `<script>` node per supported locale) and only contains the l10n strings that are required to translate the HTML document: the "startup cost" of each locale becomes neglectable, and it removes the risk of high RAM consumption when parsing a giant multi-locale JSON at startup.

All l10n resources that are not declared in the HTML document are concatenated in a single JSON dictionary per locale: this reduces the number of disk I/O to load l10n resources and does not increase the total disk size of each webapp.  To enable this, this patch implements a `{{locale}}` quasi-litteral in the HTML markup that is used to declare l10n resources:
  <link rel="prefetch" type="application/l10n" href="/{{locale}}.json" />
where `{{locale}}` is replaced by the value of `navigator.language`.

Note that this latter optimization is only interesting for apps that wait for the `localized` event to start. With the inline JSON dictionary for the declarative content and the `mozL10n.localize()` method, most apps could probably stop waiting for this `localized` event now.
2013-07-04 06:40:22 -07:00
..
app Backout Bug 863398 for causing Bug 887519 2013-06-26 16:24:23 -07:00
branding Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
chrome Bug 882506 - Remove useless nsBrowserAccess in shell.js r=vingtetun 2013-07-01 09:18:07 -07:00
components Merge inbound and m-c. 2013-07-03 14:04:16 -04:00
config Bumping gaia.json for 2 gaia-central revision(s) 2013-07-04 06:40:22 -07:00
gaia Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey CLOSED TREE 2013-04-23 17:54:15 -04:00
installer Bug 883024 - Install missing stylesheets for b2g. r=roc 2013-06-27 17:50:30 +08:00
locales Merge m-c to inbound. 2013-04-02 09:53:48 -04:00
test Bug 879666 - Upload new emulator to TBPL, a=test-only 2013-06-06 15:19:33 -07:00
app.mozbuild Bug 784841 - Part 20: Fixes to support building external projects; r=glandium 2013-02-28 12:56:40 +01:00
build.mk Bug 784841 - Part 18b: Convert /b2g; r=ted f=Ms2ger 2013-02-25 12:47:17 -08:00
confvars.sh Bug 888409 - Set b2g version to 1.2.0.0 for master. r=akeybl 2013-07-02 08:18:04 -04:00
LICENSE Bug 759095 - upgrade license to MPL 2, and other licensing cleanups. 2012-05-29 16:52:43 +01:00
Makefile.in Bug 784841 - Part 18b: Convert /b2g; r=ted f=Ms2ger 2013-02-25 12:47:17 -08:00
moz.build Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00