Dezvoltare
Development Guide
Edit English only; translations propagate
Update documentation only under website/docs (English). Translations under website/i18n/<locale>/… are generated and should not be edited manually. Use the translation tasks (e.g., make translate_web_docs_batch) to refresh localized content.
Prerequisites
- Node.js 22+ and npm (tested with Node 22)
 - Thunderbird 128 ESR or newer (for manual testing)
 
Project Layout (high‑level)
- Root: packaging script 
distribution_zip_packer.sh, docs, screenshots sources/: main add-on code (background, options/popup UI, manifests, icons)tests/: Vitest suitewebsite/: Docusaurus docs (with i18n underwebsite/i18n/de/...)
Install & Tooling
- Install root deps: 
npm ci - Docs (optional): 
cd website && npm ci - Discover targets: 
make help 
Live Dev (web‑ext run)
- Quick loop in Firefox Desktop (UI smoke‑tests only):
 npx web-ext run --source-dir sources --target=firefox-desktop- Run in Thunderbird (preferred for MailExtensions):
 npx web-ext run --source-dir sources --start-url about:addons --firefox-binary "$(command -v thunderbird || echo /path/to/thunderbird)"- Tips:
 - Keep Thunderbird’s Error Console open (Tools → Developer Tools → Error Console).
 - MV3 event pages are suspended when idle; reload the add‑on after code changes, or let web‑ext auto‑reload.
 - Some Firefox‑only behaviors differ; always verify in Thunderbird for API parity.
 - Thunderbird binary paths (examples):
 - Linux: 
thunderbird(e.g.,/usr/bin/thunderbird) - macOS: 
/Applications/Thunderbird.app/Contents/MacOS/thunderbird - Windows: 
"C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe" - Profile isolation: Use a separate Thunderbird profile for development to avoid impacting your daily setup.
 
Make Targets (Alphabetical)
The Makefile standardizes common dev flows. Run make help anytime for a one‑line summary of every target.
Tip: running make with no target opens a simple Whiptail menu to pick a target.
| Target | One‑line description | 
|---|---|
clean | Remove local build/preview artifacts (tmp/, web-local-preview/, website/build/). | 
commit | Format, run tests (incl. i18n), update changelog, commit & push. | 
eslint | Run ESLint via flat config (npm run -s lint:eslint). | 
help | List all targets with one‑line docs (sorted). | 
lint | web‑ext lint on sources/ (temp manifest; ignores ZIPs; non‑fatal). | 
menu | Interactive menu to select a target and optional arguments. | 
pack | Build ATN & LOCAL ZIPs (runs linter; calls packer script). | 
prettier | Format repository in place (writes changes). | 
prettier_check | Prettier in check mode (no writes); fails if reformat needed. | 
prettier_write | Alias for prettier. | 
test | Prettier (write), ESLint, then Vitest (coverage if configured). | 
test_i18n | i18n‑only tests: add‑on placeholders/parity + website parity. | 
translate_app | Alias for translation_app. | 
translation_app | Translate app UI strings from sources/_locales/en/messages.json. | 
translate_web_docs_batch | Translate website docs via OpenAI Batch API (preferred). | 
translate_web_docs_sync | Translate website docs synchronously (legacy, non-batch). | 
translate_web_index | Alias for translation_web_index. | 
translation_web_index | Translate homepage/navbar/footer UI (website/i18n/en/code.json → .../<lang>/code.json). | 
web_build | Build docs to website/build (supports --locales / BUILD_LOCALES). | 
web_build_linkcheck | Offline‑safe link check (skips remote HTTP[S]). | 
web_build_local_preview | Local gh‑pages preview; auto‑serve on 8080–8090; optional tests/link‑check. | 
web_push_github | Push website/build to the gh-pages branch. | 
Syntax for options
- Use 
make <command> OPTS="…"to pass options (quotes recommended). Each target below shows example usage. 
--