www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit a59f3c50edc312ad5377b554e3d851eaef13baf7
parent cbdc75df9a5c02b20c475c251b014e3996376c62
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  3 Jun 2014 14:17:14 -0400

Hack to fix "Numéro" search condition in French locale

https://forums.zotero.org/discussion/14942/

Diffstat:
Mchrome/content/zotero/xpcom/search.js | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -2277,6 +2277,7 @@ Zotero.SearchConditions = new function(){ _standardConditions = []; var baseMappedFields = Zotero.ItemFields.getBaseMappedFields(); + var locale = Zotero.locale; // Separate standard conditions for menu display for (var i in _conditions){ @@ -2298,9 +2299,17 @@ Zotero.SearchConditions = new function(){ continue; } + let localized = self.getLocalizedName(i); + // Hack to use a different name for "issue" in French locale, + // where 'number' and 'issue' are translated the same + // https://forums.zotero.org/discussion/14942/ + if (fieldID == 5 && locale.substr(0, 2).toLowerCase() == 'fr') { + localized = "Num\u00E9ro (p\u00E9riodique)"; + } + _standardConditions.push({ name: i, - localized: self.getLocalizedName(i), + localized: localized, operators: _conditions[i]['operators'], flags: _conditions[i]['flags'] });