[Pkg-mozext-commits] [requestpolicy] 130/280: [refact] rename `_()` to `$str()`
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:30:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit a2459769651b937961dd801372ababac8b179593
Author: Martin Kimmerle <dev at 256k.de>
Date: Tue Jan 6 18:14:40 2015 +0100
[refact] rename `_()` to `$str()`
---
src/content/settings/common.js | 4 ++--
src/content/settings/oldrules.js | 2 +-
src/content/settings/yourpolicy.js | 16 ++++++++--------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/content/settings/common.js b/src/content/settings/common.js
index 016a575..0bfc50f 100644
--- a/src/content/settings/common.js
+++ b/src/content/settings/common.js
@@ -36,7 +36,7 @@ var COMMON_STRINGS = [
];
-var _ = StringUtils.$str;
+var $str = StringUtils.$str;
var common = {};
@@ -214,7 +214,7 @@ common.addAllowRules = function (rules) {
common.localize = function(stringNames) {
stringNames.forEach(function(name) {
$('[data-string="' + name + '"]').each(function () {
- $(this).text(_(name));
+ $(this).text($str(name));
});
});
};
diff --git a/src/content/settings/oldrules.js b/src/content/settings/oldrules.js
index 315fbec..4eadd11 100644
--- a/src/content/settings/oldrules.js
+++ b/src/content/settings/oldrules.js
@@ -41,7 +41,7 @@ function populateRuleTable() {
function addRulesTableRow(table, ruleAction, origin, dest, ruleData) {
var actionClass = ruleAction == 'allow' ? 'allow' : 'block';
- var action = ruleAction == 'allow' ? _('allow') : _('block');
+ var action = ruleAction == 'allow' ? $str('allow') : $str('block');
var row = $('<tr>').addClass(actionClass).appendTo(table);
diff --git a/src/content/settings/yourpolicy.js b/src/content/settings/yourpolicy.js
index 2760ec7..b7556ca 100644
--- a/src/content/settings/yourpolicy.js
+++ b/src/content/settings/yourpolicy.js
@@ -19,13 +19,13 @@ var PAGE_STRINGS = [
$(function () {
common.localize(PAGE_STRINGS);
// l10n for input placeholders.
- $id("rulesearch").placeholder = _('search');
- $('[name=originscheme]').prop('placeholder', _('scheme'));
- $('[name=destscheme]').prop('placeholder', _('scheme'));
- $('[name=originhost]').prop('placeholder', _('host'));
- $('[name=desthost]').prop('placeholder', _('host'));
- $('[name=originport]').prop('placeholder', _('port'));
- $('[name=destport]').prop('placeholder', _('port'));
+ $id("rulesearch").placeholder = $str('search');
+ $('[name=originscheme]').prop('placeholder', $str('scheme'));
+ $('[name=destscheme]').prop('placeholder', $str('scheme'));
+ $('[name=originhost]').prop('placeholder', $str('host'));
+ $('[name=desthost]').prop('placeholder', $str('host'));
+ $('[name=originport]').prop('placeholder', $str('port'));
+ $('[name=destport]').prop('placeholder', $str('port'));
});
const SEARCH_DELAY = 100;
@@ -107,7 +107,7 @@ function addRulesTableRow(table, ruleAction, origin, dest, ruleData, source, rea
ruleAction = 'block';
}
ruleAction = ruleAction == 'allow' ? 'allow' : 'block';
- var ruleActionString = ruleAction == 'allow' ? _('allow') : _('block');
+ var ruleActionString = ruleAction == 'allow' ? $str('allow') : $str('block');
var row = $('<tr>').addClass(ruleAction).appendTo(table);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list