Skip to content

Use existing en.json i18n keys for guest policy notifications; resolve nested keys on frontend#7

Draft
Copilot wants to merge 8 commits intofix-pres-zoom-mapfrom
copilot/fix-participant-permissions-tab
Draft

Use existing en.json i18n keys for guest policy notifications; resolve nested keys on frontend#7
Copilot wants to merge 8 commits intofix-pres-zoom-mapfrom
copilot/fix-participant-permissions-tab

Conversation

Copy link

Copilot AI commented Mar 11, 2026

The guest policy change notification was hardcoding English strings in Akka ("Ask moderator", "Always accept", etc.) as messageValues, making them untranslatable and duplicating app.guest-policy.button.* keys already in en.json.

Changes

  • SetGuestPolicyMsgHdlr.scala: Pass the i18n key ("app.guest-policy.button.askModerator" etc.) as messageValues["0"] instead of a hardcoded English label. Use Option[String] to eliminate the empty-string sentinel pattern.

  • notifications/component.tsx: Add useIntl() and a resolveMessageValues helper — any messageValue starting with "app." is resolved via intl.formatMessage({ id: v }) before being passed to <FormattedMessage>, enabling full client-locale translation of nested i18n keys sent from the server.

const resolveMessageValues = (
  messageValues: Record<string, string>,
): Record<string, string> => Object.fromEntries(
  Object.entries(messageValues).map(([k, v]) => [
    k,
    typeof v === 'string' && v.startsWith('app.') ? intl.formatMessage({ id: v }) : v,
  ]),
);
  • en.json: Add missing "app.guest-policy.button.alwaysAcceptAuth": "Always accept authenticated" key (used by the ALWAYS_ACCEPT_AUTH policy type, previously had no corresponding entry).

  • lockViewers.ts (tests): Improve all three presentation permission tests to also assert the correct toast notification fires:

    • presenterPolicyModeratorOnly → asserts "Presenter request is now disabled for viewers"
    • presenterPolicyRequireApproval / presenterPolicyFreeForAll → first set moderatorOnly to enter a state where switching away triggers the "Presenter request is now enabled for viewers" notification, then assert it appears

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing test by adding participantPermissionsTab element Fix: Click participantPermissionsTab before lockEditSharedNotes in lock viewers tests Mar 11, 2026
…ermissionsTab)

Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title Fix: Click participantPermissionsTab before lockEditSharedNotes in lock viewers tests Fix Playwright tests for lock-viewers modal tab navigation Mar 11, 2026
…oval, freeForAll)

Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title Fix Playwright tests for lock-viewers modal tab navigation Fix Playwright tests for lock-viewers modal tab navigation + add presentation permission tests Mar 11, 2026
…bcam step

Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title Fix Playwright tests for lock-viewers modal tab navigation + add presentation permission tests Add Playwright tests for presentation permission tab options (moderatorOnly, requireApproval, freeForAll) Mar 11, 2026
…on#24672)

Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title Add Playwright tests for presentation permission tab options (moderatorOnly, requireApproval, freeForAll) Restore guest policy change notifications & remove redundant webcam lock from presenterPolicyModeratorOnly test Mar 11, 2026
Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title Restore guest policy change notifications & remove redundant webcam lock from presenterPolicyModeratorOnly test Restore guest policy change notifications removed by #24672 Mar 12, 2026
… presentation permission tests

Co-authored-by: germanocaumo <2726293+germanocaumo@users.noreply.github.com>
Copilot AI changed the title Restore guest policy change notifications removed by #24672 Use existing en.json i18n keys for guest policy notifications; resolve nested keys on frontend Mar 12, 2026
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.

2 participants