Skip to content

Translate configuration form labels with manager lexicons - #221

Open
infinityscroll wants to merge 1 commit into
modmore:masterfrom
infinityscroll:feature/manager-lexicon-labels
Open

Translate configuration form labels with manager lexicons#221
infinityscroll wants to merge 1 commit into
modmore:masterfrom
infinityscroll:feature/manager-lexicon-labels

Conversation

@infinityscroll

@infinityscroll infinityscroll commented Aug 30, 2026

Copy link
Copy Markdown

What does it do ?

Adds opt-in %key and simple [[%key]] references for setting/group labels and descriptions, selectbox display labels, and required-field error labels. Additional topics can be configured with clientconfig.lexicon_topics.

Translations use the manager user's resolved language. The home controller translates copies of the configuration records and sends separate option value/label rows to the form. Stored values, defaults, raw references, and admin editing/import/export data stay unchanged.

Includes setup documentation and standalone PHP/JavaScript regression checks. Existing dynamic option processing remains available; the documentation explains using %key when that processing is enabled.

Why is it needed ?

Multilingual editors currently see literal lexicon references in the configuration form. This lets each editor read the labels in their manager language while editing the same underlying settings, including in context-aware mode.

Validation:

  • PHP 7.4 and 8.2: 194 assertions passed on each, exercising the service, home controller and save processor with MODX infrastructure fixtures.
  • Node.js: manager form regression checks passed against the actual form builder with ExtJS fixtures.
  • A controller regression fails on the original code (group title remains %website.group) and passes with this change.
  • Changed PHP files pass syntax checks; git diff --check passes.

A full MODX 2/3 browser installation test has not been run. tests/README.md includes that integration checklist.

Related issue(s)/PR(s)

Fixes #201.

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.

Multi-language support / i18n of labels, descriptions and display-values

1 participant