OpenSite/Reference/Features/Message catalog

From BathAfrica Documentation
Revision as of 14:15, 29 October 2026 by BathAfrica (talk | contribs) (Link adjacent OpenSite reference pages in reading order)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
OpenSite 0.0.1 · DevelopmentSource scope and availability


Look up a message by a stable key, with English and then the key itself when a translation is missing.

Stable identifier
localization.catalog

Status reported by source

Implemented in the reviewed development source. Historical test evidence is recorded by the repository; no test rerun or product release is claimed by this publication.

Units

None. A catalog does not store a quantity.

Behavior

The document format is opensite-message-catalog version 1, JSON, UTF-8. Lookup tries the active tag, parent tags, English, then the key. Placeholders are named and must match the supplied names. The English plural rule, registered only for en, selects one when the count is 1 and other otherwise. Another language uses other until a host registers a rule. A plural rule that throws is recorded and the category other is used. A repeated key in the same language is rejected and does not replace the existing text. CatalogSubscription removes its observer when destroyed.

Errors

corrupt_catalog, unsupported_version, duplicate_id, reentrant_call when a lookup or a notice tries to change the catalog, and invalid_argument for a placeholder mismatch or a plugin key outside its prefix.

Limitations

The reviewed built-in catalogs use English. Selecting French does not supply a French translation. The GUI has English shell and extension catalog keys, but a complete translation set is not claimed. A provider adds messages only within its namespace. The English plural rule is not a universal grammar.

Available hosts

Foundation catalog service, CLI, embedded Python, desktop shell and extension catalogs. The catalog itself remains GUI-independent.

Licensing and access

Catalog text is not an entitlement. A provider catalog does not grant a capability.

Verification evidence

Repository evidence references (not rerun for this publication): CTest foundation.catalog and cli.preferences. ADR-0019 and ADR-0021.


Try this workflow

Discover commands — a worked lesson with expected results.

Documentation basis

Source-reviewed against development commit 77c3fee13944bcc4b5d487c77eb1f82fbe4c6ea7, branch feature/phase-13c-properties-python-expressions. This review inspected the implementation and repository evidence; it did not run the Windows application or repeat CTest.

  • src/foundation/catalog.cpp
  • src/gui/shell_catalog.cpp

OpenSite overview · Reference · Guides