Skip to content

Prefix all language keys, fix it-IT site language file, add lint job - #14

Merged
codeling merged 3 commits into
mainfrom
claude/ci-lint-and-more-tests
Oct 2, 2026
Merged

codeling merged 3 commits into
mainfrom
claude/ci-lint-and-more-tests

Conversation

@codeling

Copy link
Copy Markdown
Owner

Language key prefixes

Some keys have had no extension prefix since 2013, for example BLOCKED_UNTIL, UNBLOCK_SUCCESS, TEST_NOTIFICATION* and UNBLOCKTOKEN_*. Joomla keeps all language strings in one global namespace, so these could clash with other extensions' strings or be overridden by them. They are now COM_BFSTOP_*, both in the code and in all languages.

This also fixes a real bug. The code uses COM_BFSTOP_WARNING_ADMIN_USER_EXISTS, but ca-ES, es-ES, fr-FR, it-IT, nl-NL and ru-RU still had the old unprefixed key, so users of those languages always saw the English text. UNBLOCK_INVALIDID was removed because nothing uses it.

it-IT site language file

site/language/it-IT.com_bfstop.ini wasn't in an it-IT/ folder, so Joomla never loaded it. The Italian token-unblock page therefore showed English. The file is now in the right folder.

New lint CI job

  • xmllint on all XML files
  • language files: each parses, keys have the COM_BFSTOP_ prefix (this is what would have caught both problems above), each file sits in its language-tag folder, and every file the manifest lists exists. Missing translations are reported as warnings only.
  • the zip from deploy.sh zip contains everything the manifest references

The check scripts are identical to the ones in the plugin repository.

Companion PR

codeling/bfstop#228 uses the same branch name. The existing integration job therefore runs this branch together with that one. The integration job also gains new tests for the component's IP validation and range helpers.

Testing

Ran the lint checks locally. Also ran the plugin repo's integration suite with this branch as COM_BFSTOP_ROOT on Joomla 5.4.8 and 6.1.3 with MariaDB, and on 6.1.3 with PostgreSQL. All passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VoDNPckWPWBjxuJZhFPux


Generated by Claude Code

Joomla only loads site/language/<tag>/<tag>.com_bfstop.ini, so the Italian
frontend strings (token unblock page) were never used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VoDNPckWPWBjxuJZhFPux
Some keys (BLOCKED_UNTIL, UNBLOCK_SUCCESS, TEST_NOTIFICATION, UNBLOCKTOKEN_*,
...) had no extension prefix since they were introduced in 2013. Joomla's
language strings share one global namespace, so these could collide with
(or be overridden by) other extensions' strings.

Also fixes WARNING_ADMIN_USER_EXISTS: the code uses the prefixed
COM_BFSTOP_WARNING_ADMIN_USER_EXISTS, but all translations except en-GB and
de-DE still had the old unprefixed key, so they always showed English.
Removes UNBLOCK_INVALIDID, which is not used anywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VoDNPckWPWBjxuJZhFPux
All XML files well-formed, language files parseable, prefixed with
COM_BFSTOP_ and in the folder matching their language tag,
manifest-referenced language files present (missing translations are
reported as warnings), and the zip built by deploy.sh containing everything
the manifest references. The check scripts are kept identical to the ones in
the bfstop repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VoDNPckWPWBjxuJZhFPux
@codeling
codeling merged commit 47d74e9 into main Oct 2, 2026
7 checks passed
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.

2 participants