Skip to content

fix: エージェントコマース用 scope の同意画面表示を翻訳 - #196

Open
nanasess wants to merge 1 commit into
EC-CUBE:4.4from
nanasess:fix/ucp-scope-i18n
Open

fix: エージェントコマース用 scope の同意画面表示を翻訳#196
nanasess wants to merge 1 commit into
EC-CUBE:4.4from
nanasess:fix/ucp-scope-i18n

Conversation

@nanasess

Copy link
Copy Markdown
Collaborator

Summary

  • 権限移譲確認画面 (Resource/template/admin/OAuth/authorization.twig) で ucp:identity などの scope が翻訳されず、翻訳キー api.admin.oauth.scope.ucp:identity.description がそのまま表示されていた問題を修正します
  • 原因は Resource/config/services.yamlscopes.available に追加された acp:* / ucp:* の description が翻訳ファイルに未定義だったことです (read / write / mcp:* のみ定義済みでした)
  • ucp:identity 単体ではなく acp:* / ucp:* の 6 scope すべてが同じ状態だったため、まとめて追加しています

Changes

  • Resource/locale/messages.ja.yaml / Resource/locale/messages.en.yaml
    • scope.acp:checkout.description
    • scope.acp:catalog.description
    • scope.ucp:checkout.description
    • scope.ucp:cart.description
    • scope.ucp:catalog.description
    • scope.ucp:identity.description
  • Tests/Resource/ScopeTranslationTest.php (新規)
    • scopes.available の全 scope について ja / en の scope.<scope>.description が定義済みであることを検証し、scope 追加時の翻訳漏れを検知します

Test plan

  • Tests/Resource/ScopeTranslationTest.php が ja / en 両方で pass すること
  • scope=ucp:identity を含む認可リクエストで同意画面に翻訳済みの文言が表示されること (翻訳キーがそのまま出ないこと)
  • 既存の Tests/Web/Admin/OAuth2Bundle/AuthorizationControllerTest.php (read / write の表示検証) が引き続き pass すること

🤖 Generated with Claude Code

権限移譲確認画面は `api.admin.oauth.scope.<scope>.description` で
要求 scope を表示するが、 `acp:*` / `ucp:*` の翻訳が未定義のため
翻訳キー (例: api.admin.oauth.scope.ucp:identity.description) が
そのまま表示されていた。

`scopes.available` の全 scope 分の説明を ja / en に追加し、
同期漏れを検知するテストを追加する。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 45a59973-4d92-4c9e-b224-a853e1ec3be3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dotani1111 dotani1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ttokoro20240902 ttokoro20240902 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants