Skip to content

feat: German and Spanish spell-check dictionaries - #21

Merged
hamidfzm merged 2 commits into
mainfrom
feat/dictionaries-de-es
Nov 12, 2026
Merged

hamidfzm merged 2 commits into
mainfrom
feat/dictionaries-de-es

Conversation

@hamidfzm

@hamidfzm hamidfzm commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

Adds the official German (com.glyph.dictionary-de) and Spanish (com.glyph.dictionary-es) spell-check dictionaries, built like the Persian one: sandboxed, no permissions, and their data read through ctx.assets only once the language is picked in Settings, Editor, Spell Check.

Refs hamidfzm/glyph#1052 (closed by hamidfzm/glyph#1057, the app side).

Status: merge after hamidfzm/glyph#1057 is in a release (0.28.0). Merging here publishes both plugins at once. German declares apiVersion 0.28.0: from that version the app checks with Hunspell itself, while older apps ignore the compound flags igerman98 builds words from and would underline Fußball and every other compound. A 0.27 app would still list German in the marketplace and then refuse to load it with its API-version error, so waiting for the release reads best. The app's plugin API version is its own version, so if hamidfzm/glyph#1057 ships in a later release than 0.28.0, German's apiVersion moves to that release first. Spanish needs no compounding, keeps apiVersion 0.16.0, and works on current apps too.

Changes

  • plugins/com.glyph.dictionary-de/: igerman98 by way of dictionary-de 3.0.0, label "Deutsch (German)".
  • plugins/com.glyph.dictionary-es/: RLA-ES by way of dictionary-es 4.0.0, a general Spanish dictionary not tied to one country, label "Español (Spanish)".
  • Each LICENSE holds the upstream notice and the full text of the license this package distributes the data under, and is listed in the manifest's files so it ships in the zip. Both upstreams let the recipient choose: German ships under GPL-2.0 (its "version 2 or 3"), Spanish under MPL-1.1 (one of GPL-3.0, LGPL-3.0 and MPL-1.1).
  • plugin.json carries the placeholder sha256; the release job rewrites packageUrl and the digest.
  • scripts/dictionaries.test.mjs checks the German, Spanish and Persian word lists (accepted words, flagged misspellings, the expected correction among the suggestions) with hunspell-wasm 0.3.0, the engine the app ships. A root package.json and package-lock.json pin it as the repo's only dev dependency, and smoke.yml installs it with npm ci --ignore-scripts before node --test; the job still holds only contents: read.
  • index.json, index/, and docs/plugin-catalog.md regenerated with scripts/build-index.mjs.
  • docs/api-reference.md: stacking (unloading a dictionary brings back the one it replaced), the Hunspell engine from 0.28.0, the size cap, and how the text is decoded (the affix file's SET line is ignored, so an ISO-8859 dictionary is converted first). docs/recipes.md: ship the license in files (the example manifest now lists it), and declare 0.28.0 for a compounding dictionary. docs/ecosystem.md: English is now a core plugin, and why it is the one dictionary in the app. docs/contributing.md: the smoke job.
  • The Persian README said "Sandbox: no", but its manifest runs it sandboxed (as the catalog says); it now says yes.

Testing

com.glyph.dictionary-de (igerman98, via dictionary-de 3.0.0) and com.glyph.dictionary-es (RLA-ES, via dictionary-es 4.0.0) add Deutsch and Español to the app's spell check, built like the Persian dictionary: sandboxed, no permissions, data read through ctx.assets only once the language is picked. Each LICENSE carries the upstream notice and the full text of the license this package distributes the data under (GPL-2.0 for German, MPL-1.1 for Spanish), and ships in the package.

German declares apiVersion 0.28.0: the app checks with Hunspell itself from that version, and older apps ignore the compound flags igerman98 builds words from, so they would underline Fußball and every other compound. Spanish needs no compounding and keeps 0.16.0.

scripts/dictionaries.test.mjs checks the German, Spanish and Persian word lists with hunspell-wasm 0.3.0, the engine the app ships, pinned by package-lock.json; the smoke job installs it with npm ci --ignore-scripts. The API reference, the dictionary recipe and the ecosystem page describe the engine, the size cap, and English as a core plugin, and the Persian README now says it runs sandboxed, as its manifest does.

Refs hamidfzm/glyph#1052
…ext is decoded

The recipe now tells authors to ship the license, so its example manifest lists it. The API reference says the app takes the text as already decoded and ignores the affix file's SET line, so an ISO-8859 dictionary is converted first. The test-only package gets a name of its own instead of the clone's folder name in its lockfile.

Refs hamidfzm/glyph#1052
@hamidfzm
hamidfzm added this pull request to stack #23 November 12, 2026 23:20
@hamidfzm
hamidfzm merged commit 24b31b0 into main Nov 12, 2026
3 checks passed
@hamidfzm
hamidfzm deleted the feat/dictionaries-de-es branch November 12, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant