Skip to content

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Aug 26, 2025

Proposed changes (including videos or screenshots)

Fixes this
Screenshot 2025-08-26 at 10 04 50
The parameters sent to the t function were not being translated themselves

Issue(s)

Steps to test or reproduce

  • Try to create an encrypted channel/team using any language other than english

Further comments

CORE-1359

I've not added tests, since our translation mocks are not working with languages that are not english. I'll be investigating the issue on a separate PR

Summary by CodeRabbit

  • New Features
    • Display encryption hint for discussions (used in Create Discussion).
  • Bug Fixes
    • Fixed missing translation in the create channel/team modal.
    • Localized room-type placeholders in encryption messages for correct display across languages.
  • Tests
    • Added Portuguese (pt-BR) translation tests validating encryption message rendering for channels and teams.
  • Chores
    • Added release metadata bump (patch).

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Aug 26, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2025

🦋 Changeset detected

Latest commit: ea6738c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.57%. Comparing base (4225961) to head (ea6738c).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36799      +/-   ##
===========================================
- Coverage    66.60%   66.57%   -0.03%     
===========================================
  Files         3346     3346              
  Lines       114666   114666              
  Branches     21097    21099       +2     
===========================================
- Hits         76368    76335      -33     
- Misses       35607    35642      +35     
+ Partials      2691     2689       -2     
Flag Coverage Δ
e2e 57.82% <57.14%> (+<0.01%) ⬆️
unit 71.22% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MartinSchoeler MartinSchoeler marked this pull request as ready for review August 26, 2025 18:09
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner August 26, 2025 18:09
Copy link
Contributor

@tiagoevanp tiagoevanp left a comment

Choose a reason for hiding this comment

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

Lint errors to solve...

@dougfabris dougfabris force-pushed the fix/missing-encryption-translation branch from 06b1904 to 987c83e Compare September 1, 2025 21:52
@dougfabris dougfabris added this to the 7.11.0 milestone Sep 1, 2025
@MartinSchoeler MartinSchoeler force-pushed the fix/missing-encryption-translation branch from 987c83e to ae92d66 Compare September 15, 2025 13:43
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Walkthrough

Updates two encryption-hint hooks to pass the localized room type (via t(roomType)), expands their roomType union to include discussion, adds pt-BR tests for translated outputs, updates CreateDiscussion to use the hook for its hint, and adds a changeset bumping @rocket.chat/meteor (patch).

Changes

Cohort / File(s) Summary
Release metadata
\.changeset/new-poems-compare.md
Adds a changeset bumping @rocket.chat/meteor (patch) noting a fix for a missing translation in the create channel/team modal.
Hook localization & signature
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx, apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx
Passes translated room type (roomType: t(roomType)) into Encrypted_not_available and Encrypted_messages translations; expands roomType parameter to include 'discussion'.
Tests (pt-BR)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.spec.tsx
Adds tests asserting Portuguese (pt-BR) outputs for channel/team with different isPrivate/encrypted combinations, verifying the localized roomType interpolation.
CreateDiscussion integration
apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx
Imports useEncryptedRoomDescription('discussion') and replaces conditional hint rendering with a FieldHint that uses the hook's result for { isPrivate: true, encrypted }.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant UI as CreateDiscussion UI
  participant Hook as useEncryptedRoomDescription
  participant I18n as i18n (t)
  participant Trans as Translation keys

  rect rgba(0,128,128,0.06)
    UI->>Hook: getEncryptedHint({ isPrivate: true, encrypted })
    Hook->>I18n: t(roomType)  -- e.g., "discussion" -> "discussão"
    I18n-->>Hook: localizedRoomType
    Hook->>Trans: select template (Encrypted_messages / Encrypted_not_available)
    Trans-->>Hook: formatted message (interpolating localizedRoomType)
    Hook-->>UI: hint string
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • dougfabris
  • cardoso

Poem

I hopped through keys and strings so bright,
gave "discussion" its proper light.
A tiny t, a gentle fix,
now hints sing clear with proper ticks.
Thump-thump — translations feel just right. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately describes the primary change—fixing missing room-type translations in the useEncryptedRoomDescription hook—matching the diff that localizes roomType via t(roomType) and updates hook usage/tests. It is concise, specific to the main issue, and uses a conventional "fix:" prefix.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/missing-encryption-translation

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
.changeset/new-poems-compare.md (1)

5-5: Tighten the changeset description wording.

Be explicit about what was fixed to aid release notes scanning.

-Fixes a missing translation on the create channel/team modal
+Fix missing room type translation in the create channel/team modal
apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (2)

15-17: Also translate roomType in the “encrypted” branch for consistency.

Currently { roomType } may show raw keys in some locales.

-    if (encrypted) {
-      return t('Encrypted_messages', { roomType });
-    }
+    if (encrypted) {
+      return t('Encrypted_messages', { roomType: t(roomType) });
+    }

8-19: Optional: avoid duplicate lookups by computing once.

Minor polish; precompute the localized label and reuse.

   return ({ isPrivate, encrypted }: { isPrivate: boolean; encrypted: boolean }) => {
+    const roomTypeLabel = t(roomType);
     if (!e2eEnabled) {
       return t('Not_available_for_this_workspace');
     }
     if (!isPrivate) {
-      return t('Encrypted_not_available', { roomType: t(roomType) });
+      return t('Encrypted_not_available', { roomType: roomTypeLabel });
     }
     if (encrypted) {
-      return t('Encrypted_messages', { roomType: t(roomType) });
+      return t('Encrypted_messages', { roomType: roomTypeLabel });
     }
     return t('Encrypted_messages_false');
   };
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (2)

15-17: Mirror the consistency fix here as well.

Localize roomType in the “encrypted” branch.

-    if (encrypted) {
-      return t('Encrypted_messages', { roomType });
-    }
+    if (encrypted) {
+      return t('Encrypted_messages', { roomType: t(roomType) });
+    }

8-19: Optional: precompute the localized roomType.

Small readability/perf tidy-up.

   return ({ isPrivate, encrypted }: { isPrivate: boolean; encrypted: boolean }) => {
+    const roomTypeLabel = t(roomType);
     if (!e2eEnabled) {
       return t('Not_available_for_this_workspace');
     }
     if (!isPrivate) {
-      return t('Encrypted_not_available', { roomType: t(roomType) });
+      return t('Encrypted_not_available', { roomType: roomTypeLabel });
     }
     if (encrypted) {
-      return t('Encrypted_messages', { roomType: t(roomType) });
+      return t('Encrypted_messages', { roomType: roomTypeLabel });
     }
     return t('Encrypted_messages_false');
   };
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5ee569 and ae92d66.

📒 Files selected for processing (3)
  • .changeset/new-poems-compare.md (1 hunks)
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1 hunks)
  • apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (1)
apps/meteor/app/utils/lib/i18n.ts (1)
  • t (6-6)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1)
apps/meteor/app/utils/lib/i18n.ts (1)
  • t (6-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1)

13-13: Good fix: localizes the roomType placeholder.

Matches the change in the sidebar hook.

Reuse the same verification script to confirm keys and placeholders are present (see prior comment).

apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (1)

13-13: Good fix — localizes the roomType placeholder.

Verified: the Encrypted_not_available / Encrypted_messages keys and the 'channel' / 'team' translation keys exist and many locales use {{roomType}}. However several locale files still hard‑code "Channel(s)" or omit the {{roomType}} placeholder (examples: packages/i18n/src/locales/zh-TW.i18n.json, packages/i18n/src/locales/ja.i18n.json, packages/i18n/src/locales/fr.i18n.json, packages/i18n/src/locales/nl.i18n.json). Update those locale entries to use {{roomType}} so t(roomType) renders the translated label.

@MartinSchoeler MartinSchoeler force-pushed the fix/missing-encryption-translation branch from ae92d66 to d69eaf9 Compare September 15, 2025 19:45
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.spec.tsx (2)

58-133: Broaden coverage to the sidebar hook and DRY test setup.

The pt-BR tests validate only the NavBarV2 hook. Since both hooks were changed to pass t(roomType), add parity tests for the sidebar hook and factor a shared pt-BR wrapper. Also avoid shadowing Jest’s global describe by renaming the local variable.

Apply this diff:

-describe('useEncryptedRoomDescription, Portuguese (pt-BR)', () => {
-  it('returns "Encrypted_not_available" when channel is not private and E2E is enabled,', () => {
-    const { result } = renderHook(() => useEncryptedRoomDescription('channel'), {
-      wrapper: mockAppRoot()
-        .withSetting('E2E_Enable', true)
-        .withDefaultLanguage('pt-BR')
-        .withTranslations('pt-BR', 'core', {
-          Encrypted_not_available: 'Indisponível para {{roomType}} público',
-          channel: 'canal',
-          team: 'equipe',
-        })
-        .build(),
-    });
-    const describe = result.current;
-    expect(describe({ isPrivate: false, encrypted: false })).toBe('Indisponível para canal público');
-  });
-
-  it('returns "Encrypted_not_available" when team is not private and E2E is enabled,', () => {
-    const { result } = renderHook(() => useEncryptedRoomDescription('team'), {
-      wrapper: mockAppRoot()
-        .withSetting('E2E_Enable', true)
-        .withDefaultLanguage('pt-BR')
-        .withTranslations('pt-BR', 'core', {
-          Encrypted_not_available: 'Indisponível para {{roomType}} público',
-          channel: 'canal',
-          team: 'equipe',
-        })
-        .build(),
-    });
-    const describe = result.current;
-    expect(describe({ isPrivate: false, encrypted: false })).toBe('Indisponível para equipe público');
-  });
-
-  it('returns "Encrypted_messages" when channel is private and encrypted are true and E2E is enabled', () => {
-    const { result } = renderHook(() => useEncryptedRoomDescription('channel'), {
-      wrapper: mockAppRoot()
-        .withSetting('E2E_Enable', true)
-        .withDefaultLanguage('pt-BR')
-        .withTranslations('pt-BR', 'core', {
-          // TODO: Improve the portuguese translation with a way to captalize the room type for it to be in the start of the sentence
-          Encrypted_messages:
-            'Criptografado de ponta a ponta {{roomType}}. A pesquisa não funcionará com {{roomType}} criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
-          team: 'equipe',
-          channel: 'canal',
-        })
-        .build(),
-    });
-    const describe = result.current;
-    expect(describe({ isPrivate: true, encrypted: true })).toBe(
-      'Criptografado de ponta a ponta canal. A pesquisa não funcionará com canal criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
-    );
-  });
-
-  it('returns "Encrypted_messages" when team is private and encrypted are true and E2E is enabled', () => {
-    const { result } = renderHook(() => useEncryptedRoomDescription('team'), {
-      wrapper: mockAppRoot()
-        .withSetting('E2E_Enable', true)
-        .withTranslations('pt-BR', 'core', {
-          Encrypted_messages:
-            'Criptografado de ponta a ponta {{roomType}}. A pesquisa não funcionará com {{roomType}} criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
-          channel: 'canal',
-          team: 'equipe',
-        })
-        .withDefaultLanguage('pt-BR')
-        .build(),
-    });
-    const describe = result.current;
-    expect(describe({ isPrivate: true, encrypted: true })).toBe(
-      'Criptografado de ponta a ponta equipe. A pesquisa não funcionará com equipe criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
-    );
-  });
-});
+describe.each([
+  ['useEncryptedRoomDescription in NavBarV2', useEncryptedRoomDescription],
+  ['useEncryptedRoomDescription', useEncryptedRoomDescriptionOld],
+] as const)('Portuguese (pt-BR) – %s', (_name, hook) => {
+  const buildPtBrWrapper = () =>
+    mockAppRoot()
+      .withSetting('E2E_Enable', true)
+      .withDefaultLanguage('pt-BR')
+      .withTranslations('pt-BR', 'core', {
+        Encrypted_not_available: 'Indisponível para {{roomType}} público',
+        Encrypted_messages:
+          'Criptografado de ponta a ponta {{roomType}}. A pesquisa não funcionará com {{roomType}} criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
+        channel: 'canal',
+        team: 'equipe',
+      })
+      .build();
+
+  it('returns localized "Encrypted_not_available" for channel', () => {
+    const { result } = renderHook(() => hook('channel'), { wrapper: buildPtBrWrapper() });
+    const getDescription = result.current;
+    expect(getDescription({ isPrivate: false, encrypted: false })).toBe('Indisponível para canal público');
+  });
+
+  it('returns localized "Encrypted_not_available" for team', () => {
+    const { result } = renderHook(() => hook('team'), { wrapper: buildPtBrWrapper() });
+    const getDescription = result.current;
+    expect(getDescription({ isPrivate: false, encrypted: false })).toBe('Indisponível para equipe público');
+  });
+
+  it('returns localized "Encrypted_messages" for channel', () => {
+    const { result } = renderHook(() => hook('channel'), { wrapper: buildPtBrWrapper() });
+    const getDescription = result.current;
+    expect(getDescription({ isPrivate: true, encrypted: true })).toBe(
+      'Criptografado de ponta a ponta canal. A pesquisa não funcionará com canal criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
+    );
+  });
+
+  it('returns localized "Encrypted_messages" for team', () => {
+    const { result } = renderHook(() => hook('team'), { wrapper: buildPtBrWrapper() });
+    const getDescription = result.current;
+    expect(getDescription({ isPrivate: true, encrypted: true })).toBe(
+      'Criptografado de ponta a ponta equipe. A pesquisa não funcionará com equipe criptografado e as notificações podem não mostrar o conteúdo das mensagens.',
+    );
+  });
+});

99-99: Fix TODO typo.

"captalize" -> "capitalize".

-          // TODO: Improve the portuguese translation with a way to captalize the room type for it to be in the start of the sentence
+          // TODO: Improve the Portuguese translation with a way to capitalize the room type when it starts the sentence
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae92d66 and d69eaf9.

📒 Files selected for processing (4)
  • .changeset/new-poems-compare.md (1 hunks)
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.spec.tsx (1 hunks)
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1 hunks)
  • apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/new-poems-compare.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.spec.tsx (3)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1)
  • useEncryptedRoomDescription (4-20)
apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (1)
  • useEncryptedRoomDescription (4-20)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 📦 Meteor Build - coverage
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

please, lets use this hook in CreateDiscussion as well

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx (2)

33-33: Avoid duplicated hook implementations; import from the canonical module (or re‑export one).

This file imports from NavBarV2 while there’s also a copy under sidebar/header/hooks. Prefer a single source to prevent drift.

Apply:

-import { useEncryptedRoomDescription } from '../../NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription';
+import { useEncryptedRoomDescription } from '../../sidebar/header/hooks/useEncryptedRoomDescription';

248-248: Wire the hint to the toggle for better a11y.

Add aria-describedby to the ToggleSwitch so SR users get the hint.

Apply:

-                            render={({ field: { value, ...field } }) => <ToggleSwitch id={encryptedId} {...field} checked={value} />}
+                            render={({ field: { value, ...field } }) => (
+                              <ToggleSwitch id={encryptedId} {...field} checked={value} aria-describedby={`${encryptedId}-hint`} />
+                            )}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d69eaf9 and 50c5569.

📒 Files selected for processing (3)
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (2 hunks)
  • apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx (3 hunks)
  • apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx
🧰 Additional context used
🧬 Code graph analysis (2)
apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx (1)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1)
  • useEncryptedRoomDescription (4-20)
apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (2)
apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.tsx (1)
  • useEncryptedRoomDescription (4-20)
apps/meteor/app/utils/lib/i18n.ts (1)
  • t (6-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 📦 Meteor Build - coverage
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (4)
apps/meteor/client/sidebar/header/hooks/useEncryptedRoomDescription.tsx (3)

4-4: Added 'discussion' to union — LGTM.

Signature expansion looks correct and matches the other hook variant.


13-16: Passing t(roomType) into placeholders — fix looks correct.

This should resolve the missing translations.


13-16: Verify locale keys and Title‑case placeholders exist

rg shows no locale entries for Title‑case "Channel"/"Team"/"Discussion" nor {roomType} in Encrypted_* strings; only matches were in tests (apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/useEncryptedRoomDescription.spec.tsx) and SlackAdapter.js comments. If locales lack Title‑case keys, map roomType at the callsite — suggested change:

+const ROOMTYPE_TKEY = { channel: 'Channel', team: 'Team', discussion: 'Discussion' } as const;
...
- return t('Encrypted_not_available', { roomType: t(roomType) });
+ return t('Encrypted_not_available', { roomType: t(ROOMTYPE_TKEY[roomType]) });
...
- return t('Encrypted_messages', { roomType: t(roomType) });
+ return t('Encrypted_messages', { roomType: t(ROOMTYPE_TKEY[roomType]) });
apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx (1)

95-96: Use of 'discussion' variant — LGTM.

Correctly aligns the hint with Discussion context.

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Sep 16, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 16, 2025
@kodiakhq kodiakhq bot merged commit 3c28676 into develop Sep 17, 2025
85 of 88 checks passed
@kodiakhq kodiakhq bot deleted the fix/missing-encryption-translation branch September 17, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants