Skip to content

feat: extract text from Logic Components (#9666)#9737

Open
LoneRifle wants to merge 1 commit into
developfrom
feat/4444/i18n-extract-logic-components
Open

feat: extract text from Logic Components (#9666)#9737
LoneRifle wants to merge 1 commit into
developfrom
feat/4444/i18n-extract-logic-components

Conversation

@LoneRifle

Copy link
Copy Markdown
Contributor

Closes #8404
Merges #9666

* extrac text from Logic Component

* fix: use dedicated i18n key for logic aria-label instead of toLowerCase
@LoneRifle LoneRifle requested review from a team and Copilot July 11, 2026 13:55

Copilot AI 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.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR extracts previously hardcoded UI strings in the Admin Form “Logic” sidebar into i18n translations, improving localization support and consistency.

Changes:

  • Expands the Logic locale contract to include new labels/messages (cancel, inactive blocks, mutations, badges, errors).
  • Replaces hardcoded UI text in logic components with react-i18next translation keys.
  • Localizes mutation success toasts using i18n keys.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/frontend/src/i18n/locales/features/admin-form/sidebar/logic/index.ts Extends the Logic locale interface with new keys used by logic UI and toasts.
apps/frontend/src/i18n/locales/features/admin-form/sidebar/logic/en-sg.ts Adds English (SG) strings for the new locale keys.
apps/frontend/src/features/admin-form/create/logic/mutations.ts Moves toast success messages to i18n translations.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/NewLogicBlock/NewLogicBlock.tsx Localizes the “Add logic” submit label.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/LogicContent.tsx Localizes the inline form-logic error message.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/InactiveLogicBlock/InactiveLogicBlock.tsx Localizes inactive-block labels/messages and an aria-label.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/InactiveLogicBlock/FieldLogicBadge.tsx Localizes default badge message + tooltip label with interpolation.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/EditLogicBlock/EditLogicBlock.tsx Localizes aria label name passed into the action group.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/EditLogicBlock/EditCondition/SaveActionGroup.tsx Localizes delete aria-label, save fallback, and cancel button.
apps/frontend/src/features/admin-form/create/logic/components/LogicContent/EditLogicBlock/EditCondition/EditConditionBlock.tsx Localizes “field deleted” validation error message.
apps/frontend/src/features/admin-form/create/logic/CreatePageLogicTab.tsx Localizes the floating “Add logic” button aria-label.

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.

feat(i18n): extract text from Logic Component

3 participants