From 7150d38cf1de0b521200a373b9dda5ed28857b48 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 30 Dec 2009 07:22:53 +0000 Subject: [PATCH] Addresses #1475, Localize add-on strings Localizes most (though not quite all) of the new unlocalized strings, hopefully without breaking anything --- chrome/content/zotero/browser.js | 8 +- chrome/content/zotero/fileInterface.js | 3 +- chrome/content/zotero/longTagFixer.js | 11 +- chrome/content/zotero/longTagFixer.xul | 31 +++-- chrome/content/zotero/merge.js | 3 +- chrome/content/zotero/overlay.js | 17 ++- chrome/content/zotero/overlay.xul | 15 +-- .../content/zotero/preferences/preferences.js | 5 +- .../zotero/preferences/preferences.xul | 96 +++++++-------- chrome/content/zotero/xpcom/ingester.js | 5 +- chrome/content/zotero/xpcom/schema.js | 8 +- chrome/content/zotero/xpcom/storage.js | 36 ++---- chrome/content/zotero/xpcom/storage/webdav.js | 84 +++++++------ chrome/content/zotero/xpcom/sync.js | 92 ++++++-------- chrome/content/zotero/xpcom/zotero.js | 47 +++---- chrome/locale/af-ZA/zotero/zotero.dtd | 2 - chrome/locale/af-ZA/zotero/zotero.properties | 3 +- chrome/locale/ar/zotero/zotero.dtd | 2 - chrome/locale/ar/zotero/zotero.properties | 3 +- chrome/locale/bg-BG/zotero/zotero.dtd | 2 - chrome/locale/bg-BG/zotero/zotero.properties | 3 +- chrome/locale/ca-AD/zotero/zotero.dtd | 2 - chrome/locale/ca-AD/zotero/zotero.properties | 3 +- chrome/locale/cs-CZ/zotero/zotero.dtd | 2 - chrome/locale/cs-CZ/zotero/zotero.properties | 3 +- chrome/locale/da-DK/zotero/zotero.dtd | 2 - chrome/locale/da-DK/zotero/zotero.properties | 3 +- chrome/locale/de-AT/zotero/zotero.dtd | 2 - chrome/locale/de-AT/zotero/zotero.properties | 3 +- chrome/locale/de-CH/zotero/zotero.dtd | 2 - chrome/locale/de-CH/zotero/zotero.properties | 3 +- chrome/locale/de-DE/zotero/zotero.dtd | 2 - chrome/locale/de-DE/zotero/zotero.properties | 3 +- chrome/locale/el-GR/zotero/zotero.dtd | 2 - chrome/locale/el-GR/zotero/zotero.properties | 3 +- chrome/locale/en-US/zotero/preferences.dtd | 46 ++++++- chrome/locale/en-US/zotero/zotero.dtd | 24 +++- chrome/locale/en-US/zotero/zotero.properties | 115 ++++++++++++++++-- chrome/locale/es-ES/zotero/zotero.dtd | 2 - chrome/locale/es-ES/zotero/zotero.properties | 3 +- chrome/locale/et-EE/zotero/zotero.dtd | 2 - chrome/locale/et-EE/zotero/zotero.properties | 3 +- chrome/locale/fi-FI/zotero/zotero.dtd | 2 - chrome/locale/fi-FI/zotero/zotero.properties | 3 +- chrome/locale/fr-FR/zotero/zotero.dtd | 2 - chrome/locale/fr-FR/zotero/zotero.properties | 3 +- chrome/locale/gl-ES/zotero/zotero.dtd | 2 - chrome/locale/gl-ES/zotero/zotero.properties | 3 +- chrome/locale/he-IL/zotero/zotero.dtd | 2 - chrome/locale/he-IL/zotero/zotero.properties | 3 +- chrome/locale/hr-HR/zotero/zotero.dtd | 2 - chrome/locale/hr-HR/zotero/zotero.properties | 3 +- chrome/locale/hu-HU/zotero/zotero.dtd | 2 - chrome/locale/hu-HU/zotero/zotero.properties | 3 +- chrome/locale/is-IS/zotero/zotero.dtd | 2 - chrome/locale/is-IS/zotero/zotero.properties | 3 +- chrome/locale/it-IT/zotero/zotero.dtd | 2 - chrome/locale/it-IT/zotero/zotero.properties | 3 +- chrome/locale/ja-JP/zotero/zotero.dtd | 2 - chrome/locale/ja-JP/zotero/zotero.properties | 3 +- chrome/locale/ko-KR/zotero/zotero.dtd | 2 - chrome/locale/ko-KR/zotero/zotero.properties | 3 +- chrome/locale/mn-MN/zotero/zotero.dtd | 2 - chrome/locale/mn-MN/zotero/zotero.properties | 3 +- chrome/locale/nb-NO/zotero/zotero.dtd | 2 - chrome/locale/nb-NO/zotero/zotero.properties | 3 +- chrome/locale/nl-NL/zotero/zotero.dtd | 2 - chrome/locale/nl-NL/zotero/zotero.properties | 3 +- chrome/locale/pl-PL/zotero/zotero.dtd | 2 - chrome/locale/pl-PL/zotero/zotero.properties | 3 +- chrome/locale/pt-BR/zotero/zotero.dtd | 2 - chrome/locale/pt-BR/zotero/zotero.properties | 3 +- chrome/locale/pt-PT/zotero/zotero.dtd | 2 - chrome/locale/pt-PT/zotero/zotero.properties | 3 +- chrome/locale/ro-RO/zotero/zotero.dtd | 2 - chrome/locale/ro-RO/zotero/zotero.properties | 3 +- chrome/locale/ru-RU/zotero/zotero.dtd | 2 - chrome/locale/ru-RU/zotero/zotero.properties | 3 +- chrome/locale/sk-SK/zotero/zotero.dtd | 2 - chrome/locale/sk-SK/zotero/zotero.properties | 3 +- chrome/locale/sl-SI/zotero/zotero.dtd | 2 - chrome/locale/sl-SI/zotero/zotero.properties | 3 +- chrome/locale/sr-RS/zotero/zotero.dtd | 2 - chrome/locale/sr-RS/zotero/zotero.properties | 3 +- chrome/locale/sv-SE/zotero/zotero.dtd | 2 - chrome/locale/sv-SE/zotero/zotero.properties | 3 +- chrome/locale/th-TH/zotero/zotero.dtd | 2 - chrome/locale/th-TH/zotero/zotero.properties | 3 +- chrome/locale/tr-TR/zotero/zotero.dtd | 2 - chrome/locale/tr-TR/zotero/zotero.properties | 3 +- chrome/locale/vi-VN/zotero/zotero.dtd | 2 - chrome/locale/vi-VN/zotero/zotero.properties | 3 +- chrome/locale/zh-CN/zotero/zotero.dtd | 2 - chrome/locale/zh-CN/zotero/zotero.properties | 3 +- chrome/locale/zh-TW/zotero/zotero.dtd | 2 - chrome/locale/zh-TW/zotero/zotero.properties | 3 +- 96 files changed, 424 insertions(+), 417 deletions(-) diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index 1588bb8be2..e9159e1689 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -128,8 +128,10 @@ var Zotero_Browser = new function() { function scrapeThisPage(libraryID, collectionID) { if (Zotero.locked) { Zotero_Browser.progress.changeHeadline(Zotero.getString("ingester.scrapeError")); - // TODO: localize - var desc = "A Zotero operation is currently in progress. Please wait until it finishes and try again."; + var desc = Zotero.localeJoin([ + Zotero.getString('general.operationInProgress'), + Zotero.getString('general.operationInProgress.waitUntilFinishedAndTryAgain') + ]); Zotero_Browser.progress.addDescription(desc); Zotero_Browser.progress.show(); Zotero_Browser.progress.startCloseTimer(8000); @@ -139,7 +141,7 @@ var Zotero_Browser = new function() { if (!Zotero.stateCheck()) { Zotero_Browser.progress.changeHeadline(Zotero.getString("ingester.scrapeError")); - var desc = Zotero.getString("ingester.scrapeError.transactionInProgress.previousError") + var desc = Zotero.getString("ingester.scrapeErrorDescription.previousError") + ' ' + Zotero.getString("general.restartFirefoxAndTryAgain"); Zotero_Browser.progress.addDescription(desc); Zotero_Browser.progress.show(); diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index d0ad40afb6..5b61c316ec 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -224,10 +224,9 @@ var Zotero_File_Interface = new function() { var clip = Components.classes["@mozilla.org/widget/clipboard;1"] .getService(Components.interfaces.nsIClipboard); if (!clip.hasDataMatchingFlavors(["text/unicode"], 1, clip.kGlobalClipboard)) { - // TODO: localize var prompt = Components.classes["@mozilla.org/network/default-prompt;1"] .getService(Components.interfaces.nsIPrompt); - prompt.alert("", "No importable data could be read from the clipboard."); + prompt.alert("", Zotero.getString('fileInterface.importClipboardNoDataError')); return; } var trans = Components.classes["@mozilla.org/widget/transferable;1"] diff --git a/chrome/content/zotero/longTagFixer.js b/chrome/content/zotero/longTagFixer.js index 75c2b0fd4c..9b982bb910 100644 --- a/chrome/content/zotero/longTagFixer.js +++ b/chrome/content/zotero/longTagFixer.js @@ -30,7 +30,7 @@ var Zotero_Long_Tag_Fixer = new function () { this.init = function () { document.getElementById('zotero-old-tag').value = _oldTag; - document.getElementById('zotero-old-tag-delimiter').nextSibling.value = 'character'; // TODO: localize + document.getElementById('zotero-old-tag-delimiter').nextSibling.value = Zotero.getString('general.character.singular'); var delimiter = Zotero.Prefs.get('lastLongTagDelimiter'); document.getElementById('zotero-old-tag-delimiter').value = delimiter; @@ -47,27 +47,26 @@ var Zotero_Long_Tag_Fixer = new function () { document.getElementById('zotero-new-tag-actions').selectedIndex = index; - // TODO: localize switch (index) { case 0: - var buttonLabel = "Save Tags"; + var buttonLabel = "saveTags"; this.updateTagList(); document.getElementById('zotero-old-tag-delimiter').select(); break; case 1: - var buttonLabel = "Save Tag"; + var buttonLabel = "saveTag"; document.getElementById('zotero-new-tag-editor').value = _oldTag; this.updateEditLength(_oldTag.length) break; case 2: - var buttonLabel = "Delete Tag"; + var buttonLabel = "deleteTag"; dialog.getButton('accept').disabled = false; break; } - document.getElementById('zotero-long-tag-fixer').getButton('accept').label = buttonLabel; + document.getElementById('zotero-long-tag-fixer').getButton('accept').label = Zotero.getString('sync.longTagFixer.' + buttonLabel); window.sizeToContent(); Zotero.Prefs.set('lastLongTagMode', index); } diff --git a/chrome/content/zotero/longTagFixer.xul b/chrome/content/zotero/longTagFixer.xul index 13ab1ab64b..408dfc8a2e 100644 --- a/chrome/content/zotero/longTagFixer.xul +++ b/chrome/content/zotero/longTagFixer.xul @@ -1,44 +1,43 @@ + + title="&zotero.sync.error;">