feat(api): лексикон для сообщений CategoryProductsController - #467
Open
Ibochkarev wants to merge 2 commits into
Open
feat(api): лексикон для сообщений CategoryProductsController#467Ibochkarev wants to merge 2 commits into
Ibochkarev wants to merge 2 commits into
Conversation
Ibochkarev
force-pushed
the
fix/issue-446
branch
from
July 29, 2026 02:05
d86306d to
5316221
Compare
Replace hardcoded English error/success strings with minishop3:default lexicon keys so manager toasts follow MODX cultureKey (ru/en).
Ibochkarev
force-pushed
the
fix/issue-446
branch
from
July 29, 2026 11:31
5316221 to
15fa056
Compare
Constructor now calls lexicon->load(); ModxStub lacked the property, which broke CategoryProductsControllerScopeTest.
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.
Описание
Сообщения об ошибках и успехе в
CategoryProductsControllerиCategoryProductActionPermissionsпереведены на ключиminishop3:default(ru + en). Vue Manager показываетerror.messageиз API в toast — приcultureKey = ruпользователь видит локализованный текст вместо захардкоженного английского.Добавлены
lexiconMessageOrKey()/errorResponse()по образцуOrdersController. Permissions-сервис возвращает lexicon-ключи в полеmessage; контроллер резолвит их через MODX lexicon (в т.ч.[[+permission]],[[+count]]).Тип изменений
Связанные Issues
Closes #446
Как это было протестировано?
Конфигурация тестирования:
Скриншоты (если применимо)
Category ID is requiredНе указан ID категории(ru)Чеклист
Дополнительные заметки
ms3_category_product_published/_unpublished(избегаем коллизии сms3_product_publishedвproduct.inc.php).PermissionMiddleware) — отдельный follow-up, там по-прежнему EN.lexiconMessageOrKeyдля Manager API — follow-up (сейчас дублирует паттернOrdersController).