[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 253/483: Allow specifying alternative command keys (useful for languages where two different keyboard layouts could be used)
David Prévot
taffit at moszumanska.debian.org
Thu Jan 22 21:41:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.
commit 120ddb4dd2f49bf3d24e6e0314cff00b886bdf77
Author: Wladimir Palant <trev at adblockplus.org>
Date: Tue Oct 26 08:55:35 2010 +0200
Allow specifying alternative command keys (useful for languages where two different keyboard layouts could be used)
---
chrome/locale/en-US/global.properties | 11 +++++++++++
chrome/locale/ru/global.properties | 13 +++++++++++++
modules/Aardvark.jsm | 9 ++++++++-
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/chrome/locale/en-US/global.properties b/chrome/locale/en-US/global.properties
index 6c5341c..8037f2d 100644
--- a/chrome/locale/en-US/global.properties
+++ b/chrome/locale/en-US/global.properties
@@ -17,6 +17,17 @@ command.viewSourceWindow.label=view source (in a separate window)
command.showMenu.key=h
command.showMenu.label=show/hide help
+# Optional: alternative set of command keys, e.g. Latin letters instead of Cyrillic. Set these keys if the users could be using two different keyboard layouts.
+command.select.alternativeKey=
+command.wider.alternativeKey=
+command.narrower.alternativeKey=
+command.lock.alternativeKey=
+command.quit.alternativeKey=
+command.blinkElement.alternativeKey=
+command.viewSource.alternativeKey=
+command.viewSourceWindow.alternativeKey=
+command.showMenu.alternativeKey=
+
noabp_warning_title=Element Hiding Helper
noabp_warning_text=This release of the Element Hiding Helper extension requires Adblock Plus %S or higher. The Element Hiding Helper will be disabled until Adblock Plus is either installed or updated.
noabp_warning_disable=Do not show this warning again.
diff --git a/chrome/locale/ru/global.properties b/chrome/locale/ru/global.properties
index ae01ed8..13e401c 100644
--- a/chrome/locale/ru/global.properties
+++ b/chrome/locale/ru/global.properties
@@ -4,6 +4,8 @@ command.wider.key=ш
command.wider.label=расширить
command.narrower.key=у
command.narrower.label=сузить
+command.lock.key=б
+command.lock.label=заблокировать/разблокировать выбор
command.quit.key=т
command.quit.label=отмена
command.blinkElement.key=м
@@ -15,6 +17,17 @@ command.viewSourceWindow.label=просмотреть исходный код (
command.showMenu.key=п
command.showMenu.label=показать/спрятать помощь
+# Optional: alternative set of command keys, e.g. Latin letters instead of Cyrillic. Set these keys if the users could be using two different keyboard layouts.
+command.select.alternativeKey=s
+command.wider.alternativeKey=w
+command.narrower.alternativeKey=n
+command.lock.alternativeKey=l
+command.quit.alternativeKey=q
+command.blinkElement.alternativeKey=b
+command.viewSource.alternativeKey=v
+command.viewSourceWindow.alternativeKey=u
+command.showMenu.alternativeKey=h
+
noabp_warning_title=Element Hiding Helper
noabp_warning_text=Расширение Element Hiding Helper, которое вы установили, работает только с Adblock Plus %S или выше. Element Hiding Helper будет отключен до тех пор, пока вы не установите или не обновите Adblock Plus.
noabp_warning_disable=Больше не показывать это предупреждение
diff --git a/modules/Aardvark.jsm b/modules/Aardvark.jsm
index bdc8eac..12cee21 100644
--- a/modules/Aardvark.jsm
+++ b/modules/Aardvark.jsm
@@ -158,8 +158,10 @@ Aardvark.initHelpBox = function() {
for (var i = 0; i < this.commands.length; i++) {
var command = this.commands[i];
var key = strings.GetStringFromName("command." + command + ".key");
+ var alternativeKey = strings.GetStringFromName("command." + command + ".alternativeKey");
var label = strings.GetStringFromName("command." + command + ".label");
this.commands[command + "_key"] = key.toLowerCase();
+ this.commands[command + "_altkey"] = alternativeKey.toLowerCase();
this.commands[command + "_label"] = label;
var row = this.window.document.createElement("row");
@@ -170,6 +172,11 @@ Aardvark.initHelpBox = function() {
element.className = "key";
row.appendChild(element);
+ var element = this.window.document.createElement("description");
+ element.setAttribute("value", alternativeKey);
+ element.className = "key";
+ row.appendChild(element);
+
element = this.window.document.createElement("description");
element.setAttribute("value", label);
element.className = "label";
@@ -209,7 +216,7 @@ Aardvark.onKeyPress = function(event) {
var key = String.fromCharCode(event.charCode).toLowerCase();
var commands = this.commands;
for (var i = 0; i < commands.length; i++)
- if (commands[commands[i] + "_key"] == key)
+ if (commands[commands[i] + "_key"] == key || commands[commands[i] + "_altkey"] == key)
command = commands[i];
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git
More information about the Pkg-mozext-commits
mailing list