Search: Use item field localization if string == key
91faa73b19
made getString return the key
instead of throwing on non-en-US locales, so we check if the getString
result is equal to the key even if it doesn't throw.
Fixes #2472.
This commit is contained in:
parent
a3322a9afb
commit
82228a1072
1 changed files with 8 additions and 4 deletions
|
@ -710,11 +710,15 @@ Zotero.SearchConditions = new function(){
|
|||
}
|
||||
|
||||
try {
|
||||
return Zotero.getString('searchConditions.' + str)
|
||||
}
|
||||
catch (e) {
|
||||
return Zotero.ItemFields.getLocalizedString(str);
|
||||
let conditionKey = 'searchConditions.' + str;
|
||||
let conditionString = Zotero.getString(conditionKey);
|
||||
if (conditionString !== conditionKey) {
|
||||
return conditionString;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
return Zotero.ItemFields.getLocalizedString(str);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue