chore: Cherry-pick admin language loading via Translation service onto develop - #214
Merged
Merged
Conversation
Replaces `get_instance()->lang->load('admin/admin_generic')` with `Factory::service('Translation')->load('admin_generic')`, which works outside a CodeIgniter request.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit c96be4e)
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.
Summary
Cherry-picks the
Translationservice migration for admin's generic language lines fromfeature/pre-new-admin. Depends on nails/common#558.7ac97c6(c96be4e) refactor: Load language lines via the Translation serviceConflicts resolved
src/Controller/Base.phpwas independently and substantially rearchitected ondevelop(theBaseMiddlepattern was removed, it nowimplements Controller) — theloadLanguages()method this commit patches didn't exist there at all, and nothing else fills that role. Re-added the method (identical tofeature/pre-new-admin's version) and wired it into the constructor'sloadConfigs()->loadHelpers()->loadLanguages()chain, matching the source branch's call order exactly.Verification
(against
nails/common'schore/cherry-pick-form-validationbranch synced intovendor/nails/common)No tests executed!) — nothing to regress.phpstan: 0 errors, unchanged fromdevelopbaseline (also 0).Do not merge yet — holding for review.
🤖 Generated with Claude Code