From 9cb2ac219f68a9ea45718385c089a8c110535fb5 Mon Sep 17 00:00:00 2001 From: Dom Date: Tue, 20 Aug 2024 21:37:57 +0200 Subject: [PATCH] Try (and fail) to fix citations pane title --- src/cita/zoteroOverlay.tsx | 4 ++-- static/chrome/locale/en-US/wikicite.properties | 1 + zotero-plugin.config.ts | 12 ++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/cita/zoteroOverlay.tsx b/src/cita/zoteroOverlay.tsx index 8fb5155..ea4bd01 100644 --- a/src/cita/zoteroOverlay.tsx +++ b/src/cita/zoteroOverlay.tsx @@ -572,11 +572,11 @@ class ZoteroOverlay { paneID: "zotero-editpane-citations-tab", pluginID: config.addonID, header: { - l10nID: getLocaleID("wikicite-citations-pane"), + l10nID: getLocaleID("wikicite_citations-pane_label"), icon: `chrome://${config.addonRef}/content/skin/default/cita-small.svg`, }, sidenav: { - l10nID: getLocaleID("wikicite-citations-pane"), + l10nID: getLocaleID("wikicite_citations-pane_tooltip"), icon: `chrome://${config.addonRef}/content/skin/default/cita-small.svg`, }, bodyXHTML: ``, diff --git a/static/chrome/locale/en-US/wikicite.properties b/static/chrome/locale/en-US/wikicite.properties index 8f8f5a4..2e79e41 100644 --- a/static/chrome/locale/en-US/wikicite.properties +++ b/static/chrome/locale/en-US/wikicite.properties @@ -34,6 +34,7 @@ wikicite.citations-pane.linked.confirm.message = This citation is linked to item wikicite.citations-pane.linked.confirm.title = Linked citation wikicite.citations-pane.linked.confirm.unlink = Unlink wikicite.citations-pane.more = More... +wikicite.citations-pane.tooltip = Citations wikicite.crossref.get-citations.unsupported = Getting citations from Crossref not yet supported wikicite.editor.cancel = Cancel wikicite.editor.save = Save diff --git a/zotero-plugin.config.ts b/zotero-plugin.config.ts index a7b8077..5d889a1 100644 --- a/zotero-plugin.config.ts +++ b/zotero-plugin.config.ts @@ -95,6 +95,18 @@ export default defineConfig({ from: /wikicite_prefs_citation-storage-(note|extra)=/g, to: "$&\n .label=", }); + // add .label tag for citation pane label + replaceInFileSync({ + files: localePath + "/**/*.ftl", + from: /citations-pane_label =/g, + to: "$&\n .label=", + }); + // add .tooltip tags for citation pane tooltip + replaceInFileSync({ + files: localePath + "/**/*.ftl", + from: /citations-pane_tooltip =/g, + to: "$&\n .tooltip=", + }); // Copy local citations network mkdirSync("build/addon/chrome/content/Local-Citation-Network/");