Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
25
gaia/apps/email/js/l10n.js
Executable file
25
gaia/apps/email/js/l10n.js
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
define({
|
||||
load: function(id, require, onload, config) {
|
||||
if (config.isBuild) {
|
||||
return onload();
|
||||
}
|
||||
|
||||
require(['l10nbase'], function() {
|
||||
navigator.mozL10n.once(function() {
|
||||
// The html cache restore in html_cache_restore could have set the ltr
|
||||
// direction incorrectly. If the language goes from an RTL one to a LTR
|
||||
// one while the app is closed, this could lead to a stale value.
|
||||
var dir = navigator.mozL10n.language.direction,
|
||||
htmlNode = document.querySelector('html');
|
||||
|
||||
if (htmlNode.getAttribute('dir') !== dir) {
|
||||
console.log('email l10n updating html dir to ' + dir);
|
||||
htmlNode.setAttribute('dir', dir);
|
||||
}
|
||||
|
||||
onload(navigator.mozL10n);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Reference in a new issue