VulpesOS/gaia/apps/email/js/l10n.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

25 lines
787 B
JavaScript
Executable file

'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);
});
});
}
});