mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1161138 - Use normal L10N for Pocket strings. r=jaws
This commit is contained in:
parent
edd7eb65ac
commit
daa0f38953
@ -3,8 +3,6 @@
|
||||
%brandDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
|
||||
%browserDTD;
|
||||
<!ENTITY % browserPocketDTD SYSTEM "chrome://browser/content/browser-pocket.dtd" >
|
||||
%browserPocketDTD;
|
||||
<!ENTITY % baseMenuDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd" >
|
||||
%baseMenuDTD;
|
||||
<!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" >
|
||||
|
@ -1563,25 +1563,6 @@ let BookmarkingUI = {
|
||||
|
||||
updatePocketItemVisibility: function BUI_updatePocketItemVisibility(prefix) {
|
||||
let hidden = !CustomizableUI.getPlacementOfWidget("pocket-button");
|
||||
if (!hidden) {
|
||||
let locale = Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||
getService(Ci.nsIXULChromeRegistry).
|
||||
getSelectedLocale("browser");
|
||||
if (locale != "en-US") {
|
||||
if (locale == "ja-JP-mac")
|
||||
locale = "ja";
|
||||
let url = "chrome://browser/content/browser-pocket-" + locale + ".properties";
|
||||
let bundle = Services.strings.createBundle(url);
|
||||
let item = document.getElementById(prefix + "pocket");
|
||||
try {
|
||||
item.setAttribute("label", bundle.GetStringFromName("pocketMenuitem.label"));
|
||||
} catch (err) {
|
||||
// GetStringFromName throws when the bundle doesn't exist. In that
|
||||
// case, the item will retain the browser-pocket.dtd en-US string that
|
||||
// it has in the markup.
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById(prefix + "pocket").hidden = hidden;
|
||||
document.getElementById(prefix + "pocketSeparator").hidden = hidden;
|
||||
},
|
||||
|
@ -1,16 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This is a temporary file, later versions of Firefox will use
|
||||
# browser.properties in the usual L10N location.
|
||||
|
||||
pocket-button.label = Pocket
|
||||
pocket-button.tooltiptext = Bei Pocket speichern
|
||||
|
||||
# From browser-pocket.dtd
|
||||
saveToPocketCmd.label = Seite bei Pocket speichern
|
||||
saveToPocketCmd.accesskey = k
|
||||
saveLinkToPocketCmd.label = Link bei Pocket speichern
|
||||
saveLinkToPocketCmd.accesskey = o
|
||||
pocketMenuitem.label = Pocket-Liste anzeigen
|
@ -1,9 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This is a temporary file, later versions of Firefox will use
|
||||
# browser.properties in the usual L10N location.
|
||||
|
||||
pocket-button.label = Pocket
|
||||
pocket-button.tooltiptext = Save to Pocket
|
@ -1,16 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This is a temporary file, later versions of Firefox will use
|
||||
# browser.properties in the usual L10N location.
|
||||
|
||||
pocket-button.label = Pocket
|
||||
pocket-button.tooltiptext = Guardar en Pocket
|
||||
|
||||
# From browser-pocket.dtd
|
||||
saveToPocketCmd.label = Guardar página en Pocket
|
||||
saveToPocketCmd.accesskey = k
|
||||
saveLinkToPocketCmd.label = Guardar enlace en Pocket
|
||||
saveLinkToPocketCmd.accesskey = k
|
||||
pocketMenuitem.label = Ver lista de Pocket
|
@ -1,16 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This is a temporary file, later versions of Firefox will use
|
||||
# browser.properties in the usual L10N location.
|
||||
|
||||
pocket-button.label = Pocket
|
||||
pocket-button.tooltiptext = Pocket に保存
|
||||
|
||||
# From browser-pocket.dtd
|
||||
saveToPocketCmd.label = Pocket にページを保存
|
||||
saveToPocketCmd.accesskey = k
|
||||
saveLinkToPocketCmd.label = Pocket にリンクを保存
|
||||
saveLinkToPocketCmd.accesskey = o
|
||||
pocketMenuitem.label = Pocket のマイリストを表示
|
@ -1,16 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This is a temporary file, later versions of Firefox will use
|
||||
# browser.properties in the usual L10N location.
|
||||
|
||||
pocket-button.label = Pocket
|
||||
pocket-button.tooltiptext = Сохранить в Pocket
|
||||
|
||||
# From browser-pocket.dtd
|
||||
saveToPocketCmd.label = Сохранить страницу в Pocket
|
||||
saveToPocketCmd.accesskey = х
|
||||
saveLinkToPocketCmd.label = Сохранить ссылку в Pocket
|
||||
saveLinkToPocketCmd.accesskey = а
|
||||
pocketMenuitem.label = Показать список Pocket
|
@ -1,12 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!-- This is a temporary file and not meant for localization; later versions
|
||||
- of Firefox include these strings in browser.dtd -->
|
||||
|
||||
<!ENTITY saveToPocketCmd.label "Save Page to Pocket">
|
||||
<!ENTITY saveToPocketCmd.accesskey "k">
|
||||
<!ENTITY saveLinkToPocketCmd.label "Save Link to Pocket">
|
||||
<!ENTITY saveLinkToPocketCmd.accesskey "o">
|
||||
<!ENTITY pocketMenuitem.label "View Pocket List">
|
@ -198,29 +198,6 @@ nsContextMenu.prototype = {
|
||||
(targetURI.schemeIs("about") && ReaderMode.getOriginalUrl(targetURI.spec)));
|
||||
canPocket = canPocket && window.gBrowser && this.browser.getTabBrowser() == window.gBrowser;
|
||||
|
||||
if (canPocket) {
|
||||
let locale = Cc["@mozilla.org/chrome/chrome-registry;1"].
|
||||
getService(Ci.nsIXULChromeRegistry).
|
||||
getSelectedLocale("browser");
|
||||
if (locale != "en-US") {
|
||||
if (locale == "ja-JP-mac")
|
||||
locale = "ja";
|
||||
let url = "chrome://browser/content/browser-pocket-" + locale + ".properties";
|
||||
let bundle = Services.strings.createBundle(url);
|
||||
let saveToPocketItem = document.getElementById("context-pocket");
|
||||
let saveLinkToPocketItem = document.getElementById("context-savelinktopocket");
|
||||
try {
|
||||
saveToPocketItem.setAttribute("label", bundle.GetStringFromName("saveToPocketCmd.label"));
|
||||
saveToPocketItem.setAttribute("accesskey", bundle.GetStringFromName("saveToPocketCmd.accesskey"));
|
||||
saveLinkToPocketItem.setAttribute("label", bundle.GetStringFromName("saveLinkToPocketCmd.label"));
|
||||
saveLinkToPocketItem.setAttribute("accesskey", bundle.GetStringFromName("saveLinkToPocketCmd.accesskey"));
|
||||
} catch (err) {
|
||||
// GetStringFromName throws when the bundle doesn't exist. In that
|
||||
// case, the item will retain the browser-pocket.dtd en-US string that
|
||||
// it has in the markup.
|
||||
}
|
||||
}
|
||||
}
|
||||
this.showItem("context-pocket", canPocket && showSaveCurrentPageToPocket);
|
||||
let showSaveLinkToPocket = canPocket && !showSaveCurrentPageToPocket &&
|
||||
(this.onSaveableLink || this.onPlainTextLink);
|
||||
|
@ -12,8 +12,6 @@
|
||||
<!DOCTYPE page [
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
<!ENTITY % browserPocketDTD SYSTEM "chrome://browser/content/browser-pocket.dtd">
|
||||
%browserPocketDTD;
|
||||
<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
|
||||
%textcontextDTD;
|
||||
]>
|
||||
|
@ -75,12 +75,6 @@ browser.jar:
|
||||
* content/browser/browser.css (content/browser.css)
|
||||
* content/browser/browser.js (content/browser.js)
|
||||
* content/browser/browser.xul (content/browser.xul)
|
||||
content/browser/browser-pocket-en-US.properties (content/browser-pocket-en-US.properties)
|
||||
content/browser/browser-pocket.dtd (content/browser-pocket.dtd)
|
||||
content/browser/browser-pocket-de.properties (content/browser-pocket-de.properties)
|
||||
content/browser/browser-pocket-es-ES.properties (content/browser-pocket-es-ES.properties)
|
||||
content/browser/browser-pocket-ja.properties (content/browser-pocket-ja.properties)
|
||||
content/browser/browser-pocket-ru.properties (content/browser-pocket-ru.properties)
|
||||
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
|
||||
* content/browser/chatWindow.xul (content/chatWindow.xul)
|
||||
content/browser/tab-content.js (content/tab-content.js)
|
||||
|
@ -1065,11 +1065,10 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
|
||||
|
||||
if (Services.prefs.getBoolPref("browser.pocket.enabled")) {
|
||||
let isEnabledForLocale = true;
|
||||
let browserLocale;
|
||||
if (Services.prefs.getBoolPref("browser.pocket.useLocaleList")) {
|
||||
let chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry);
|
||||
browserLocale = chromeRegistry.getSelectedLocale("browser");
|
||||
let browserLocale = chromeRegistry.getSelectedLocale("browser");
|
||||
let enabledLocales = [];
|
||||
try {
|
||||
enabledLocales = Services.prefs.getCharPref("browser.pocket.enabledLocales").split(' ');
|
||||
@ -1080,32 +1079,12 @@ if (Services.prefs.getBoolPref("browser.pocket.enabled")) {
|
||||
}
|
||||
|
||||
if (isEnabledForLocale) {
|
||||
if (browserLocale == "ja-JP-mac")
|
||||
browserLocale = "ja";
|
||||
let url = "chrome://browser/content/browser-pocket-" + browserLocale + ".properties";
|
||||
let strings = Services.strings.createBundle(url);
|
||||
let label;
|
||||
let tooltiptext;
|
||||
try {
|
||||
label = strings.GetStringFromName("pocket-button.label");
|
||||
tooltiptext = strings.GetStringFromName("pocket-button.tooltiptext");
|
||||
} catch (err) {
|
||||
// GetStringFromName throws when the bundle doesn't exist. In that case,
|
||||
// fall back to the en-US browser-pocket.properties.
|
||||
url = "chrome://browser/content/browser-pocket-en-US.properties";
|
||||
strings = Services.strings.createBundle(url);
|
||||
label = strings.GetStringFromName("pocket-button.label");
|
||||
tooltiptext = strings.GetStringFromName("pocket-button.tooltiptext");
|
||||
}
|
||||
|
||||
let pocketButton = {
|
||||
id: "pocket-button",
|
||||
defaultArea: CustomizableUI.AREA_NAVBAR,
|
||||
introducedInVersion: "pref",
|
||||
type: "view",
|
||||
viewId: "PanelUI-pocketView",
|
||||
label: label,
|
||||
tooltiptext: tooltiptext,
|
||||
// Use forwarding functions here to avoid loading Pocket.jsm on startup:
|
||||
onViewShowing: function() {
|
||||
return Pocket.onPanelViewShowing.apply(this, arguments);
|
||||
|
@ -34,7 +34,6 @@ browser.jar:
|
||||
content/browser/pocket/panels/img/tag_close@2x.png (panels/img/tag_close@2x.png)
|
||||
content/browser/pocket/panels/img/tag_closeactive@1x.png (panels/img/tag_closeactive@1x.png)
|
||||
content/browser/pocket/panels/img/tag_closeactive@2x.png (panels/img/tag_closeactive@2x.png)
|
||||
content/browser/pocket/panels/js/dictionary.js (panels/js/dictionary.js)
|
||||
content/browser/pocket/panels/js/messages.js (panels/js/messages.js)
|
||||
content/browser/pocket/panels/js/saved.js (panels/js/saved.js)
|
||||
content/browser/pocket/panels/js/signup.js (panels/js/signup.js)
|
||||
|
@ -611,6 +611,19 @@ var pktUI = (function() {
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var _initL10NMessageId = "initL10N";
|
||||
pktUIMessaging.addMessageListener(_initL10NMessageId, function(panelId, data) {
|
||||
var strings = {};
|
||||
var bundle = Services.strings.createBundle("chrome://browser/locale/browser-pocket.properties");
|
||||
var e = bundle.getSimpleEnumeration();
|
||||
while(e.hasMoreElements()) {
|
||||
var str = e.getNext().QueryInterface(Components.interfaces.nsIPropertyElement);
|
||||
strings[str.key] = str.value;
|
||||
}
|
||||
pktUIMessaging.sendResponseMessageToPanel(panelId, _initL10NMessageId, { strings: strings });
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// -- Browser Navigation -- //
|
||||
|
@ -1,155 +0,0 @@
|
||||
Translations = {};
|
||||
Translations.en =
|
||||
{
|
||||
addtags: "Add Tags",
|
||||
alreadyhaveacct: "Already a Pocket user?",
|
||||
continueff: "Continue with Firefox",
|
||||
errorgeneric: "There was an error when trying to save to Pocket.",
|
||||
learnmore: "Learn More",
|
||||
loginnow: "Log in",
|
||||
maxtaglength: "Tags are limited to 25 characters",
|
||||
mustbeconnected: "You must be connected to the Internet in order to save to Pocket. Please check your connection and try again.",
|
||||
onlylinkssaved: "Only links can be saved",
|
||||
pagenotsaved: "Page Not Saved",
|
||||
pageremoved: "Page Removed",
|
||||
pagesaved: "Saved to Pocket",
|
||||
processingremove: "Removing Page...",
|
||||
processingtags: "Adding tags...",
|
||||
removepage: "Remove Page",
|
||||
save: "Save",
|
||||
saving: "Saving...",
|
||||
signupemail: "Sign up with email",
|
||||
signuptosave: "Sign up for Pocket. It’s free.",
|
||||
suggestedtags: "Suggested Tags",
|
||||
tagline: "Save articles and videos from Firefox to view in Pocket on any device, any time.",
|
||||
taglinestory_one: "Click the Pocket Button to save any article, video or page from Firefox.",
|
||||
taglinestory_two: "View in Pocket on any device, any time.",
|
||||
tagssaved: "Tags Added",
|
||||
signinfirefox: "Sign in with Firefox",
|
||||
signupfirefox: "Sign up with Firefox",
|
||||
viewlist: "View List"
|
||||
};
|
||||
|
||||
Translations.de =
|
||||
{
|
||||
addtags: "Tags hinzufügen",
|
||||
alreadyhaveacct: "Sind Sie bereits Pocket-Nutzer?",
|
||||
continueff: "Mit Firefox fortfahren",
|
||||
errorgeneric: "Beim Speichern des Links bei Pocket ist ein Fehler aufgetreten.",
|
||||
learnmore: "Mehr erfahren",
|
||||
loginnow: "Anmelden",
|
||||
maxtaglength: "Tags dürfen höchsten 25 Zeichen lang sein.",
|
||||
mustbeconnected: "Bitte überprüfen Sie, ob Sie mit dem Internet verbunden sind.",
|
||||
onlylinkssaved: "Es können nur Links gespeichert werden",
|
||||
pagenotsaved: "Seite nicht gespeichert",
|
||||
pageremoved: "Seite entfernt",
|
||||
pagesaved: "Bei Pocket gespeichert",
|
||||
processingremove: "Seite wird entfernt…",
|
||||
processingtags: "Tags werden hinzugefügt…",
|
||||
removepage: "Seite entfernen",
|
||||
save: "Speichern",
|
||||
saving: "Speichern…",
|
||||
signupemail: "Mit E-Mail registrieren",
|
||||
signuptosave: "Registrieren Sie sich bei Pocket. Das ist kostenlos.",
|
||||
suggestedtags: "Vorgeschlagene Tags",
|
||||
tagline: "Speichern Sie Artikel und Videos aus Firefox bei Pocket, um sie jederzeit und auf jedem Gerät ansehen zu können.",
|
||||
taglinestory_one: "Klicken Sie auf die Pocket-Schaltfläche, um beliebige Artikel, Videos und Seiten aus Firefox zu speichern.",
|
||||
taglinestory_two: "Lesen Sie diese mit Pocket, jederzeit und auf jedem Gerät.",
|
||||
tagssaved: "Tags hinzugefügt",
|
||||
signinfirefox: "Mit Firefox anmelden",
|
||||
signupfirefox: "Mit Firefox registrieren",
|
||||
viewlist: "Liste anzeigen"
|
||||
};
|
||||
|
||||
Translations.es =
|
||||
{
|
||||
addtags: "Añadir etiquetas",
|
||||
alreadyhaveacct: "¿Ya tiene cuenta Pocket?",
|
||||
continueff: "Continuar con Firefox",
|
||||
errorgeneric: "Se ha producido un error al guardar el enlace en Pocket.",
|
||||
learnmore: "Saber más",
|
||||
loginnow: "Iniciar sesión",
|
||||
maxtaglength: "Las etiquetas están limitadas a 25 caracteres.",
|
||||
mustbeconnected: "Compruebe que tiene conexión a Internet.",
|
||||
onlylinkssaved: "Solo se pueden guardar enlaces",
|
||||
pagenotsaved: "Página no guardada",
|
||||
pageremoved: "Página eliminada",
|
||||
pagesaved: "Guardada en Pocket",
|
||||
processingremove: "Eliminando página…",
|
||||
processingtags: "Añadiendo etiquetas…",
|
||||
removepage: "Eliminar página",
|
||||
save: "Guardar",
|
||||
saving: "Guardando…",
|
||||
signupemail: "Regístrese con su correo.",
|
||||
signuptosave: "Regístrese en Pocket. Es gratis.",
|
||||
suggestedtags: "Etiquetas sugeridas",
|
||||
tagline: "Guarde artículos y vídeos desde Firefox en Pocket para verlos en cualquier dispositivo y en cualquier momento.",
|
||||
taglinestory_one: "Pulse el botón Pocket para guardar cualquier artículo, vídeo o página desde Firefox.",
|
||||
taglinestory_two: "Véalo en Pocket en cualquier dispositivo y en cualquier momento.",
|
||||
tagssaved: "Etiquetas añadidas",
|
||||
signinfirefox: "Inicie sesión con Firefox",
|
||||
signupfirefox: "Regístrese con Firefox",
|
||||
viewlist: "Ver lista"
|
||||
};
|
||||
|
||||
Translations.ja =
|
||||
{
|
||||
addtags: "タグを追加",
|
||||
alreadyhaveacct: "アカウントをお持ちですか?",
|
||||
continueff: "Firefox で続行",
|
||||
errorgeneric: "Pocket にリンクを保存中に問題が発生しました。",
|
||||
learnmore: "詳細",
|
||||
loginnow: "ログイン",
|
||||
maxtaglength: "タグは 25 文字までです。",
|
||||
mustbeconnected: "インターネットに接続されていることを確認してください。",
|
||||
onlylinkssaved: "リンクのみ保存できます",
|
||||
pagenotsaved: "ページを保存できませんでした",
|
||||
pageremoved: "ページを削除しました",
|
||||
pagesaved: "Pocket に保存しました",
|
||||
processingremove: "ページを削除中...",
|
||||
processingtags: "タグを追加中...",
|
||||
removepage: "ページを削除",
|
||||
save: "保存",
|
||||
saving: "保存中...",
|
||||
signupemail: "メールでアカウント登録",
|
||||
signuptosave: "Pocket にアカウント登録してください。無料です。",
|
||||
suggestedtags: "タグ候補",
|
||||
tagline: "Pocket でいつでもどこでも見られるよう、Firefox から記事や動画を保存できます。",
|
||||
taglinestory_one: "Firefox から記事や動画やページを保存するには、Pocket ボタンをクリックしてください。",
|
||||
taglinestory_two: "Pocket でいつでもどこでも見られます。",
|
||||
tagssaved: "タグを追加しました",
|
||||
signinfirefox: "Firefox でログイン",
|
||||
signupfirefox: "Firefox でアカウント登録",
|
||||
viewlist: "マイリストを表示"
|
||||
};
|
||||
|
||||
Translations.ru =
|
||||
{
|
||||
addtags: "Добавить теги",
|
||||
alreadyhaveacct: "Уже используете Pocket?",
|
||||
continueff: "Продолжить через Firefox",
|
||||
errorgeneric: "Не удалось сохранить в Pocket.",
|
||||
learnmore: "Узнайте больше",
|
||||
loginnow: "Войдите",
|
||||
maxtaglength: "Длина тега не должна превышать 25 символов.",
|
||||
mustbeconnected: "Убедитесь, что вы подключены к Интернет.",
|
||||
onlylinkssaved: "Можно сохранять только ссылки",
|
||||
pagenotsaved: "Страница не сохранена",
|
||||
pageremoved: "Страница удалена",
|
||||
pagesaved: "Сохранено в Pocket",
|
||||
processingremove: "Удаление страницы...",
|
||||
processingtags: "Добавление тегов...",
|
||||
removepage: "Удалить страницу",
|
||||
save: "Сохранить",
|
||||
saving: "Сохранение...",
|
||||
signupemail: "Регистрация по эл. почте",
|
||||
signuptosave: "Зарегистрируйтесь в Pocket. Это бесплатно.",
|
||||
suggestedtags: "Рекомендуемые теги",
|
||||
tagline: "Сохраняйте статьи и видео из Firefox для просмотра в Pocket на любом устройстве, в любой момент.",
|
||||
taglinestory_one: "Щёлкните по кнопке Pocket, чтобы сохранить любую статью, видео или страницу из Firefox.",
|
||||
taglinestory_two: "Просматривайте их в Pocket на любом устройстве, в любой момент.",
|
||||
tagssaved: "Теги добавлены",
|
||||
signinfirefox: "Войти через Firefox",
|
||||
signupfirefox: "Регистрация через Firefox",
|
||||
viewlist: "Просмотреть список"
|
||||
};
|
@ -12,7 +12,6 @@ var PKT_SAVED_OVERLAY = function (options)
|
||||
this.savedItemId = 0;
|
||||
this.savedUrl = '';
|
||||
this.premiumStatus = false;
|
||||
this.panelId = 0;
|
||||
this.preventCloseTimerCancel = false;
|
||||
this.closeValid = true;
|
||||
this.mouseInside = false;
|
||||
@ -461,89 +460,7 @@ var PKT_SAVED_OVERLAY = function (options)
|
||||
}
|
||||
this.getTranslations = function()
|
||||
{
|
||||
var language = this.locale || '';
|
||||
this.dictJSON = {};
|
||||
|
||||
var dictsuffix = 'en-US';
|
||||
|
||||
if (language.indexOf('en') == 0)
|
||||
{
|
||||
dictsuffix = 'en';
|
||||
}
|
||||
else if (language.indexOf('it') == 0)
|
||||
{
|
||||
dictsuffix = 'it';
|
||||
}
|
||||
else if (language.indexOf('fr-ca') == 0)
|
||||
{
|
||||
dictsuffix = 'fr';
|
||||
}
|
||||
else if (language.indexOf('fr') == 0)
|
||||
{
|
||||
dictsuffix = 'fr';
|
||||
}
|
||||
else if (language.indexOf('de') == 0)
|
||||
{
|
||||
dictsuffix = 'de';
|
||||
}
|
||||
else if (language.indexOf('es-es') == 0)
|
||||
{
|
||||
dictsuffix = 'es';
|
||||
}
|
||||
else if (language.indexOf('es-419') == 0)
|
||||
{
|
||||
dictsuffix = 'es_419';
|
||||
}
|
||||
else if (language.indexOf('es') == 0)
|
||||
{
|
||||
dictsuffix = 'es';
|
||||
}
|
||||
else if (language.indexOf('ja') == 0)
|
||||
{
|
||||
dictsuffix = 'ja';
|
||||
}
|
||||
else if (language.indexOf('nl') == 0)
|
||||
{
|
||||
dictsuffix = 'nl';
|
||||
}
|
||||
else if (language.indexOf('pt-pt') == 0)
|
||||
{
|
||||
dictsuffix = 'pt_PT';
|
||||
}
|
||||
else if (language.indexOf('pt') == 0)
|
||||
{
|
||||
dictsuffix = 'pt_BR';
|
||||
}
|
||||
else if (language.indexOf('ru') == 0)
|
||||
{
|
||||
dictsuffix = 'ru';
|
||||
}
|
||||
else if (language.indexOf('zh-tw') == 0)
|
||||
{
|
||||
dictsuffix = 'zh_TW';
|
||||
}
|
||||
else if (language.indexOf('zh') == 0)
|
||||
{
|
||||
dictsuffix = 'zh_CN';
|
||||
}
|
||||
else if (language.indexOf('ko') == 0)
|
||||
{
|
||||
dictsuffix = 'ko';
|
||||
}
|
||||
else if (language.indexOf('pl') == 0)
|
||||
{
|
||||
dictsuffix = 'pl';
|
||||
}
|
||||
|
||||
this.dictJSON = Translations[dictsuffix];
|
||||
if (typeof this.dictJSON !== 'object')
|
||||
{
|
||||
this.dictJSON = Translations['en'];
|
||||
}
|
||||
if (typeof this.dictJSON !== 'object')
|
||||
{
|
||||
this.dictJSON = {};
|
||||
}
|
||||
this.dictJSON = window.pocketStrings;
|
||||
};
|
||||
};
|
||||
|
||||
@ -607,17 +524,18 @@ PKT_SAVED.prototype = {
|
||||
if (this.inited) {
|
||||
return;
|
||||
}
|
||||
this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
|
||||
this.overlay = new PKT_SAVED_OVERLAY();
|
||||
|
||||
this.inited = true;
|
||||
},
|
||||
|
||||
addMessageListener: function(messageId, callback) {
|
||||
pktPanelMessaging.addMessageListener(this.overlay.panelId, messageId, callback);
|
||||
pktPanelMessaging.addMessageListener(this.panelId, messageId, callback);
|
||||
},
|
||||
|
||||
sendMessage: function(messageId, payload, callback) {
|
||||
pktPanelMessaging.sendMessage(this.overlay.panelId, messageId, payload, callback);
|
||||
pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback);
|
||||
},
|
||||
|
||||
create: function() {
|
||||
@ -643,8 +561,6 @@ PKT_SAVED.prototype = {
|
||||
myself.overlay.locale = locale[1].toLowerCase();
|
||||
}
|
||||
|
||||
myself.overlay.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
|
||||
|
||||
myself.overlay.create();
|
||||
|
||||
// tell back end we're ready
|
||||
@ -686,6 +602,10 @@ $(function()
|
||||
thePKT_SAVED.init();
|
||||
}
|
||||
|
||||
window.thePKT_SAVED.create();
|
||||
// send an async message to get string data
|
||||
thePKT_SAVED.sendMessage("initL10N", {}, function(resp) {
|
||||
window.pocketStrings = resp.strings;
|
||||
window.thePKT_SAVED.create();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -20,7 +20,6 @@ var PKT_SIGNUP_OVERLAY = function (options)
|
||||
this.inoverflowmenu = false;
|
||||
this.pockethost = "getpocket.com";
|
||||
this.fxasignedin = false;
|
||||
this.panelId = 0;
|
||||
this.dictJSON = {};
|
||||
this.initCloseTabEvents = function() {
|
||||
$('.btn,.pkt_ext_learnmore,.alreadyhave > a').click(function(e)
|
||||
@ -58,89 +57,7 @@ var PKT_SIGNUP_OVERLAY = function (options)
|
||||
};
|
||||
this.getTranslations = function()
|
||||
{
|
||||
var language = this.locale || '';
|
||||
this.dictJSON = {};
|
||||
|
||||
var dictsuffix = 'en-US';
|
||||
|
||||
if (language.indexOf('en') == 0)
|
||||
{
|
||||
dictsuffix = 'en';
|
||||
}
|
||||
else if (language.indexOf('it') == 0)
|
||||
{
|
||||
dictsuffix = 'it';
|
||||
}
|
||||
else if (language.indexOf('fr-ca') == 0)
|
||||
{
|
||||
dictsuffix = 'fr';
|
||||
}
|
||||
else if (language.indexOf('fr') == 0)
|
||||
{
|
||||
dictsuffix = 'fr';
|
||||
}
|
||||
else if (language.indexOf('de') == 0)
|
||||
{
|
||||
dictsuffix = 'de';
|
||||
}
|
||||
else if (language.indexOf('es-es') == 0)
|
||||
{
|
||||
dictsuffix = 'es';
|
||||
}
|
||||
else if (language.indexOf('es-419') == 0)
|
||||
{
|
||||
dictsuffix = 'es_419';
|
||||
}
|
||||
else if (language.indexOf('es') == 0)
|
||||
{
|
||||
dictsuffix = 'es';
|
||||
}
|
||||
else if (language.indexOf('ja') == 0)
|
||||
{
|
||||
dictsuffix = 'ja';
|
||||
}
|
||||
else if (language.indexOf('nl') == 0)
|
||||
{
|
||||
dictsuffix = 'nl';
|
||||
}
|
||||
else if (language.indexOf('pt-pt') == 0)
|
||||
{
|
||||
dictsuffix = 'pt_PT';
|
||||
}
|
||||
else if (language.indexOf('pt') == 0)
|
||||
{
|
||||
dictsuffix = 'pt_BR';
|
||||
}
|
||||
else if (language.indexOf('ru') == 0)
|
||||
{
|
||||
dictsuffix = 'ru';
|
||||
}
|
||||
else if (language.indexOf('zh-tw') == 0)
|
||||
{
|
||||
dictsuffix = 'zh_TW';
|
||||
}
|
||||
else if (language.indexOf('zh') == 0)
|
||||
{
|
||||
dictsuffix = 'zh_CN';
|
||||
}
|
||||
else if (language.indexOf('ko') == 0)
|
||||
{
|
||||
dictsuffix = 'ko';
|
||||
}
|
||||
else if (language.indexOf('pl') == 0)
|
||||
{
|
||||
dictsuffix = 'pl';
|
||||
}
|
||||
|
||||
this.dictJSON = Translations[dictsuffix];
|
||||
if (typeof this.dictJSON !== 'object')
|
||||
{
|
||||
this.dictJSON = Translations['en'];
|
||||
}
|
||||
if (typeof this.dictJSON !== 'object')
|
||||
{
|
||||
this.dictJSON = {};
|
||||
}
|
||||
this.dictJSON = window.pocketStrings;
|
||||
};
|
||||
};
|
||||
|
||||
@ -175,8 +92,6 @@ PKT_SIGNUP_OVERLAY.prototype = {
|
||||
this.locale = locale[1].toLowerCase();
|
||||
}
|
||||
|
||||
this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
|
||||
|
||||
if (this.active)
|
||||
{
|
||||
return;
|
||||
@ -231,17 +146,18 @@ PKT_SIGNUP.prototype = {
|
||||
if (this.inited) {
|
||||
return;
|
||||
}
|
||||
this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
|
||||
this.overlay = new PKT_SIGNUP_OVERLAY();
|
||||
|
||||
this.inited = true;
|
||||
},
|
||||
|
||||
addMessageListener: function(messageId, callback) {
|
||||
pktPanelMessaging.addMessageListener(this.overlay.panelId, messageId, callback);
|
||||
pktPanelMessaging.addMessageListener(this.panelId, messageId, callback);
|
||||
},
|
||||
|
||||
sendMessage: function(messageId, payload, callback) {
|
||||
pktPanelMessaging.sendMessage(this.overlay.panelId, messageId, payload, callback);
|
||||
pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback);
|
||||
},
|
||||
|
||||
create: function() {
|
||||
@ -260,6 +176,10 @@ $(function()
|
||||
thePKT_SIGNUP.init();
|
||||
}
|
||||
|
||||
window.thePKT_SIGNUP.create();
|
||||
// send an async message to get string data
|
||||
thePKT_SIGNUP.sendMessage("initL10N", {}, function(resp) {
|
||||
window.pocketStrings = resp.strings;
|
||||
window.thePKT_SIGNUP.create();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -10,9 +10,8 @@
|
||||
<script type="text/javascript" src="js/vendor/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/vendor/handlebars.runtime.js"></script>
|
||||
<script type="text/javascript" src="js/vendor/jquery.tokeninput.min.js"></script>
|
||||
<script type="text/javascript" src="js/dictionary.js"></script>
|
||||
<script type="text/javascript" src="js/tmpl.js"></script>
|
||||
<script type="text/javascript" src="js/messages.js"></script>
|
||||
<script type="text/javascript" src="js/saved.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -9,9 +9,8 @@
|
||||
<body class="pkt_ext_containersignup" aria-live="polite">
|
||||
<script type="text/javascript" src="js/vendor/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/vendor/handlebars.runtime.js"></script>
|
||||
<script type="text/javascript" src="js/dictionary.js"></script>
|
||||
<script type="text/javascript" src="js/tmpl.js"></script>
|
||||
<script type="text/javascript" src="js/messages.js"></script>
|
||||
<script type="text/javascript" src="js/signup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -0,0 +1,31 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
addtags = Add Tags
|
||||
alreadyhaveacct = Already a Pocket user?
|
||||
continueff = Continue with Firefox
|
||||
errorgeneric = There was an error when trying to save to Pocket.
|
||||
learnmore = Learn More
|
||||
loginnow = Log in
|
||||
maxtaglength = Tags are limited to 25 characters
|
||||
mustbeconnected = You must be connected to the Internet in order to save to Pocket. Please check your connection and try again.
|
||||
onlylinkssaved = Only links can be saved
|
||||
pagenotsaved = Page Not Saved
|
||||
pageremoved = Page Removed
|
||||
pagesaved = Saved to Pocket
|
||||
processingremove = Removing Page…
|
||||
processingtags = Adding tags…
|
||||
removepage = Remove Page
|
||||
save = Save
|
||||
saving = Saving…
|
||||
signupemail = Sign up with email
|
||||
signuptosave = Sign up for Pocket. It’s free.
|
||||
suggestedtags = Suggested Tags
|
||||
tagline = Save articles and videos from Firefox to view in Pocket on any device, any time.
|
||||
taglinestory_one = Click the Pocket Button to save any article, video or page from Firefox.
|
||||
taglinestory_two = View in Pocket on any device, any time.
|
||||
tagssaved = Tags Added
|
||||
signinfirefox = Sign in with Firefox
|
||||
signupfirefox = Sign up with Firefox
|
||||
viewlist = View List
|
@ -860,3 +860,10 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
||||
<!-- Pre-landed strings for bug 1123519 -->
|
||||
<!ENTITY readingList.sidebar.add.label "Add to Reading List">
|
||||
<!ENTITY readingList.sidebar.add.tooltip "Add this page to your Reading List">
|
||||
|
||||
<!-- LOCALIZATION NOTE (saveToPocketCmd.label, saveLinkToPocketCmd.label, pocketMenuitem.label): Pocket is a brand name -->
|
||||
<!ENTITY saveToPocketCmd.label "Save Page to Pocket">
|
||||
<!ENTITY saveToPocketCmd.accesskey "k">
|
||||
<!ENTITY saveLinkToPocketCmd.label "Save Link to Pocket">
|
||||
<!ENTITY saveLinkToPocketCmd.accesskey "o">
|
||||
<!ENTITY pocketMenuitem.label "View Pocket List">
|
||||
|
@ -113,5 +113,10 @@ web-apps-button.tooltiptext = Discover Apps
|
||||
devtools-webide-button2.label = WebIDE
|
||||
devtools-webide-button2.tooltiptext = Open WebIDE (%S)
|
||||
|
||||
# LOCALIZATION NOTE(pocket-button.label, pocket-button.tooltiptext): "Pocket"
|
||||
# is a brand name.
|
||||
pocket-button.label = Pocket
|
||||
pocket-button.tooltiptext = Save to Pocket
|
||||
|
||||
e10s-button.label = New Non-e10s Window
|
||||
e10s-button.tooltiptext = Open a new Non-e10s Window
|
||||
|
@ -26,6 +26,7 @@
|
||||
locale/browser/browser.dtd (%chrome/browser/browser.dtd)
|
||||
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)
|
||||
locale/browser/browser.properties (%chrome/browser/browser.properties)
|
||||
locale/browser/browser-pocket.properties (%chrome/browser/browser-pocket.properties)
|
||||
locale/browser/customizableui/customizableWidgets.properties (%chrome/browser/customizableui/customizableWidgets.properties)
|
||||
locale/browser/devtools/animationinspector.dtd (%chrome/browser/devtools/animationinspector.dtd)
|
||||
locale/browser/devtools/animationinspector.properties (%chrome/browser/devtools/animationinspector.properties)
|
||||
|
Loading…
Reference in New Issue
Block a user