v0.1.2
ZotRead v0.1.2 — really fix prefs blank on first install
v0.1.1 was supposed to fix the blank-prefs-on-first-install issue, but the fix made it worse: the prefs panel's labels stayed blank permanently, and clicking a dropdown no longer brought them back. v0.1.2 corrects that.
What was wrong in v0.1.1
MozXULElement.insertFTLIfNeeded was called on the prefs window itself. But preferences.xhtml already declares the FTL via <linkset rel="localization">, so the bundle ended up registered twice — and Firefox's l10n engine then refused to translate any of the elements at all.
The actual fix
- Main-window preheat (
src/hooks.ts) — when Zotero's main window loads, the plugin now also pre-registerspreferences.ftlso Firefox's l10n cache knows about it before the user ever opens Settings. - Post-open re-translate (
src/modules/preferenceScript.ts) — when the prefs pane opens, the plugin asksdocument.l10nto re-translate the DOM fragment. This is a no-op when everything is already wired up, but rescues the rare case where the bundle finished loading after first paint.
No double-registration. Tested on a fresh dev profile: prefs labels appear immediately.
Install
If you have v0.1 or v0.1.1 installed: download the new zot-read.xpi below and re-install via Tools → Add-ons → gear icon → Install Add-on From File… — your existing settings, anchors, and cache are preserved.
What changed
src/hooks.ts—onMainWindowLoadnow also pre-registerszotread-preferences.ftlviainsertFTLIfNeededsrc/modules/preferenceScript.ts—registerPrefsScriptscallsdocument.l10n.translateFragment(documentElement)instead ofinsertFTLIfNeededpackage.json— version 0.1.1 → 0.1.2