Prefix all language keys, fix it-IT site language file, add lint job - #14
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Language key prefixes
Some keys have had no extension prefix since 2013, for example
BLOCKED_UNTIL,UNBLOCK_SUCCESS,TEST_NOTIFICATION*andUNBLOCKTOKEN_*. Joomla keeps all language strings in one global namespace, so these could clash with other extensions' strings or be overridden by them. They are nowCOM_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_INVALIDIDwas removed because nothing uses it.it-IT site language file
site/language/it-IT.com_bfstop.iniwasn't in anit-IT/folder, so Joomla never loaded it. The Italian token-unblock page therefore showed English. The file is now in the right folder.New
lintCI jobxmllinton all XML filesCOM_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.deploy.sh zipcontains everything the manifest referencesThe 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_ROOTon 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