From 355b1fbc577b991ed7b966d075e5570f5f959236 Mon Sep 17 00:00:00 2001 From: gracile-fr Date: Thu, 15 Aug 2013 22:45:04 +0200 Subject: [PATCH 1/3] Localize Ctrl/Cmd-Shift in Prefs --- chrome/content/zotero/preferences/preferences_export.js | 2 +- chrome/content/zotero/preferences/preferences_keys.js | 2 +- chrome/locale/en-US/zotero/zotero.properties | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences_export.js b/chrome/content/zotero/preferences/preferences_export.js index 4a4befbe5a..7622673ed1 100644 --- a/chrome/content/zotero/preferences/preferences_export.js +++ b/chrome/content/zotero/preferences/preferences_export.js @@ -225,7 +225,7 @@ Zotero_Preferences.Export = { updateQuickCopyInstructions: function () { - var prefix = Zotero.isMac ? 'Cmd+Shift+' : 'Ctrl+Alt+'; + var prefix = Zotero.isMac ? (Zotero.getString('general.keys.cmdShift')) : (Zotero.getString('general.keys.ctrlShift')); var key = Zotero.Prefs.get('keys.copySelectedItemsToClipboard'); var str = Zotero.getString('zotero.preferences.export.quickCopy.instructions', prefix + key); diff --git a/chrome/content/zotero/preferences/preferences_keys.js b/chrome/content/zotero/preferences/preferences_keys.js index 04ee513f46..87361fc164 100644 --- a/chrome/content/zotero/preferences/preferences_keys.js +++ b/chrome/content/zotero/preferences/preferences_keys.js @@ -30,7 +30,7 @@ Zotero_Preferences.Keys = { var rows = document.getElementById('zotero-prefpane-keys').getElementsByTagName('row'); for (var i=0; i Date: Thu, 15 Aug 2013 22:53:56 +0200 Subject: [PATCH 2/3] Localize Ctrl/Cmd-Shift in Prefs --- chrome/content/zotero/preferences/preferences_export.js | 2 +- chrome/content/zotero/preferences/preferences_keys.js | 2 +- chrome/locale/en-US/zotero/zotero.properties | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences_export.js b/chrome/content/zotero/preferences/preferences_export.js index 7622673ed1..ce1a302c77 100644 --- a/chrome/content/zotero/preferences/preferences_export.js +++ b/chrome/content/zotero/preferences/preferences_export.js @@ -225,7 +225,7 @@ Zotero_Preferences.Export = { updateQuickCopyInstructions: function () { - var prefix = Zotero.isMac ? (Zotero.getString('general.keys.cmdShift')) : (Zotero.getString('general.keys.ctrlShift')); + var prefix = Zotero.isMac ? Zotero.getString('general.keys.cmdShift') : Zotero.getString('general.keys.ctrlShift'); var key = Zotero.Prefs.get('keys.copySelectedItemsToClipboard'); var str = Zotero.getString('zotero.preferences.export.quickCopy.instructions', prefix + key); diff --git a/chrome/content/zotero/preferences/preferences_keys.js b/chrome/content/zotero/preferences/preferences_keys.js index 87361fc164..20f7ecd19a 100644 --- a/chrome/content/zotero/preferences/preferences_keys.js +++ b/chrome/content/zotero/preferences/preferences_keys.js @@ -30,7 +30,7 @@ Zotero_Preferences.Keys = { var rows = document.getElementById('zotero-prefpane-keys').getElementsByTagName('row'); for (var i=0; i Date: Thu, 15 Aug 2013 23:15:02 +0200 Subject: [PATCH 3/3] Localize et al. in the middle pane (Heromyth's PR #358, #360, #361) --- chrome/content/zotero/xpcom/data/item.js | 2 +- chrome/content/zotero/xpcom/data/items.js | 7 ++++--- chrome/locale/en-US/zotero/zotero.properties | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index b04c12bcbb..42223fb5c0 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -204,7 +204,7 @@ Zotero.Item.prototype.getField = function(field, unformatted, includeBaseMapped) } else if(creators.length === 2) { return creators[0].ref.lastName+" "+Zotero.getString('general.and')+" "+creators[1].ref.lastName; } else if(creators.length > 3) { - return creators[0].ref.lastName+" et al." + return creators[0].ref.lastName+" "+Zotero.getString('general.etAl'); } } else if (field === 'id' || Zotero.Items.isPrimaryField(field)) { var privField = '_' + field; diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js index 5425253323..e8fddb1ef1 100644 --- a/chrome/content/zotero/xpcom/data/items.js +++ b/chrome/content/zotero/xpcom/data/items.js @@ -628,6 +628,7 @@ Zotero.Items = new function() { /* This whole block is to get the firstCreator */ var localizedAnd = Zotero.getString('general.and'); + var localizedEtAl = Zotero.getString('general.etAl'); var sql = "COALESCE(" + // First try for primary creator types "CASE (" + @@ -665,7 +666,7 @@ Zotero.Items = new function() { "LEFT JOIN itemTypeCreatorTypes ITCT " + "ON (IC.creatorTypeID=ITCT.creatorTypeID AND ITCT.itemTypeID=I.itemTypeID) " + "WHERE itemID=I.itemID AND primaryField=1 ORDER BY orderIndex LIMIT 1)" + - " || ' et al.' " + + " || ' " + localizedEtAl + "' " + ") " + "END, " + @@ -691,7 +692,7 @@ Zotero.Items = new function() { "SELECT " + "(SELECT lastName FROM itemCreators NATURAL JOIN creators NATURAL JOIN creatorData " + "WHERE itemID=I.itemID AND creatorTypeID IN (3) ORDER BY orderIndex LIMIT 1)" + - " || ' et al.' " + + " || ' " + localizedEtAl + "' " + ") " + "END, " + @@ -717,7 +718,7 @@ Zotero.Items = new function() { "SELECT " + "(SELECT lastName FROM itemCreators NATURAL JOIN creators NATURAL JOIN creatorData " + "WHERE itemID=I.itemID AND creatorTypeID IN (2) ORDER BY orderIndex LIMIT 1)" + - " || ' et al.' " + + " || ' " + localizedEtAl + "' " + ") " + "END" + ") AS firstCreator"; diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 621c906793..340bcfbd9c 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -30,6 +30,7 @@ general.no = No general.passed = Passed general.failed = Failed general.and = and +general.etAl = et al. general.accessDenied = Access Denied general.permissionDenied = Permission Denied general.character.singular = character