i18n: untranslated hardcoded strings and cross-package language keys #105

Open
opened 2026-06-29 14:20:17 +00:00 by jmiller · 1 comment
Owner

Problem

Several user-facing strings are hardcoded English instead of Text::_() / language constants, and the component edit form references language keys that aren't loaded in its context.

Hardcoded English

  • TagTable::check() validation messages: 'Content type is required.' (:48), 'Content type contains invalid characters.' (:54), 'Content ID is required.' (:60).
  • forms/tag.xml: fieldset label="SEO Meta Tags" (:81) and select option labels (Article, Website, Articles, Menu Items) in tag.xml and filter_tags.xml.
  • script.php:26,38 echoes raw English HTML on install/update.
  • MokoOG.php:985-991 — the license-key admin warning is a hardcoded HTML string passed to enqueueMessage, not a language constant.

Cross-package language keys

  • forms/tag.xml:85-110 labels SEO fields with PLG_CONTENT_MOKOOG_FIELD_* keys that live in the content plugin language files and are not loaded in the component context — they'd render as raw keys if the edit form is shown (see the single-tag edit UI blocker). Use COM_MOKOOG_* keys and add them to the component .ini.

Fix

Replace all with COM_MOKOOG_* / PKG_MOKOOG_* keys and add the strings to en-GB and en-US .ini files.

## Problem Several user-facing strings are hardcoded English instead of `Text::_()` / language constants, and the component edit form references language keys that aren't loaded in its context. ### Hardcoded English - `TagTable::check()` validation messages: `'Content type is required.'` (`:48`), `'Content type contains invalid characters.'` (`:54`), `'Content ID is required.'` (`:60`). - `forms/tag.xml`: fieldset `label="SEO Meta Tags"` (`:81`) and select option labels (`Article`, `Website`, `Articles`, `Menu Items`) in `tag.xml` and `filter_tags.xml`. - `script.php:26,38` echoes raw English HTML on install/update. - `MokoOG.php:985-991` — the license-key admin warning is a hardcoded HTML string passed to `enqueueMessage`, not a language constant. ### Cross-package language keys - `forms/tag.xml:85-110` labels SEO fields with `PLG_CONTENT_MOKOOG_FIELD_*` keys that live in the **content plugin** language files and are **not loaded** in the component context — they'd render as raw keys if the edit form is shown (see the single-tag edit UI blocker). Use `COM_MOKOOG_*` keys and add them to the component `.ini`. ## Fix Replace all with `COM_MOKOOG_*` / `PKG_MOKOOG_*` keys and add the strings to en-GB **and** en-US `.ini` files.
jmiller added this to the Code Quality & Testing milestone 2026-06-29 14:20:17 +00:00
jmiller added the enhancementdocumentation labels 2026-06-29 14:20:17 +00:00
Author
Owner

Branch created: feature/105-i18n-untranslated-hardcoded-strings-and-

git fetch origin
git checkout feature/105-i18n-untranslated-hardcoded-strings-and-
Branch created: [`feature/105-i18n-untranslated-hardcoded-strings-and-`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteOpenGraph/src/branch/feature/105-i18n-untranslated-hardcoded-strings-and-) ```bash git fetch origin git checkout feature/105-i18n-untranslated-hardcoded-strings-and- ```
Sign in to join this conversation.