mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Move special handling of 'timestamp' locator
Avoid "Locator 'timestamp' is empty in en-US locale" warning when
opening citation dialog after 969feb620d
This commit is contained in:
parent
b5310d5f04
commit
99b80723b8
1 changed files with 6 additions and 5 deletions
|
|
@ -48,11 +48,6 @@ Zotero.Cite = {
|
|||
* @return {String} - Localized string (e.g., 'Livre')
|
||||
*/
|
||||
getLocatorString: function (locator, form = null) {
|
||||
// 'timestamp' not included in CSL locales
|
||||
if (locator == 'timestamp') {
|
||||
return Zotero.getString('citation.locator.timestamp');
|
||||
}
|
||||
|
||||
// Get the best CSL locale for the current Zotero locale
|
||||
var cslLocale = Zotero.Utilities.Internal.resolveLocale(
|
||||
Zotero.locale,
|
||||
|
|
@ -84,6 +79,12 @@ Zotero.Cite = {
|
|||
var englishDoc;
|
||||
// Cache all locators for the current locale
|
||||
for (let locator of this.labels) {
|
||||
// 'timestamp' not included in CSL locales
|
||||
if (locator == 'timestamp') {
|
||||
map.set(locator, Zotero.getString('citation.locator.timestamp'));
|
||||
continue;
|
||||
}
|
||||
|
||||
// Fetch all <term>s - including the short form
|
||||
let terms = [...doc.querySelectorAll(`term[name="${locator}"]`)];
|
||||
if (!terms.length) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue