Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/utils.js

Issue 29569649: Issue 4580 - Replace ext.i18n with i18n (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Update adblockplusui dependency again Created Oct. 10, 2017, 4:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/notificationHelper.js ('k') | stats.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utils.js
===================================================================
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -16,17 +16,17 @@
*/
"use strict";
let Utils = exports.Utils = {
systemPrincipal: null,
getString(id)
{
- return ext.i18n.getMessage("global_" + id);
+ return chrome.i18n.getMessage("global_" + id);
},
runAsync(callback)
{
if (document.readyState == "loading")
{
// Make sure to not run asynchronous actions before all
// scripts loaded. This caused issues on Opera in the past.
let onDOMContentLoaded = () =>
@@ -38,23 +38,23 @@
}
else
{
setTimeout(callback, 0);
}
},
get appLocale()
{
- let locale = ext.i18n.getUILanguage();
+ let locale = chrome.i18n.getUILanguage();
Object.defineProperty(this, "appLocale", {value: locale, enumerable: true});
return this.appLocale;
},
get readingDirection()
{
- let direction = ext.i18n.getMessage("@@bidi_dir");
+ let direction = chrome.i18n.getMessage("@@bidi_dir");
// This fallback is only necessary for Microsoft Edge
if (!direction)
direction = /^(?:ar|fa|he|ug|ur)\b/.test(this.appLocale) ? "rtl" : "ltr";
Object.defineProperty(
this,
"readingDirection",
{value: direction, enumerable: true}
);
« no previous file with comments | « lib/notificationHelper.js ('k') | stats.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld