From 72e67105454a1c7b3f3d591ff55cd9f8e22544cd Mon Sep 17 00:00:00 2001 From: A <5249513+Dumeng@users.noreply.github.com> Date: Fri, 7 Aug 2026 22:16:32 +0800 Subject: [PATCH] fix(twenty-front): resolve the command menu item i18n rendering issue (#23913) The most command menus item labels are `string`. The original logic prevent it form being translated. Additionally, the `i18n._()` can handle both `string` and `MessageDescriptor` type, so it's safe to remove this logic. Review in cubic --- .../modules/command-menu-item/utils/getCommandMenuItemLabel.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuItemLabel.ts b/packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuItemLabel.ts index 8885a62ae2..b432217c4f 100644 --- a/packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuItemLabel.ts +++ b/packages/twenty-front/src/modules/command-menu-item/utils/getCommandMenuItemLabel.ts @@ -1,5 +1,4 @@ import { i18n, type MessageDescriptor } from '@lingui/core'; -import { isString } from '@sniptt/guards'; import { type Nullable } from 'twenty-shared/types'; import { isDefined } from 'twenty-shared/utils'; @@ -10,5 +9,5 @@ export const getCommandMenuItemLabel = ( return ''; } - return isString(label) ? label : i18n._(label); + return i18n._(label); };