Skip to content

The open alternative to Salesforce, designed for AI.

Replace Lingui skip comments with doNotTranslate() (#28168)

Charles Bochete76e7e3d14cf
diff --git a/CLAUDE.md b/CLAUDE.md
index 0dd231f6187..e2a9a4e6a4b 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -14,7 +14,7 @@ Where this repo differs from your defaults:
- Prefer event handlers over `useEffect` for state updates.
- No abbreviations in names (`fieldMetadata`, not `fm`); constants in SCREAMING_SNAKE_CASE; component props types suffixed `Props`.
- Use existing guards and helpers before writing your own: `isDefined`, `isNonEmptyArray`, `isPlainObject`, … from `twenty-shared/utils`; `isNonEmptyString`, `isString`, `isNull`, `isObject`, … from `@sniptt/guards`. Reimplementing an existing util is the most common AI-authored defect here.
-- Lingui for user-facing strings; Linaria (zero-runtime, styled-components pattern) for twenty-front styling.
+- Lingui for user-facing strings, `doNotTranslate()` from `twenty-shared/i18n` for text that must stay as written (error diagnostics, protocol tokens); Linaria (zero-runtime, styled-components pattern) for twenty-front styling.
- For Twenty product concepts, consult `packages/twenty-ui/src/icon/icon-dictionary.md` and use the canonical icon.
- Import icons from `twenty-ui/icon`, never directly from `@tabler/icons-react`; action and status concepts should use their action or status icons.
- Test behavior, not implementation: query by user-visible text/roles, `@testing-library/user-event` for interactions.
diff --git a/packages/twenty-companion/src/main/main.ts b/packages/twenty-companion/src/main/main.ts
index 227b07f4a01..3b5292c6f08 100644
--- a/packages/twenty-companion/src/main/main.ts
+++ b/packages/twenty-companion/src/main/main.ts
@@ -22,6 +22,7 @@ import { getTrayTitle } from './utils/getTrayTitle';
import { commandSchema } from '../shared/validation-schemas/commandSchema';
import { type CompanionPage } from '../shared/types/CompanionPage';
import { i18n } from '../shared/i18n';
+import { doNotTranslate } from '../shared/utils/doNotTranslate';
let mainWindow: BrowserWindow;
let tray: Tray;
@@ -123,23 +124,20 @@ const assertSender = (event: Electron.IpcMainInvokeEvent) => {
? new URL(url).origin !== expected
: url.split('#')[0] !== expected)
)
- // Security diagnostics stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Untrusted companion window.');
+ throw new Error(doNotTranslate('Untrusted companion window.'));
};
// Keep existing connections and settings when the visible app name changes.
if (!SMOKE)
- // This path identifies existing encrypted settings and must remain stable.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- app.setPath('userData', join(app.getPath('appData'), 'Twenty Companion'));
+ app.setPath(
+ 'userData',
+ join(app.getPath('appData'), doNotTranslate('Twenty Companion')),
+ );
if (!app.requestSingleInstanceLock()) app.quit();
else {
// Electron binds macOS encryption to this name before ready.
- // Electron binds encryption to this fixed app name before startup.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- app.setName('Twenty Companion');
+ app.setName(doNotTranslate('Twenty Companion'));
if (SMOKE) {
const directory = mkdtempSync(join(tmpdir(), 'twenty-companion-smoke-'));
app.setPath('userData', directory);
@@ -198,9 +196,7 @@ else {
join(__dirname, '../assets/trayLogo.png'),
);
if (trayImage.isEmpty()) {
- // This is a packaging invariant, not copy shown in normal operation.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('The menu bar icon is missing.');
+ throw new Error(doNotTranslate('The menu bar icon is missing.'));
}
if (process.platform === 'darwin') trayImage.setTemplateImage(true);
tray = new Tray(trayImage, '8fd0b192-e117-4987-8b6f-98ef6f6f0c35');
@@ -224,9 +220,7 @@ else {
},
{
label: i18n._('Meeting menu'),
- // Electron parses accelerators as fixed tokens.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- accelerator: 'CommandOrControl+Shift+M',
+ accelerator: doNotTranslate('CommandOrControl+Shift+M'),
click: () => {
updateTrayMenu();
tray.popUpContextMenu();
@@ -234,9 +228,7 @@ else {
},
{
label: i18n._('Settings…'),
- // Electron parses accelerators as fixed tokens.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- accelerator: 'CommandOrControl+,',
+ accelerator: doNotTranslate('CommandOrControl+,'),
click: () => showApp('settings'),
},
{ type: 'separator' },
@@ -248,9 +240,7 @@ else {
{ role: 'windowMenu' },
]),
);
- // Electron parses accelerators as fixed tokens.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- updateApplicationMenu('CommandOrControl+Shift+Space');
+ updateApplicationMenu(doNotTranslate('CommandOrControl+Shift+Space'));
let registeredOpenShortcut: string | undefined;
companion = new Companion(
(state) => {
@@ -322,9 +312,7 @@ else {
});
if (DEVELOPMENT_URL) {
if (new URL(DEVELOPMENT_URL).origin !== 'http://127.0.0.1:4317')
- // The fixed development origin prevents a renderer trust bypass.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Unexpected development server.');
+ throw new Error(doNotTranslate('Unexpected development server.'));
await mainWindow.loadURL(DEVELOPMENT_URL);
} else {
await mainWindow.loadFile(RENDERER_PATH);
@@ -347,9 +335,9 @@ else {
!trayMenu?.items.length
)
throw new Error(
- // Smoke diagnostics identify failed startup invariants.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'The main window must establish secure IPC and the native tray menu must be ready.',
+ doNotTranslate(
+ 'The main window must establish secure IPC and the native tray menu must be ready.',
+ ),
);
console.log(
'Companion smoke passed: one main window, native tray menu, secure IPC, native Recall SDK.',
diff --git a/packages/twenty-companion/src/main/services/RecordingController.ts b/packages/twenty-companion/src/main/services/RecordingController.ts
index b8f8b35b3b4..71d9cc0fa00 100644
--- a/packages/twenty-companion/src/main/services/RecordingController.ts
+++ b/packages/twenty-companion/src/main/services/RecordingController.ts
@@ -11,6 +11,7 @@ import { type CompanionState } from '../../shared/types/CompanionState';
import { matchMeeting } from '../../shared/utils/matchMeeting';
import { type TwentyClient } from './TwentyClient';
import { i18n } from '../../shared/i18n';
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
const RECALL_REGIONS = new Set([
'https://eu-central-1.recall.ai',
@@ -195,14 +196,11 @@ export class RecordingController {
private async openPermissionSettings(
permission: 'microphone' | 'system-audio' | 'accessibility',
): Promise<void> {
- // macOS preference pane IDs are fixed operating system identifiers.
- // oxlint-disable lingui/no-unlocalized-strings
const pane = {
- microphone: 'Privacy_Microphone',
- accessibility: 'Privacy_Accessibility',
- 'system-audio': 'Privacy_ScreenCapture',
+ microphone: doNotTranslate('Privacy_Microphone'),
+ accessibility: doNotTranslate('Privacy_Accessibility'),
+ 'system-audio': doNotTranslate('Privacy_ScreenCapture'),
}[permission];
- // oxlint-enable lingui/no-unlocalized-strings
await shell.openExternal(
`x-apple.systempreferences:com.apple.preference.security?${pane}`,
);
@@ -370,9 +368,7 @@ export class RecordingController {
const call = {
id: window.id,
title: window.title ?? i18n._('Detected call'),
- // Platform is sent to the recording API and must not depend on locale.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- platform: window.platform ?? 'Meeting',
+ platform: window.platform ?? doNotTranslate('Meeting'),
url: window.url,
};
this.state.detectedCalls = [
diff --git a/packages/twenty-companion/src/main/utils/connectOAuth.ts b/packages/twenty-companion/src/main/utils/connectOAuth.ts
index 9a99af8044e..14b490bf149 100644
--- a/packages/twenty-companion/src/main/utils/connectOAuth.ts
+++ b/packages/twenty-companion/src/main/utils/connectOAuth.ts
@@ -6,6 +6,7 @@ import { type Credentials } from '../types/Credentials';
import { validateServerUrl } from './validateServerUrl';
import { requestJson } from './requestJson';
import { i18n } from '../../shared/i18n';
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
export const connectOAuth = async (
serverUrlInput: string,
@@ -103,9 +104,7 @@ export const connectOAuth = async (
client_id: clientId,
response_type: 'code',
redirect_uri: redirectUri,
- // OAuth scopes are protocol identifiers shared with Twenty.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- scope: 'api profile',
+ scope: doNotTranslate('api profile'),
state,
code_challenge: challenge,
code_challenge_method: 'S256',
diff --git a/packages/twenty-companion/src/main/utils/createTrayMenuTemplate.ts b/packages/twenty-companion/src/main/utils/createTrayMenuTemplate.ts
index 3bb65cda7a6..836e098fab1 100644
--- a/packages/twenty-companion/src/main/utils/createTrayMenuTemplate.ts
+++ b/packages/twenty-companion/src/main/utils/createTrayMenuTemplate.ts
@@ -5,6 +5,7 @@ import { type CompanionCommand } from '../../shared/types/CompanionCommand';
import { type CompanionPage } from '../../shared/types/CompanionPage';
import { type CompanionState } from '../../shared/types/CompanionState';
import { type Meeting } from '../../shared/types/Meeting';
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
type TrayMenuActions = {
command: (command: CompanionCommand) => void;
@@ -248,9 +249,7 @@ export const createTrayMenuTemplate = (
},
{
label: i18n._('Settings…'),
- // Electron parses accelerators as fixed tokens.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- accelerator: 'CommandOrControl+,',
+ accelerator: doNotTranslate('CommandOrControl+,'),
click: () => actions.openApp('settings'),
},
{ type: 'separator' },
diff --git a/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx b/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx
index 73318e43376..a3cc0b8d006 100644
--- a/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx
+++ b/packages/twenty-companion/src/renderer/components/CompanionTheme.tsx
@@ -6,19 +6,18 @@ import '@fontsource/inter/latin-400.css';
import '@fontsource/inter/latin-500.css';
import '@fontsource/inter/latin-600.css';
import { type Settings } from '../../shared/types/Settings';
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
const subscribe = (listener: () => void) => {
- // CSS media queries are browser syntax and cannot be translated.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const query = window.matchMedia('(prefers-color-scheme: dark)');
+ const query = window.matchMedia(
+ doNotTranslate('(prefers-color-scheme: dark)'),
+ );
query.addEventListener('change', listener);
return () => query.removeEventListener('change', listener);
};
const getSnapshot = () =>
- // CSS media queries are browser syntax and cannot be translated.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- window.matchMedia('(prefers-color-scheme: dark)').matches;
+ window.matchMedia(doNotTranslate('(prefers-color-scheme: dark)')).matches;
export const CompanionTheme = ({
appearance,
diff --git a/packages/twenty-companion/src/renderer/utils/createHalftone.ts b/packages/twenty-companion/src/renderer/utils/createHalftone.ts
index 4bfb00e0f7f..2884dcc77ed 100644
--- a/packages/twenty-companion/src/renderer/utils/createHalftone.ts
+++ b/packages/twenty-companion/src/renderer/utils/createHalftone.ts
@@ -1,3 +1,5 @@
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
+
// Based on the supplied Halftone Studio export. The grid stays
// in CSS pixels so resizing the window never magnifies the dashes.
const EFFECT_SCALE = 1.04;
@@ -12,20 +14,16 @@ const ANIMATION_PERIOD_MS = 8_000;
const FRAME_INTERVAL_MS = 1_000 / 24;
-// Shader source is executable GLSL and must remain byte-for-byte stable.
-// oxlint-disable-next-line lingui/no-unlocalized-strings
-const VERTEX_SHADER = `#version 300 es
+const VERTEX_SHADER = doNotTranslate(`#version 300 es
in vec2 position;
out vec2 imagePosition;
void main() {
imagePosition = position * 0.5 + 0.5;
gl_Position = vec4(position, 0.0, 1.0);
}
-`;
+`);
-// Shader source is executable GLSL and must remain byte-for-byte stable.
-// oxlint-disable-next-line lingui/no-unlocalized-strings
-const FRAGMENT_SHADER = `#version 300 es
+const FRAGMENT_SHADER = doNotTranslate(`#version 300 es
precision highp float;
uniform sampler2D sourceImage;
uniform vec2 viewportSize;
@@ -97,7 +95,7 @@ const FRAGMENT_SHADER = `#version 300 es
fragmentColor = vec4(particleColor * particle + inkColor * alpha * (1.0 - particle),
particle + alpha * opacity * (1.0 - particle)) * edgeVisibility;
}
-`;
+`);
const compileShader = (
context: WebGL2RenderingContext,
@@ -105,17 +103,16 @@ const compileShader = (
source: string,
) => {
const shader = context.createShader(shaderType);
- // Shader errors are renderer diagnostics, never UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- if (!shader) throw new Error('Could not create the halftone shader.');
+ if (!shader)
+ throw new Error(doNotTranslate('Could not create the halftone shader.'));
context.shaderSource(shader, source);
context.compileShader(shader);
if (!context.getShaderParameter(shader, context.COMPILE_STATUS)) {
const message = context.getShaderInfoLog(shader);
context.deleteShader(shader);
- // Shader errors are renderer diagnostics, never UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error(message ?? 'Could not compile the halftone shader.');
+ throw new Error(
+ message ?? doNotTranslate('Could not compile the halftone shader.'),
+ );
}
return shader;
};
@@ -145,9 +142,9 @@ export const createHalftone = (
try {
if (!program || !buffer || !texture)
- // Shader errors are renderer diagnostics, never UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Could not allocate the halftone renderer.');
+ throw new Error(
+ doNotTranslate('Could not allocate the halftone renderer.'),
+ );
shaders.push(compileShader(context, context.VERTEX_SHADER, VERTEX_SHADER));
shaders.push(
compileShader(context, context.FRAGMENT_SHADER, FRAGMENT_SHADER),
@@ -157,9 +154,7 @@ export const createHalftone = (
if (!context.getProgramParameter(program, context.LINK_STATUS))
throw new Error(
context.getProgramInfoLog(program) ??
- // Shader errors are renderer diagnostics, never UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Could not link the halftone shader.',
+ doNotTranslate('Could not link the halftone shader.'),
);
context.useProgram(program);
context.bindBuffer(context.ARRAY_BUFFER, buffer);
@@ -232,9 +227,9 @@ export const createHalftone = (
'accentRegion',
);
const edgeFadeUniform = context.getUniformLocation(program, 'edgeFade');
- // CSS media queries are browser syntax and cannot be translated.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
+ const reducedMotion = window.matchMedia(
+ doNotTranslate('(prefers-reduced-motion: reduce)'),
+ );
let animationFrame = 0;
let previousFrame = 0;
let elapsed = 0;
diff --git a/packages/twenty-companion/src/renderer/utils/previewState.ts b/packages/twenty-companion/src/renderer/utils/previewState.ts
index 05a9039e149..9223f959319 100644
--- a/packages/twenty-companion/src/renderer/utils/previewState.ts
+++ b/packages/twenty-companion/src/renderer/utils/previewState.ts
@@ -1,5 +1,6 @@
import { type CompanionState } from '../../shared/types/CompanionState';
import { i18n } from '../../shared/i18n';
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
export const previewState = (initial: CompanionState): CompanionState => {
const now = Date.now();
@@ -9,9 +10,7 @@ export const previewState = (initial: CompanionState): CompanionState => {
const state: CompanionState = {
...initial,
connection: 'connected',
- // Sample identities are proper names, not UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- workspace: { id: 'preview', name: 'Acme' },
+ workspace: { id: 'preview', name: doNotTranslate('Acme') },
calendarConnected: true,
settings: {
...initial.settings,
@@ -86,13 +85,12 @@ export const previewState = (initial: CompanionState): CompanionState => {
startedAt: at(-90),
endedAt: at(-60),
participants: [
- // Sample identities are proper names, not UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- { id: 'email:[email protected]', name: 'Alex Martin' },
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- { id: 'email:[email protected]', name: 'Sam Lee' },
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- { id: 'email:[email protected]', name: 'Jules Garcia' },
+ { id: 'email:[email protected]', name: doNotTranslate('Alex Martin') },
+ { id: 'email:[email protected]', name: doNotTranslate('Sam Lee') },
+ {
+ id: 'email:[email protected]',
+ name: doNotTranslate('Jules Garcia'),
+ },
],
},
{
@@ -101,9 +99,12 @@ export const previewState = (initial: CompanionState): CompanionState => {
status: 'PROCESSING',
startedAt: at(-45),
endedAt: at(-10),
- // Sample identities are proper names, not UI copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- participants: [{ id: 'email:[email protected]', name: 'Morgan Chen' }],
+ participants: [
+ {
+ id: 'email:[email protected]',
+ name: doNotTranslate('Morgan Chen'),
+ },
+ ],
},
{
id: '00000000-0000-4000-8000-000000000009',
diff --git a/packages/twenty-companion/src/renderer/utils/shortcutFromKeyboardEvent.ts b/packages/twenty-companion/src/renderer/utils/shortcutFromKeyboardEvent.ts
index 98dc932bc24..1d647ca06c7 100644
--- a/packages/twenty-companion/src/renderer/utils/shortcutFromKeyboardEvent.ts
+++ b/packages/twenty-companion/src/renderer/utils/shortcutFromKeyboardEvent.ts
@@ -1,3 +1,5 @@
+import { doNotTranslate } from '../../shared/utils/doNotTranslate';
+
type ShortcutKeyboardEvent = Pick<
KeyboardEvent,
'key' | 'code' | 'repeat' | 'metaKey' | 'ctrlKey' | 'altKey' | 'shiftKey'
@@ -16,14 +18,10 @@ export const shortcutFromKeyboardEvent = (
else return null;
// Electron accelerator modifiers are fixed parser tokens.
return [
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- event.metaKey && 'Command',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- event.ctrlKey && 'Control',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- event.altKey && 'Alt',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- event.shiftKey && 'Shift',
+ event.metaKey && doNotTranslate('Command'),
+ event.ctrlKey && doNotTranslate('Control'),
+ event.altKey && doNotTranslate('Alt'),
+ event.shiftKey && doNotTranslate('Shift'),
key,
]
.filter(Boolean)
diff --git a/packages/twenty-companion/src/shared/constants/DEFAULT_SETTINGS.ts b/packages/twenty-companion/src/shared/constants/DEFAULT_SETTINGS.ts
index ca699c2f8c6..46bf7dcaec5 100644
--- a/packages/twenty-companion/src/shared/constants/DEFAULT_SETTINGS.ts
+++ b/packages/twenty-companion/src/shared/constants/DEFAULT_SETTINGS.ts
@@ -1,9 +1,8 @@
import { type Settings } from '../types/Settings';
+import { doNotTranslate } from '../utils/doNotTranslate';
export const DEFAULT_SETTINGS: Settings = {
- // Electron parses accelerators as fixed tokens.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- openShortcut: 'CommandOrControl+Shift+Space',
+ openShortcut: doNotTranslate('CommandOrControl+Shift+Space'),
autoJoin: true,
autoRecord: false,
launchAtLogin: false,
diff --git a/packages/twenty-companion/src/shared/utils/doNotTranslate.ts b/packages/twenty-companion/src/shared/utils/doNotTranslate.ts
new file mode 100644
index 00000000000..f7f12c5f25d
--- /dev/null
+++ b/packages/twenty-companion/src/shared/utils/doNotTranslate.ts
@@ -0,0 +1,2 @@
+// The Lingui lint gate skips arguments of this call: use it for text that must stay as written.
+export const doNotTranslate = <TValue>(value: TValue): TValue => value;
diff --git a/packages/twenty-emails/.oxlintrc.i18n.json b/packages/twenty-emails/.oxlintrc.i18n.json
index e70a4c78284..51f2fa2ce4d 100644
--- a/packages/twenty-emails/.oxlintrc.i18n.json
+++ b/packages/twenty-emails/.oxlintrc.i18n.json
@@ -65,6 +65,7 @@
],
"ignoreFunctions": [
"console.*",
+ "doNotTranslate",
"require",
"styled",
"css",
diff --git a/packages/twenty-front/src/modules/accounts/constants/MicrosoftCalendarsReadWriteScope.ts b/packages/twenty-front/src/modules/accounts/constants/MicrosoftCalendarsReadWriteScope.ts
index 3f70dae9f34..2a9cd0ab37c 100644
--- a/packages/twenty-front/src/modules/accounts/constants/MicrosoftCalendarsReadWriteScope.ts
+++ b/packages/twenty-front/src/modules/accounts/constants/MicrosoftCalendarsReadWriteScope.ts
@@ -1,2 +1,5 @@
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an OAuth scope identifier.
-export const MICROSOFT_CALENDARS_READ_WRITE_SCOPE = 'Calendars.ReadWrite';
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+export const MICROSOFT_CALENDARS_READ_WRITE_SCOPE = doNotTranslate(
+ 'Calendars.ReadWrite',
+);
diff --git a/packages/twenty-front/src/modules/accounts/constants/MicrosoftSendScope.ts b/packages/twenty-front/src/modules/accounts/constants/MicrosoftSendScope.ts
index aca9b58d963..83b0203ef92 100644
--- a/packages/twenty-front/src/modules/accounts/constants/MicrosoftSendScope.ts
+++ b/packages/twenty-front/src/modules/accounts/constants/MicrosoftSendScope.ts
@@ -1,2 +1,3 @@
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an OAuth scope identifier.
-export const MICROSOFT_SEND_SCOPE = 'Mail.Send';
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+export const MICROSOFT_SEND_SCOPE = doNotTranslate('Mail.Send');
diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx
index bd3f557e2ef..bb2630c7ee2 100644
--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx
+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarDayCardContent.tsx
@@ -6,6 +6,7 @@ import { getCalendarEventStartDate } from '@/activities/calendar/utils/getCalend
import { Card } from 'twenty-ui/primitives/surfaces';
import { themeCssVariables } from 'twenty-ui/theme';
import { type TimelineCalendarEvent } from '~/generated/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
type CalendarDayCardContentProps = {
calendarEvents: TimelineCalendarEvent[];
@@ -62,8 +63,7 @@ export const CalendarDayCardContent = ({
const endOfDayDate = endOfDay(getCalendarEventStartDate(calendarEvents[0]));
const dayEndsIn = differenceInSeconds(endOfDayDate, Date.now());
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- const weekDayLabel = format(endOfDayDate, 'EE');
+ const weekDayLabel = format(endOfDayDate, doNotTranslate('EE'));
const monthDayLabel = format(endOfDayDate, 'dd');
return (
diff --git a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx
index 0d9b49d76e3..ed7c8aa6447 100644
--- a/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx
+++ b/packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx
@@ -16,6 +16,7 @@ import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMembe
import { useOpenCalendarEventInSidePanel } from '@/side-panel/hooks/useOpenCalendarEventInSidePanel';
import { IconArrowRight } from 'twenty-ui/icon';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
type CalendarEventRowProps = {
calendarEvent: TimelineCalendarEvent;
@@ -84,10 +85,10 @@ export const CalendarEventRow = ({
const startTimeLabel = calendarEvent.isFullDay
? t`All day`
- : // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- format(startsAt, 'HH:mm');
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- const endTimeLabel = calendarEvent.isFullDay ? '' : format(endsAt, 'HH:mm');
+ : format(startsAt, doNotTranslate('HH:mm'));
+ const endTimeLabel = calendarEvent.isFullDay
+ ? ''
+ : format(endsAt, doNotTranslate('HH:mm'));
const isCurrentWorkspaceMemberAttending = calendarEvent.participants?.some(
({ workspaceMemberId }) => workspaceMemberId === currentWorkspaceMember?.id,
diff --git a/packages/twenty-front/src/modules/activities/calendar/hooks/useCalendarEventComposer.ts b/packages/twenty-front/src/modules/activities/calendar/hooks/useCalendarEventComposer.ts
index 0b26d7b0bde..2f3a6cb42ad 100644
--- a/packages/twenty-front/src/modules/activities/calendar/hooks/useCalendarEventComposer.ts
+++ b/packages/twenty-front/src/modules/activities/calendar/hooks/useCalendarEventComposer.ts
@@ -27,6 +27,7 @@ import { Temporal } from 'temporal-polyfill';
import { MAX_EMAIL_RECIPIENTS } from 'twenty-shared/constants';
import { CoreObjectNameSingular } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { type SelectOption } from 'twenty-ui/primitives/input';
@@ -53,8 +54,9 @@ export const useCalendarEventComposer = ({
const [title, setTitle] = useState('');
const [description, setDescription] = useState('');
const [location, setLocation] = useState('');
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- const [timeZone, setTimeZone] = useState(initialValues?.timeZone ?? 'UTC');
+ const [timeZone, setTimeZone] = useState(
+ initialValues?.timeZone ?? doNotTranslate('UTC'),
+ );
const [isFullDay, setIsFullDay] = useState(false);
const [attendees, setAttendees] = useState<EmailRecipient[]>(() =>
parseEmailRecipients(initialValues?.defaultAttendees ?? '').map(
@@ -75,8 +77,7 @@ export const useCalendarEventComposer = ({
const [dates, setDates] = useState(() =>
getCalendarEventComposerDefaultDates({
now: Temporal.Now.instant(),
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- timeZone: initialValues?.timeZone ?? 'UTC',
+ timeZone: initialValues?.timeZone ?? doNotTranslate('UTC'),
}),
);
diff --git a/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx b/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx
index 946a358c05c..3c21e848fdb 100644
--- a/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx
+++ b/packages/twenty-front/src/modules/activities/components/ComposerFieldRow.tsx
@@ -1,15 +1,16 @@
import { styled } from '@linaria/react';
import { type MouseEvent, type MouseEventHandler, type ReactNode } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
import { COMPOSER_LABEL_MIN_WIDTH } from '@/activities/constants/ComposerLabelMinWidth';
const ROW_MIN_HEIGHT = '40px';
-const NESTED_CONTROL_SELECTOR =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS selector for focusable elements.
- 'input, textarea, button, a[href], [role="button"]';
+const NESTED_CONTROL_SELECTOR = doNotTranslate(
+ 'input, textarea, button, a[href], [role="button"]',
+);
const StyledContent = styled.div`
align-items: center;
diff --git a/packages/twenty-front/src/modules/activities/emails/hooks/useReplyContext.ts b/packages/twenty-front/src/modules/activities/emails/hooks/useReplyContext.ts
index 337e3e06fad..3292f35a05f 100644
--- a/packages/twenty-front/src/modules/activities/emails/hooks/useReplyContext.ts
+++ b/packages/twenty-front/src/modules/activities/emails/hooks/useReplyContext.ts
@@ -7,6 +7,7 @@ import {
} from '@/activities/emails/types/ReplyContext';
import { getReplyToRecipients } from '@/activities/emails/utils/getReplyToRecipients';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export type { ReplyContext, ReplyContextReady };
@@ -58,11 +59,9 @@ export const useReplyContext = (
});
const rawSubject = lastSentMessage.subject ?? '';
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Re: is the standard email reply prefix used for threading.
- const subject = rawSubject.startsWith('Re: ')
+ const subject = rawSubject.startsWith(doNotTranslate('Re: '))
? rawSubject
- : // oxlint-disable-next-line lingui/no-unlocalized-strings -- Re: is the standard email reply prefix used for threading.
- `Re: ${rawSubject}`;
+ : doNotTranslate(`Re: ${rawSubject}`);
return {
loading: false,
diff --git a/packages/twenty-front/src/modules/activities/emails/hooks/useUploadEmailImage.ts b/packages/twenty-front/src/modules/activities/emails/hooks/useUploadEmailImage.ts
index d73f25103b7..d16b4631e63 100644
--- a/packages/twenty-front/src/modules/activities/emails/hooks/useUploadEmailImage.ts
+++ b/packages/twenty-front/src/modules/activities/emails/hooks/useUploadEmailImage.ts
@@ -8,6 +8,7 @@ import { useDirectFileUpload } from '@/file/hooks/useDirectFileUpload';
import { formatFileSize } from '@/file/utils/formatFileSize';
import { useToast } from 'twenty-ui/components/feedback';
import { logError } from '~/utils/logError';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useUploadEmailImage = () => {
const { uploadFile } = useDirectFileUpload();
@@ -21,8 +22,9 @@ export const useUploadEmailImage = () => {
) {
enqueueToast({ status: 'error', children: t`Unsupported image format` });
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- A translated toast has already explained this upload failure.
- throw new Error(`Unsupported email image MIME type: ${file.type}`);
+ throw new Error(
+ doNotTranslate(`Unsupported email image MIME type: ${file.type}`),
+ );
}
if (file.size > MAX_ATTACHMENT_SIZE) {
@@ -34,8 +36,9 @@ export const useUploadEmailImage = () => {
children: t`Image "${fileName}" exceeds ${maxUploadSize}`,
});
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- A translated toast has already explained this upload failure.
- throw new Error('Email image exceeds the maximum upload size');
+ throw new Error(
+ doNotTranslate('Email image exceeds the maximum upload size'),
+ );
}
try {
diff --git a/packages/twenty-front/src/modules/activities/graphql/operation-signatures/factories/findActivityTargetsOperationSignatureFactory.ts b/packages/twenty-front/src/modules/activities/graphql/operation-signatures/factories/findActivityTargetsOperationSignatureFactory.ts
index 9ee2d81790d..811027abd82 100644
--- a/packages/twenty-front/src/modules/activities/graphql/operation-signatures/factories/findActivityTargetsOperationSignatureFactory.ts
+++ b/packages/twenty-front/src/modules/activities/graphql/operation-signatures/factories/findActivityTargetsOperationSignatureFactory.ts
@@ -4,6 +4,7 @@ import { generateDepthRecordGqlFieldsFromObject } from '@/object-record/graphql/
import { type RecordGqlOperationSignatureFactory } from '@/object-record/graphql/types/RecordGqlOperationSignatureFactory';
import { getObjectMorphJunctionConfig } from '@/object-record/record-field/ui/utils/junction/getObjectMorphJunctionConfig';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type FindActivityTargetsOperationSignatureFactory = {
objectNameSingular: CoreObjectNameSingular.Note | CoreObjectNameSingular.Task;
@@ -22,8 +23,9 @@ export const findActivityTargetsOperationSignatureFactory: RecordGqlOperationSig
);
if (!isDefined(activityObjectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- throw new Error('Cannot resolve activity junction metadata');
+ throw new Error(
+ doNotTranslate('Cannot resolve activity junction metadata'),
+ );
}
const junctionConfig = getObjectMorphJunctionConfig({
@@ -32,8 +34,9 @@ export const findActivityTargetsOperationSignatureFactory: RecordGqlOperationSig
});
if (!isDefined(junctionConfig)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- throw new Error('Cannot resolve activity relation on junction object');
+ throw new Error(
+ doNotTranslate('Cannot resolve activity relation on junction object'),
+ );
}
const {
diff --git a/packages/twenty-front/src/modules/activities/hooks/usePrepareFindManyActivitiesQuery.ts b/packages/twenty-front/src/modules/activities/hooks/usePrepareFindManyActivitiesQuery.ts
index c1747d14081..6919973ec29 100644
--- a/packages/twenty-front/src/modules/activities/hooks/usePrepareFindManyActivitiesQuery.ts
+++ b/packages/twenty-front/src/modules/activities/hooks/usePrepareFindManyActivitiesQuery.ts
@@ -16,6 +16,7 @@ import { getJunctionRecordsFromRecord } from '@/object-record/record-field/ui/ut
import { getRelatedRecordIdFromJunction } from '@/object-record/record-field/ui/utils/junction/getRelatedRecordIdFromJunction';
import { type ObjectRecord } from '@/object-record/types/ObjectRecord';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { sortByAscString } from '~/utils/array/sortByAscString';
import { useMemo } from 'react';
@@ -75,8 +76,9 @@ export const usePrepareFindManyActivitiesQuery = ({
if (!targetableObjectMetadataItem) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- `Cannot find object metadata item for targetable object ${targetableObject.targetObjectNameSingular}`,
+ doNotTranslate(
+ `Cannot find object metadata item for targetable object ${targetableObject.targetObjectNameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx
index 3c2c2f92ad7..0ce00a6a188 100644
--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx
+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiff.tsx
@@ -10,6 +10,7 @@ import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/Enriche
import { Trans } from '@lingui/react/macro';
import { FieldMetadataType } from 'twenty-shared/types';
import { themeCssVariables } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
type EventFieldDiffProps = {
fieldDiff: { before: unknown; after: unknown };
@@ -45,8 +46,7 @@ export const EventFieldDiff = ({
diffArtificialRecordStoreId,
}: EventFieldDiffProps) => {
if (!fieldMetadataItem) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- throw new Error('fieldMetadataItem is required');
+ throw new Error(doNotTranslate('fieldMetadataItem is required'));
}
const isRelationFieldDiff =
diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffContainer.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffContainer.tsx
index dc492095024..9bb9f158e00 100644
--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffContainer.tsx
+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventFieldDiffContainer.tsx
@@ -1,6 +1,7 @@
import { EventFieldDiff } from '@/activities/timeline-activities/rows/main-object/components/EventFieldDiff';
import { findFieldMetadataItemByDiffKey } from '@/activities/timeline-activities/utils/findFieldMetadataItemByDiffKey';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { ErrorBoundary } from 'react-error-boundary';
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
@@ -24,8 +25,9 @@ export const EventFieldDiffContainer = ({
if (!isDefined(fieldMetadataItem)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- `Cannot find field metadata item for field name ${diffKey} on object ${mainObjectMetadataItem.nameSingular}`,
+ doNotTranslate(
+ `Cannot find field metadata item for field name ${diffKey} on object ${mainObjectMetadataItem.nameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/utils/filterOutInvalidTimelineActivities.ts b/packages/twenty-front/src/modules/activities/timeline-activities/utils/filterOutInvalidTimelineActivities.ts
index e1256ac8071..15d273bbb72 100644
--- a/packages/twenty-front/src/modules/activities/timeline-activities/utils/filterOutInvalidTimelineActivities.ts
+++ b/packages/twenty-front/src/modules/activities/timeline-activities/utils/filterOutInvalidTimelineActivities.ts
@@ -6,6 +6,7 @@ import { getTimelineActivityLinkedObjectMetadataItem } from '@/activities/timeli
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const keepActivityWithReadableDiff = <
TTimelineActivity extends FilterableTimelineActivity,
@@ -46,8 +47,7 @@ export const filterOutInvalidTimelineActivities = <
);
if (!isDefined(mainObjectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- throw new Error('Object metadata item not found');
+ throw new Error(doNotTranslate('Object metadata item not found'));
}
return timelineActivities
diff --git a/packages/twenty-front/src/modules/activities/utils/getAttachmentPath.ts b/packages/twenty-front/src/modules/activities/utils/getAttachmentPath.ts
index 308981d9689..7532e67e099 100644
--- a/packages/twenty-front/src/modules/activities/utils/getAttachmentPath.ts
+++ b/packages/twenty-front/src/modules/activities/utils/getAttachmentPath.ts
@@ -1,3 +1,5 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export const getAttachmentPath = (attachmentFullPath: string) => {
if (attachmentFullPath.includes('/files-field/')) {
return attachmentFullPath?.split('?')[0];
@@ -11,8 +13,9 @@ export const getAttachmentPath = (attachmentFullPath: string) => {
const rawPath = attachmentFullPath?.split('/files/')[1]?.split('?')[0];
if (!rawPath) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- throw new Error(`Invalid attachment path: ${attachmentFullPath}`);
+ throw new Error(
+ doNotTranslate(`Invalid attachment path: ${attachmentFullPath}`),
+ );
}
if (!rawPath.startsWith('attachment/')) {
@@ -22,8 +25,9 @@ export const getAttachmentPath = (attachmentFullPath: string) => {
const pathParts = rawPath.split('/');
if (pathParts.length < 2) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal activity metadata or attachment-path diagnostic.
- `Invalid attachment path structure: ${rawPath}. Path must have at least two segments.`,
+ doNotTranslate(
+ `Invalid attachment path structure: ${rawPath}. Path must have at least two segments.`,
+ ),
);
}
const filename = pathParts.pop();
diff --git a/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx b/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx
index d59f9f33f87..c537d8ac98e 100644
--- a/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx
+++ b/packages/twenty-front/src/modules/advanced-text-editor/components/FormAdvancedTextFieldInput.tsx
@@ -18,6 +18,7 @@ import { useLingui } from '@lingui/react/macro';
import { type Editor } from '@tiptap/core';
import { type ComponentType, useEffect, useId, useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { LightIconButton } from 'twenty-ui/components/input';
import { IconMaximize } from 'twenty-ui/icon';
import { Field } from 'twenty-ui/primitives/input';
@@ -189,8 +190,9 @@ export const FormAdvancedTextFieldInput = ({
const handleVariableTagInsert = (variableName: string) => {
if (!isDefined(editor)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This invariant is an internal diagnostic.
- 'Expected the editor to be defined when a variable is selected',
+ doNotTranslate(
+ 'Expected the editor to be defined when a variable is selected',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/ButtonNode.ts b/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/ButtonNode.ts
index de1bdff85d4..753c2706b31 100644
--- a/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/ButtonNode.ts
+++ b/packages/twenty-front/src/modules/advanced-text-editor/extensions/blocks/ButtonNode.ts
@@ -5,6 +5,7 @@ import { mergeAttributes, Node } from '@tiptap/core';
import { readBlockStyleAttribute } from '@/advanced-text-editor/extensions/blocks/readBlockStyleAttribute';
import { inlineStyleToCss } from '@/advanced-text-editor/utils/inlineStyleToCss';
import { TIPTAP_NODE_TYPES } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const DEFAULT_BUTTON_STYLE: Record<string, string> = {
backgroundColor: '#1961ed',
@@ -62,8 +63,7 @@ export const ButtonNode = Node.create({
'div',
{
class: 'block-button-wrapper',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This string is CSS syntax for serialized block content.
- style: `text-align: ${node.attrs.align ?? 'left'};`,
+ style: doNotTranslate(`text-align: ${node.attrs.align ?? 'left'};`),
},
[
'div',
diff --git a/packages/twenty-front/src/modules/advanced-text-editor/utils/getBlockHandleAnchorRect.ts b/packages/twenty-front/src/modules/advanced-text-editor/utils/getBlockHandleAnchorRect.ts
index b0affdafbdf..b193ba0684b 100644
--- a/packages/twenty-front/src/modules/advanced-text-editor/utils/getBlockHandleAnchorRect.ts
+++ b/packages/twenty-front/src/modules/advanced-text-editor/utils/getBlockHandleAnchorRect.ts
@@ -1,5 +1,6 @@
import { isNonEmptyString } from '@sniptt/guards';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const acceptFirstLineNode = (node: Node) =>
(node.nodeType === Node.TEXT_NODE &&
@@ -27,8 +28,9 @@ const getFirstLineRect = (blockElement: HTMLElement) => {
return range.getClientRects().item(0);
};
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This selector must remain CSS syntax.
-const TEXT_BLOCK_SELECTOR = 'p, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote';
+const TEXT_BLOCK_SELECTOR = doNotTranslate(
+ 'p, h1, h2, h3, h4, h5, h6, ul, ol, li, blockquote',
+);
const getListItemOwningFirstLine = (blockElement: HTMLElement) => {
if (blockElement instanceof HTMLLIElement) {
diff --git a/packages/twenty-front/src/modules/advanced-text-editor/utils/sanitizeHtmlPreview.ts b/packages/twenty-front/src/modules/advanced-text-editor/utils/sanitizeHtmlPreview.ts
index cc5f801c8f7..921729c8d15 100644
--- a/packages/twenty-front/src/modules/advanced-text-editor/utils/sanitizeHtmlPreview.ts
+++ b/packages/twenty-front/src/modules/advanced-text-editor/utils/sanitizeHtmlPreview.ts
@@ -1,6 +1,8 @@
-const BLOCKED_ELEMENT_SELECTOR =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This sanitizer blocklist must remain CSS selector syntax.
- 'script, iframe, frame, object, embed, link, meta, base, style, svg, math, template';
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+const BLOCKED_ELEMENT_SELECTOR = doNotTranslate(
+ 'script, iframe, frame, object, embed, link, meta, base, style, svg, math, template',
+);
const URL_ATTRIBUTE_NAMES = ['href', 'src', 'xlink:href', 'action'];
diff --git a/packages/twenty-front/src/modules/ai/components/internal/AiChatToolCallApprovalRecordFields.tsx b/packages/twenty-front/src/modules/ai/components/internal/AiChatToolCallApprovalRecordFields.tsx
index 06db9719274..8991ff69b13 100644
--- a/packages/twenty-front/src/modules/ai/components/internal/AiChatToolCallApprovalRecordFields.tsx
+++ b/packages/twenty-front/src/modules/ai/components/internal/AiChatToolCallApprovalRecordFields.tsx
@@ -2,6 +2,7 @@ import { styled } from '@linaria/react';
import { useMemo } from 'react';
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
import { type JsonValue } from 'type-fest';
@@ -66,8 +67,7 @@ export const AiChatToolCallApprovalRecordFields = ({
return [
isFieldRelationManyToOne(fieldDefinition)
- ? // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL relation ID key.
- `${field.name}Id`
+ ? doNotTranslate(`${field.name}Id`)
: field.name,
fieldDefinition,
] as const;
diff --git a/packages/twenty-front/src/modules/ai/dictation/utils/readDictationSurface.ts b/packages/twenty-front/src/modules/ai/dictation/utils/readDictationSurface.ts
index 9ff6c8739b6..a11f143bbb3 100644
--- a/packages/twenty-front/src/modules/ai/dictation/utils/readDictationSurface.ts
+++ b/packages/twenty-front/src/modules/ai/dictation/utils/readDictationSurface.ts
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { getSpeechRecognitionConstructor } from '@/ai/dictation/utils/getSpeechRecognitionConstructor';
import { type DictationSurface } from '@/ai/dictation/types/DictationSurface';
@@ -17,8 +18,7 @@ const getIsIOS = (userAgent: string): boolean =>
// matchMedia is missing from some embedded WebViews, so fall back to the legacy iOS flag.
const getIsStandaloneDisplayMode = (): boolean =>
(isDefined(window.matchMedia) &&
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser media query.
- window.matchMedia('(display-mode: standalone)').matches) ||
+ window.matchMedia(doNotTranslate('(display-mode: standalone)')).matches) ||
(navigator as StandaloneNavigator).standalone === true;
export const readDictationSurface = (): DictationSurface => {
diff --git a/packages/twenty-front/src/modules/ai/utils/agentResponseSchemaToOutputSchema.ts b/packages/twenty-front/src/modules/ai/utils/agentResponseSchemaToOutputSchema.ts
index fa075fb9852..9206737feb4 100644
--- a/packages/twenty-front/src/modules/ai/utils/agentResponseSchemaToOutputSchema.ts
+++ b/packages/twenty-front/src/modules/ai/utils/agentResponseSchemaToOutputSchema.ts
@@ -1,5 +1,6 @@
import { type AgentResponseSchema } from 'twenty-shared/ai';
import { type BaseOutputSchemaV2 } from 'twenty-shared/workflow';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const agentResponseSchemaToOutputSchema = (
schema: AgentResponseSchema | undefined,
@@ -9,8 +10,7 @@ export const agentResponseSchemaToOutputSchema = (
response: {
isLeaf: true,
type: 'string',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted output schema field label.
- label: 'Response',
+ label: doNotTranslate('Response'),
value: null,
},
};
diff --git a/packages/twenty-front/src/modules/ai/utils/getModelsDevLogoIcon.tsx b/packages/twenty-front/src/modules/ai/utils/getModelsDevLogoIcon.tsx
index 6c5fcd52d79..6647a81632a 100644
--- a/packages/twenty-front/src/modules/ai/utils/getModelsDevLogoIcon.tsx
+++ b/packages/twenty-front/src/modules/ai/utils/getModelsDevLogoIcon.tsx
@@ -1,6 +1,7 @@
import { type IconComponent, type IconComponentProps } from 'twenty-ui/icon';
import { ModelsDevProviderLogo } from '@/ai/components/ModelsDevProviderLogo';
+import { doNotTranslate } from 'twenty-shared/i18n';
const MODELS_DEV_LOGO_BASE = 'https://models.dev/logos';
@@ -26,8 +27,7 @@ export const getModelsDevLogoIcon = (providerId: string): IconComponent => {
/>
);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- React DevTools needs a stable component display name.
- LogoIcon.displayName = `ModelsDevLogo(${providerId})`;
+ LogoIcon.displayName = doNotTranslate(`ModelsDevLogo(${providerId})`);
logoIconCache.set(providerId, LogoIcon);
diff --git a/packages/twenty-front/src/modules/analytics/hooks/useEventTracker.ts b/packages/twenty-front/src/modules/analytics/hooks/useEventTracker.ts
index 2f7707f3db5..f42c1e18882 100644
--- a/packages/twenty-front/src/modules/analytics/hooks/useEventTracker.ts
+++ b/packages/twenty-front/src/modules/analytics/hooks/useEventTracker.ts
@@ -6,6 +6,7 @@ import {
type MutationTrackAnalyticsArgs,
TrackAnalyticsDocument,
} from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ANALYTICS_COOKIE_NAME = 'analyticsCookie';
export const getSessionId = (): string => {
@@ -19,10 +20,12 @@ export const getSessionId = (): string => {
export const setSessionId = (domain?: string): void => {
const sessionId = getSessionId() || v4();
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser cookie attribute string.
- const baseCookie = `${ANALYTICS_COOKIE_NAME}=${sessionId}; Max-Age=1800; path=/; secure`;
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser cookie attribute string.
- const cookie = domain ? baseCookie + `; domain=${domain}` : baseCookie;
+ const baseCookie = doNotTranslate(
+ `${ANALYTICS_COOKIE_NAME}=${sessionId}; Max-Age=1800; path=/; secure`,
+ );
+ const cookie = domain
+ ? baseCookie + doNotTranslate(`; domain=${domain}`)
+ : baseCookie;
document.cookie = cookie;
};
diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/group-by/utils/normalizeGroupByDimensionValue.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/group-by/utils/normalizeGroupByDimensionValue.ts
index b3afa91e528..eb2a9bba640 100644
--- a/packages/twenty-front/src/modules/apollo/optimistic-effect/group-by/utils/normalizeGroupByDimensionValue.ts
+++ b/packages/twenty-front/src/modules/apollo/optimistic-effect/group-by/utils/normalizeGroupByDimensionValue.ts
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const normalizeGroupByDimensionValue = (
value: any,
@@ -11,8 +12,7 @@ export const normalizeGroupByDimensionValue = (
// TODO: to remove once backend properly returns DATE without time
switch (granularity) {
case 'DAY':
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL protocol token or internal cache diagnostic.
- return dateValue.toISOString().split('T')[0];
+ return dateValue.toISOString().split(doNotTranslate('T'))[0];
case 'MONTH':
return dateValue.toISOString().substring(0, 7);
case 'YEAR':
diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/sortCachedObjectEdges.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/sortCachedObjectEdges.ts
index df7d1f7ff03..5643dafe1b3 100644
--- a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/sortCachedObjectEdges.ts
+++ b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/sortCachedObjectEdges.ts
@@ -11,6 +11,7 @@ import {
type RecordGqlOperationOrderBy,
} from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { sortAsc, sortDesc, sortNullsFirst, sortNullsLast } from '~/utils/sort';
// Extracts the OrderBy direction from a nested orderBy structure
@@ -97,8 +98,7 @@ export const sortCachedObjectEdges = ({
return edges;
}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL protocol token or internal cache diagnostic.
- const isAsc = orderByDirection.startsWith('Asc');
+ const isAsc = orderByDirection.startsWith(doNotTranslate('Asc'));
const isNullsFirst = orderByDirection.endsWith('NullsFirst');
return [...edges].sort((edgeA, edgeB) => {
diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts
index d9d251f2bb4..a7137075d00 100644
--- a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts
+++ b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts
@@ -24,6 +24,7 @@ import {
CustomError,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
type TriggerUpdateRelationsOptimisticEffectArgs = {
@@ -153,8 +154,7 @@ const triggerUpdateRelationOptimisticEffect = ({
});
if (!targetFieldMetadataFullObject) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL protocol token or internal cache diagnostic.
- 'Target field metadata full object not found',
+ doNotTranslate('Target field metadata full object not found'),
'TARGET_FIELD_METADATA_FULL_OBJECT_NOT_FOUND',
);
}
@@ -310,8 +310,7 @@ const triggerUpdateMorphRelationOptimisticEffect = ({
});
if (!targetFieldMetadataFullObject) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL protocol token or internal cache diagnostic.
- 'Target field metadata full object not found',
+ doNotTranslate('Target field metadata full object not found'),
'TARGET_FIELD_METADATA_FULL_OBJECT_NOT_FOUND',
);
}
@@ -429,8 +428,7 @@ const extractTargetRecordsFromRelation = (
return [];
}
if (!isDefined(relation)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL protocol token or internal cache diagnostic.
- throw new Error('Relation found is undefined');
+ throw new Error(doNotTranslate('Relation found is undefined'));
}
if (relation.type === RelationType.ONE_TO_MANY) {
return value.edges.map(({ node }: { node: RecordGqlNode }) => node);
diff --git a/packages/twenty-front/src/modules/apollo/utils/encodeCursor.ts b/packages/twenty-front/src/modules/apollo/utils/encodeCursor.ts
index 0ee093fc2a1..b27c5c66df0 100644
--- a/packages/twenty-front/src/modules/apollo/utils/encodeCursor.ts
+++ b/packages/twenty-front/src/modules/apollo/utils/encodeCursor.ts
@@ -2,11 +2,11 @@ import { type ObjectRecord } from '@/object-record/types/ObjectRecord';
import { Buffer } from 'buffer';
import { base64UrlEncode, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const encodeCursor = (record: ObjectRecord) => {
if (!('id' in record) || !isDefined(record.id)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a GraphQL protocol token or internal cache diagnostic.
- throw new Error('Record does not have an id');
+ throw new Error(doNotTranslate('Record does not have an id'));
}
const payload: {
diff --git a/packages/twenty-front/src/modules/apollo/utils/formatTitle.ts b/packages/twenty-front/src/modules/apollo/utils/formatTitle.ts
index 2408f053184..b65e871a6b1 100644
--- a/packages/twenty-front/src/modules/apollo/utils/formatTitle.ts
+++ b/packages/twenty-front/src/modules/apollo/utils/formatTitle.ts
@@ -1,4 +1,5 @@
import { OperationType } from '@/apollo/types/OperationType';
+import { doNotTranslate } from 'twenty-shared/i18n';
const operationTypeColors = {
// oxlint-disable-next-line twenty/no-hardcoded-colors
@@ -31,19 +32,16 @@ const formatTitle = (
];
const parts = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser console formatting directive or developer log label.
- '%c apollo',
+ doNotTranslate('%c apollo'),
`%c${operationType}`,
`%c${schemaName}::%c${queryName}`,
];
if (operationType !== OperationType.Subscription) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser console formatting directive or developer log label.
- parts.push(`%c(in ${time} ms)`);
+ parts.push(doNotTranslate(`%c(in ${time} ms)`));
headerCss.push('color: gray; font-weight: lighter;'); // time
} else {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser console formatting directive or developer log label.
- parts.push(`%c(@ ${time})`);
+ parts.push(doNotTranslate(`%c(@ ${time})`));
headerCss.push('color: gray; font-weight: lighter;'); // time
}
diff --git a/packages/twenty-front/src/modules/apollo/utils/loggerLink.ts b/packages/twenty-front/src/modules/apollo/utils/loggerLink.ts
index 724e6497e00..54592941d40 100644
--- a/packages/twenty-front/src/modules/apollo/utils/loggerLink.ts
+++ b/packages/twenty-front/src/modules/apollo/utils/loggerLink.ts
@@ -4,6 +4,7 @@ import { logDebug } from '~/utils/logDebug';
import { logError } from '~/utils/logError';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import formatTitle from './formatTitle';
const getGroup = (collapsed: boolean) =>
@@ -13,8 +14,7 @@ const getGroup = (collapsed: boolean) =>
const parseQuery = (queryString: string) => {
if (!queryString.trim()) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser console formatting directive or developer log label.
- return ['Generic', ''];
+ return [doNotTranslate('Generic'), ''];
}
const queryObj = gql`
@@ -22,8 +22,7 @@ const parseQuery = (queryString: string) => {
`;
const { name } = queryObj.definitions[0] as any;
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser console formatting directive or developer log label.
- return [name ? name.value : 'Generic', queryString.trim()];
+ return [name ? name.value : doNotTranslate('Generic'), queryString.trim()];
};
export const loggerLink = (getSchemaName: (operation: Operation) => string) =>
diff --git a/packages/twenty-front/src/modules/apollo/utils/streamingRestLink.ts b/packages/twenty-front/src/modules/apollo/utils/streamingRestLink.ts
index 779db993224..8feb7b48280 100644
--- a/packages/twenty-front/src/modules/apollo/utils/streamingRestLink.ts
+++ b/packages/twenty-front/src/modules/apollo/utils/streamingRestLink.ts
@@ -7,6 +7,7 @@ import {
import { ServerError } from '@apollo/client/errors';
import { type ArgumentNode, type DirectiveNode } from 'graphql';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type StreamingRestLinkOptions = {
uri: string;
@@ -64,16 +65,17 @@ export class StreamingRestLink extends ApolloLink {
fetch(url, requestConfig)
.then(async (response) => {
if (!response.ok) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- HTTP status text is a stable transport diagnostic.
- throw new ServerError(`HTTP error! status: ${response.status}`, {
- response,
- bodyText: '',
- });
+ throw new ServerError(
+ doNotTranslate(`HTTP error! status: ${response.status}`),
+ {
+ response,
+ bodyText: '',
+ },
+ );
}
if (!response.body) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep stream diagnostics stable for issue grouping.
- throw new Error('Response body is null');
+ throw new Error(doNotTranslate('Response body is null'));
}
const reader = response.body.getReader();
@@ -188,8 +190,7 @@ export class StreamingRestLink extends ApolloLink {
return `${this.baseUri}${path}`;
}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only request configuration diagnostic.
- throw new Error('No valid URL found');
+ throw new Error(doNotTranslate('No valid URL found'));
}
private buildRequestConfig({
diff --git a/packages/twenty-front/src/modules/auth/hooks/useAuth.ts b/packages/twenty-front/src/modules/auth/hooks/useAuth.ts
index 3ebe8f3b604..8851d40b230 100644
--- a/packages/twenty-front/src/modules/auth/hooks/useAuth.ts
+++ b/packages/twenty-front/src/modules/auth/hooks/useAuth.ts
@@ -63,6 +63,7 @@ import { i18n } from '@lingui/core';
import { useNavigate, useSearchParams } from 'react-router-dom';
import { SOURCE_LOCALE } from 'twenty-shared/translations';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';
import { isGraphqlErrorOfType } from '~/utils/is-graphql-error-of-type.util';
import { useStore } from 'jotai';
@@ -198,8 +199,7 @@ export const useAuth = () => {
}
if (!getLoginTokenResult.data?.getLoginTokenFromCredentials) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No login token');
+ throw new Error(doNotTranslate('No login token'));
}
return getLoginTokenResult.data.getLoginTokenFromCredentials;
@@ -235,8 +235,7 @@ export const useAuth = () => {
}
if (!loginTokenResult.data?.verifyEmailAndGetLoginToken) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No login token');
+ throw new Error(doNotTranslate('No login token'));
}
return loginTokenResult.data.verifyEmailAndGetLoginToken;
@@ -263,8 +262,9 @@ export const useAuth = () => {
}
if (!data?.verifyEmailAndGetWorkspaceAgnosticToken) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No workspace agnostic token in result');
+ throw new Error(
+ doNotTranslate('No workspace agnostic token in result'),
+ );
}
markSessionActive();
@@ -317,8 +317,9 @@ export const useAuth = () => {
}
if (!getAuthTokensResult.data?.getAuthTokensFromLoginToken) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No getAuthTokensFromLoginToken result');
+ throw new Error(
+ doNotTranslate('No getAuthTokensFromLoginToken result'),
+ );
}
await handleLoadWorkspaceAfterAuthentication();
@@ -414,8 +415,7 @@ export const useAuth = () => {
}
if (!signUpResult.data?.signUp) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No signUp result');
+ throw new Error(doNotTranslate('No signUp result'));
}
markSessionActive();
@@ -499,8 +499,7 @@ export const useAuth = () => {
}
if (!signUpInWorkspaceResult.data?.signUpInWorkspace) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No login token');
+ throw new Error(doNotTranslate('No login token'));
}
if (isEmailVerificationRequired) {
@@ -628,8 +627,7 @@ export const useAuth = () => {
}
if (!getAuthTokensFromOtpResult.data?.getAuthTokensFromOTP) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- throw new Error('No getAuthTokensFromOTP result');
+ throw new Error(doNotTranslate('No getAuthTokensFromOTP result'));
}
await handleLoadWorkspaceAfterAuthentication();
@@ -663,8 +661,9 @@ export const useAuth = () => {
if (!isDefined(redemption)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep auth result diagnostics stable for issue grouping.
- 'No getAuthTokensFromTwoFactorAuthenticationRecoveryCode result',
+ doNotTranslate(
+ 'No getAuthTokensFromTwoFactorAuthenticationRecoveryCode result',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/auth/hooks/useRedeemSsoExchangeToken.ts b/packages/twenty-front/src/modules/auth/hooks/useRedeemSsoExchangeToken.ts
index 57ab1e3c412..e24b3dc58e3 100644
--- a/packages/twenty-front/src/modules/auth/hooks/useRedeemSsoExchangeToken.ts
+++ b/packages/twenty-front/src/modules/auth/hooks/useRedeemSsoExchangeToken.ts
@@ -5,6 +5,7 @@ import { useMutation } from '@apollo/client/react';
import { t } from '@lingui/core/macro';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { GetAuthTokensFromSsoExchangeTokenDocument } from '~/generated-metadata/graphql';
import { logError } from '~/utils/logError';
@@ -30,8 +31,9 @@ export const useRedeemSsoExchangeToken = () => {
});
if (!isDefined(data?.getAuthTokensFromSSOExchangeToken)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep the diagnostic stable for internal reporting.
- throw new Error('No getAuthTokensFromSSOExchangeToken result');
+ throw new Error(
+ doNotTranslate('No getAuthTokensFromSSOExchangeToken result'),
+ );
}
markSessionActive();
diff --git a/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/hooks/useCommandMenuConfirmationModal.ts b/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/hooks/useCommandMenuConfirmationModal.ts
index 6f96aeeaf7e..447054d7633 100644
--- a/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/hooks/useCommandMenuConfirmationModal.ts
+++ b/packages/twenty-front/src/modules/command-menu-item/confirmation-modal/hooks/useCommandMenuConfirmationModal.ts
@@ -9,6 +9,7 @@ import {
import { useDialog } from '@/ui/layout/dialog/hooks/useDialog';
import { isDialogOpenedComponentState } from '@/ui/layout/dialog/states/isDialogOpenedComponentState';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCommandMenuConfirmationModal = () => {
const store = useStore();
@@ -33,8 +34,9 @@ export const useCommandMenuConfirmationModal = () => {
isCommandMenuItemConfirmationModalOpened
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an invariant for competing modal callers.
- 'Command menu item confirmation modal is already active for another caller',
+ doNotTranslate(
+ 'Command menu item confirmation modal is already active for another caller',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/components/HeadlessFrontComponentRendererEngineCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/components/HeadlessFrontComponentRendererEngineCommand.tsx
index cd308570598..7664e8f08b9 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/components/HeadlessFrontComponentRendererEngineCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/components/HeadlessFrontComponentRendererEngineCommand.tsx
@@ -4,6 +4,7 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { CommandComponentInstanceContext } from '@/command-menu-item/engine-command/states/contexts/CommandComponentInstanceContext';
import { isHeadlessFrontComponentCommandContextApi } from '@/command-menu-item/engine-command/utils/isHeadlessFrontComponentCommandContextApi';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
+import { doNotTranslate } from 'twenty-shared/i18n';
const FrontComponentRenderer = lazy(() =>
import('@/front-components/components/FrontComponentRenderer').then(
@@ -20,8 +21,9 @@ export const HeadlessFrontComponentRendererEngineCommand = () => {
if (!isHeadlessFrontComponentCommandContextApi(context)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Context is not a headless front component command context API',
+ doNotTranslate(
+ 'Context is not a headless front component command context API',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi.ts b/packages/twenty-front/src/modules/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi.ts
index d3e19da80ac..215c0fcf856 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi.ts
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi.ts
@@ -3,6 +3,7 @@ import { headlessCommandContextApisState } from '@/command-menu-item/engine-comm
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useHeadlessCommandContextApi = () => {
const engineCommandId = useAvailableComponentInstanceIdOrThrow(
@@ -17,8 +18,9 @@ export const useHeadlessCommandContextApi = () => {
if (!isDefined(headlessCommandContextApi)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Headless command context API not found. Make sure the command was mounted via the command mount flow.',
+ doNotTranslate(
+ 'Headless command context API not found. Make sure the command was mounted via the command mount flow.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddRecordsToMessageListCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddRecordsToMessageListCommand.tsx
index 459cd797384..e4b90e9d9a8 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddRecordsToMessageListCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddRecordsToMessageListCommand.tsx
@@ -2,6 +2,7 @@ import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-c
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { useOpenAddToMessageListInSidePanel } from '@/side-panel/hooks/useOpenAddToMessageListInSidePanel';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const AddRecordsToMessageListCommand = () => {
const { graphqlFilter } = useHeadlessCommandContextApi();
@@ -10,8 +11,9 @@ export const AddRecordsToMessageListCommand = () => {
useOpenAddToMessageListInSidePanel();
if (!isDefined(graphqlFilter)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Selected records filter is required to add to a list');
+ throw new Error(
+ doNotTranslate('Selected records filter is required to add to a list'),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddToFavoritesCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddToFavoritesCommand.tsx
index 6c465eca81c..4f5f7928884 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddToFavoritesCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/AddToFavoritesCommand.tsx
@@ -1,5 +1,6 @@
import { NavigationMenuItemType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 as uuidv4 } from 'uuid';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
@@ -12,8 +13,9 @@ export const AddToFavoritesCommand = () => {
useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata item is required to add to favorites');
+ throw new Error(
+ doNotTranslate('Object metadata item is required to add to favorites'),
+ );
}
const { createManyNavigationMenuItems } = useCreateManyNavigationMenuItems();
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DeleteRecordsCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DeleteRecordsCommand.tsx
index a5bf5c02ad2..be1cb09cf13 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DeleteRecordsCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DeleteRecordsCommand.tsx
@@ -15,14 +15,16 @@ import { PLACEHOLDER_RECORD_INDEX_ID } from '@/object-record/record-index/consta
import { useResetRecordSelection } from '@/object-record/record-selection/hooks/useResetRecordSelection';
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const DeleteWorkspaceRecordsCommand = () => {
const { recordIndexId, objectMetadataItem, selectedRecords, graphqlFilter } =
useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata is required to delete records');
+ throw new Error(
+ doNotTranslate('Object metadata is required to delete records'),
+ );
}
const recordId = selectedRecords[0]?.id;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DestroyRecordsCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DestroyRecordsCommand.tsx
index edb1606c232..b2c628d24d2 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DestroyRecordsCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/DestroyRecordsCommand.tsx
@@ -13,6 +13,7 @@ import {
type RecordGqlOperationFilter,
} from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useNavigateApp } from '~/hooks/useNavigateApp';
export const DestroyRecordsCommand = () => {
@@ -25,8 +26,9 @@ export const DestroyRecordsCommand = () => {
} = useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata is required to destroy records');
+ throw new Error(
+ doNotTranslate('Object metadata is required to destroy records'),
+ );
}
const isSingleRecord = selectedRecords.length === 1;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ExportRecordsCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ExportRecordsCommand.tsx
index 304cbaefaa1..bdcc74640f2 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ExportRecordsCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ExportRecordsCommand.tsx
@@ -14,6 +14,7 @@ import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAt
import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext';
import { useEffect } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const ExportIndexRecordsContent = ({
objectMetadataItem,
@@ -103,8 +104,9 @@ export const ExportRecordsCommand = () => {
);
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata item is required to export records');
+ throw new Error(
+ doNotTranslate('Object metadata item is required to export records'),
+ );
}
const recordId = selectedRecords[0]?.id;
@@ -121,8 +123,9 @@ export const ExportRecordsCommand = () => {
if (!isDefined(recordIndexId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Record index ID is required to export records from index page',
+ doNotTranslate(
+ 'Record index ID is required to export records from index page',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RemoveFromFavoritesCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RemoveFromFavoritesCommand.tsx
index 13795301ef1..90176967bcc 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RemoveFromFavoritesCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RemoveFromFavoritesCommand.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
@@ -10,8 +11,9 @@ export const RemoveFromFavoritesCommand = () => {
useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata is required to remove from favorites');
+ throw new Error(
+ doNotTranslate('Object metadata is required to remove from favorites'),
+ );
}
const { navigationMenuItems, workspaceNavigationMenuItems } =
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RestoreRecordsCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RestoreRecordsCommand.tsx
index 1f57121b9ab..374e8932f3e 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RestoreRecordsCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/RestoreRecordsCommand.tsx
@@ -10,14 +10,16 @@ import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { t } from '@lingui/core/macro';
import { type RecordGqlOperationFilter } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const RestoreRecordsCommand = () => {
const { recordIndexId, objectMetadataItem, selectedRecords, graphqlFilter } =
useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata is required to restore records');
+ throw new Error(
+ doNotTranslate('Object metadata is required to restore records'),
+ );
}
const isSingleRecord = selectedRecords.length === 1;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ShareRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ShareRecordCommand.tsx
index 3878f723f19..3f7b0635b7e 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ShareRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/ShareRecordCommand.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
@@ -10,8 +11,9 @@ export const ShareRecordCommand = () => {
const { openShareRecordInSidePanel } = useOpenShareRecordInSidePanel();
if (!isDefined(objectMetadataItem) || selectedRecords.length !== 1) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Sharing needs exactly one selected record');
+ throw new Error(
+ doNotTranslate('Sharing needs exactly one selected record'),
+ );
}
const handleExecute = () =>
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/TriggerWorkflowVersionEngineCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/TriggerWorkflowVersionEngineCommand.tsx
index 1ea8438d208..5b5538d6885 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/TriggerWorkflowVersionEngineCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/components/TriggerWorkflowVersionEngineCommand.tsx
@@ -14,6 +14,7 @@ import {
type RecordGqlOperationFilter,
} from 'twenty-shared/types';
import { isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const TriggerWorkflowVersionEngineCommand = () => {
const mountedCommandState = useHeadlessCommandContextApi();
@@ -21,8 +22,9 @@ export const TriggerWorkflowVersionEngineCommand = () => {
if (!isHeadlessTriggerWorkflowVersionCommandContextApi(mountedCommandState)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'TriggerWorkflowVersionEngineCommand requires a workflow trigger context',
+ doNotTranslate(
+ 'TriggerWorkflowVersionEngineCommand requires a workflow trigger context',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/multiple-records/components/MergeMultipleRecordsCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/multiple-records/components/MergeMultipleRecordsCommand.tsx
index 783bac4088f..c17925f9094 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/multiple-records/components/MergeMultipleRecordsCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/multiple-records/components/MergeMultipleRecordsCommand.tsx
@@ -2,6 +2,7 @@ import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-c
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { useOpenMergeRecordsPageInSidePanel } from '@/side-panel/hooks/useOpenMergeRecordsPageInSidePanel';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const MergeMultipleRecordsCommand = () => {
const { objectMetadataItem, selectedRecords } =
@@ -11,8 +12,9 @@ export const MergeMultipleRecordsCommand = () => {
if (!isDefined(objectMetadataItem) || selectedRecordIds.length === 0) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Object metadata item and selected records are required to merge multiple records',
+ doNotTranslate(
+ 'Object metadata item and selected records are required to merge multiple records',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/AddViewToMessageListNoSelectionRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/AddViewToMessageListNoSelectionRecordCommand.tsx
index 619ed64aea8..e8b548cd2ca 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/AddViewToMessageListNoSelectionRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/AddViewToMessageListNoSelectionRecordCommand.tsx
@@ -4,6 +4,7 @@ import { useFindManyRecordIndexTableParams } from '@/object-record/record-index/
import { useOpenAddToMessageListInSidePanel } from '@/side-panel/hooks/useOpenAddToMessageListInSidePanel';
import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const AddViewToMessageListContent = ({
objectNameSingular,
@@ -32,8 +33,9 @@ export const AddViewToMessageListNoSelectionRecordCommand = () => {
if (!isDefined(objectMetadataItem) || !isDefined(recordIndexId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Object metadata item and record index ID are required to add a view to a list',
+ doNotTranslate(
+ 'Object metadata item and record index ID are required to add a view to a list',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewIndexRecordNoSelectionRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewIndexRecordNoSelectionRecordCommand.tsx
index 236b22a1bd4..d6e40092165 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewIndexRecordNoSelectionRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewIndexRecordNoSelectionRecordCommand.tsx
@@ -5,6 +5,7 @@ import { useCreateNewIndexRecord } from '@/object-record/record-table/hooks/useC
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
import { FeatureFlagKey } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
export const CreateNewIndexRecordNoSelectionRecordCommand = () => {
@@ -18,8 +19,9 @@ export const CreateNewIndexRecordNoSelectionRecordCommand = () => {
if (!isDefined(objectMetadataItem) || !isDefined(recordIndexId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Object metadata item and record index ID are required to create new index record',
+ doNotTranslate(
+ 'Object metadata item and record index ID are required to create new index record',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewRecordCommand.tsx
index cfbb24394e3..27b484dbf58 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewRecordCommand.tsx
@@ -7,6 +7,7 @@ import { useCreateCoreWorkflow } from '@/object-core/workflows/hooks/useCreateCo
import { objectMetadataItemsSelector } from '@/object-metadata/states/objectMetadataItemsSelector';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const CreateNewRecordCommand = () => {
const {
@@ -24,8 +25,9 @@ export const CreateNewRecordCommand = () => {
const { createCoreWorkflow } = useCreateCoreWorkflow();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata item is required to create a record');
+ throw new Error(
+ doNotTranslate('Object metadata item is required to create a record'),
+ );
}
const commandType = getRecordCreationCommandType({
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewViewNoSelectionRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewViewNoSelectionRecordCommand.tsx
index 732cf0dfe3b..80dd5947adc 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewViewNoSelectionRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/CreateNewViewNoSelectionRecordCommand.tsx
@@ -7,6 +7,7 @@ import { getViewPickerDropdownId } from '@/views/view-picker/utils/getViewPicker
import { useViewPickerMode } from '@/views/view-picker/hooks/useViewPickerMode';
import { viewPickerReferenceViewIdComponentState } from '@/views/view-picker/states/viewPickerReferenceViewIdComponentState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const CreateNewViewNoSelectionRecordCommand = () => {
const { currentViewId, recordIndexId } = useHeadlessCommandContextApi();
@@ -16,8 +17,9 @@ export const CreateNewViewNoSelectionRecordCommand = () => {
if (!isDefined(currentViewId) || !isDefined(recordIndexId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Current view ID and record index ID are required to create new view',
+ doNotTranslate(
+ 'Current view ID and record index ID are required to create new view',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/HideDeletedRecordsNoSelectionRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/HideDeletedRecordsNoSelectionRecordCommand.tsx
index 6a179b3ac66..6c97cf4ec94 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/HideDeletedRecordsNoSelectionRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/HideDeletedRecordsNoSelectionRecordCommand.tsx
@@ -7,14 +7,16 @@ import { useHandleToggleTrashColumnFilter } from '@/object-record/record-index/h
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const HideDeletedRecordsNoSelectionRecordCommand = () => {
const { objectMetadataItem, recordIndexId } = useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem) || !isDefined(recordIndexId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Object metadata item and record index ID are required to hide deleted records',
+ doNotTranslate(
+ 'Object metadata item and record index ID are required to hide deleted records',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/ImportRecordsNoSelectionRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/ImportRecordsNoSelectionRecordCommand.tsx
index 9b67e4d1077..8e1d812f2ee 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/ImportRecordsNoSelectionRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/ImportRecordsNoSelectionRecordCommand.tsx
@@ -3,13 +3,15 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useOpenObjectRecordsSpreadsheetImportDialog } from '@/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreadsheetImportDialog';
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ImportRecordsNoSelectionRecordCommand = () => {
const { objectMetadataItem } = useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Object metadata item is required to import records');
+ throw new Error(
+ doNotTranslate('Object metadata item is required to import records'),
+ );
}
const { openObjectRecordsSpreadsheetImportDialog } =
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/SeeDeletedRecordsNoSelectionRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/SeeDeletedRecordsNoSelectionRecordCommand.tsx
index d0930dc3df6..4224143a1cd 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/SeeDeletedRecordsNoSelectionRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/no-selection/components/SeeDeletedRecordsNoSelectionRecordCommand.tsx
@@ -3,14 +3,16 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useHandleToggleTrashColumnFilter } from '@/object-record/record-index/hooks/useHandleToggleTrashColumnFilter';
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const SeeDeletedRecordsNoSelectionRecordCommand = () => {
const { objectMetadataItem, recordIndexId } = useHeadlessCommandContextApi();
if (!isDefined(objectMetadataItem) || !isDefined(recordIndexId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Object metadata item and record index ID are required to see deleted records',
+ doNotTranslate(
+ 'Object metadata item and record index ID are required to see deleted records',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/ExportNoteSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/ExportNoteSingleRecordCommand.tsx
index 5e16bd63ad5..7c8e5803789 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/ExportNoteSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/ExportNoteSingleRecordCommand.tsx
@@ -2,6 +2,7 @@ import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-c
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ExportNoteSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -11,8 +12,9 @@ export const ExportNoteSingleRecordCommand = () => {
if (!isDefined(recordId) || !isDefined(selectedRecord)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Record ID and selected record are required to export note to PDF',
+ doNotTranslate(
+ 'Record ID and selected record are required to export note to PDF',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToNextRecordSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToNextRecordSingleRecordCommand.tsx
index 4ef15dffc59..eecfbd8ac81 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToNextRecordSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToNextRecordSingleRecordCommand.tsx
@@ -2,6 +2,7 @@ import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-c
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { useRecordShowPagePagination } from '@/object-record/record-show/hooks/useRecordShowPagePagination';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const NavigateToNextRecordSingleRecordCommand = () => {
const { objectMetadataItem, selectedRecords } =
@@ -11,8 +12,9 @@ export const NavigateToNextRecordSingleRecordCommand = () => {
if (!isDefined(recordId) || !isDefined(objectMetadataItem)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Record ID and object metadata are required to navigate to next record',
+ doNotTranslate(
+ 'Record ID and object metadata are required to navigate to next record',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToPreviousRecordSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToPreviousRecordSingleRecordCommand.tsx
index 93ee31ce41e..74622a868c6 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToPreviousRecordSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/components/NavigateToPreviousRecordSingleRecordCommand.tsx
@@ -2,6 +2,7 @@ import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-c
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { useRecordShowPagePagination } from '@/object-record/record-show/hooks/useRecordShowPagePagination';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const NavigateToPreviousRecordSingleRecordCommand = () => {
const { objectMetadataItem, selectedRecords } =
@@ -11,8 +12,9 @@ export const NavigateToPreviousRecordSingleRecordCommand = () => {
if (!isDefined(recordId) || !isDefined(objectMetadataItem)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Record ID and object metadata are required to navigate to previous record',
+ doNotTranslate(
+ 'Record ID and object metadata are required to navigate to previous record',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/CancelDashboardSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/CancelDashboardSingleRecordCommand.tsx
index 657cb48dba3..2fcff15ab79 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/CancelDashboardSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/CancelDashboardSingleRecordCommand.tsx
@@ -5,6 +5,7 @@ import { useSetIsPageLayoutInEditMode } from '@/page-layout/hooks/useSetIsPageLa
import { getTabListInstanceIdFromPageLayoutAndRecord } from '@/page-layout/utils/getTabListInstanceIdFromPageLayoutAndRecord';
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { PageLayoutType } from '~/generated-metadata/graphql';
export const CancelDashboardSingleRecordCommand = () => {
@@ -12,8 +13,9 @@ export const CancelDashboardSingleRecordCommand = () => {
const selectedRecord = selectedRecords[0];
if (!isDefined(selectedRecord)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Selected record is required to cancel dashboard');
+ throw new Error(
+ doNotTranslate('Selected record is required to cancel dashboard'),
+ );
}
const pageLayoutId = selectedRecord.pageLayoutId;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/DuplicateDashboardSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/DuplicateDashboardSingleRecordCommand.tsx
index 41bcc0b2e00..23c8dfe06ac 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/DuplicateDashboardSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/DuplicateDashboardSingleRecordCommand.tsx
@@ -5,6 +5,7 @@ import { useLingui } from '@lingui/react/macro';
import { isNonEmptyString } from '@sniptt/guards';
import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { useNavigateApp } from '~/hooks/useNavigateApp';
@@ -18,8 +19,9 @@ export const DuplicateDashboardSingleRecordCommand = () => {
const { t } = useLingui();
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to duplicate dashboard');
+ throw new Error(
+ doNotTranslate('Record ID is required to duplicate dashboard'),
+ );
}
const handleExecute = async () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/EditDashboardSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/EditDashboardSingleRecordCommand.tsx
index 4557ae1d305..677307ddf75 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/EditDashboardSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/EditDashboardSingleRecordCommand.tsx
@@ -3,14 +3,16 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useSetIsPageLayoutInEditMode } from '@/page-layout/hooks/useSetIsPageLayoutInEditMode';
import { useResetLocationHash } from '@/ui/navigation/hooks/useResetLocationHash';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const EditDashboardSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
const selectedRecord = selectedRecords[0];
if (!isDefined(selectedRecord)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Selected record is required to edit dashboard');
+ throw new Error(
+ doNotTranslate('Selected record is required to edit dashboard'),
+ );
}
const pageLayoutId = selectedRecord.pageLayoutId;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/SaveDashboardSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/SaveDashboardSingleRecordCommand.tsx
index 2ac79a5437e..fc058803104 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/SaveDashboardSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/dashboard/components/SaveDashboardSingleRecordCommand.tsx
@@ -5,14 +5,16 @@ import { useSavePageLayoutWidgetsData } from '@/page-layout/hooks/useSavePageLay
import { useSetIsPageLayoutInEditMode } from '@/page-layout/hooks/useSetIsPageLayoutInEditMode';
import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const SaveDashboardSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
const selectedRecord = selectedRecords[0];
if (!isDefined(selectedRecord)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Selected record is required to save dashboard');
+ throw new Error(
+ doNotTranslate('Selected record is required to save dashboard'),
+ );
}
const pageLayoutId = selectedRecord.pageLayoutId;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/CancelMessageCampaignSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/CancelMessageCampaignSingleRecordCommand.tsx
index c7d98661d9b..0ae3353593d 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/CancelMessageCampaignSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/CancelMessageCampaignSingleRecordCommand.tsx
@@ -1,5 +1,6 @@
import { MessageCampaignStatus } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useCancelMessageCampaign } from '@/activities/emails/hooks/useCancelMessageCampaign';
import { HeadlessConfirmationModalEngineCommandEffect } from '@/command-menu-item/engine-command/components/HeadlessConfirmationModalEngineCommandEffect';
@@ -14,8 +15,9 @@ export const CancelMessageCampaignSingleRecordCommand = () => {
const { cancelMessageCampaign } = useCancelMessageCampaign();
if (!isDefined(campaignId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to cancel the campaign');
+ throw new Error(
+ doNotTranslate('Record ID is required to cancel the campaign'),
+ );
}
const campaignStatus: MessageCampaignStatus = selectedRecord.status;
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/DuplicateMessageCampaignSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/DuplicateMessageCampaignSingleRecordCommand.tsx
index 9ef0e05b7ca..555d348a4e6 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/DuplicateMessageCampaignSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/DuplicateMessageCampaignSingleRecordCommand.tsx
@@ -1,5 +1,6 @@
import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';
import { appendCopySuffix, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import { type MessageCampaign } from '@/activities/emails/types/MessageCampaign';
@@ -24,8 +25,9 @@ export const DuplicateMessageCampaignSingleRecordCommand = () => {
});
if (!isDefined(campaignId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to duplicate the campaign');
+ throw new Error(
+ doNotTranslate('Record ID is required to duplicate the campaign'),
+ );
}
const handleExecute = async () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignSingleRecordCommand.tsx
index ce1fc20d8b6..13a6b62b466 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignSingleRecordCommand.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
@@ -11,8 +12,9 @@ export const SendMessageCampaignSingleRecordCommand = () => {
const { openSendCampaignInSidePanel } = useOpenSendCampaignInSidePanel();
if (!isDefined(campaignId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to send the campaign');
+ throw new Error(
+ doNotTranslate('Record ID is required to send the campaign'),
+ );
}
const handleExecute = () => openSendCampaignInSidePanel(campaignId);
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignTestSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignTestSingleRecordCommand.tsx
index 770df8e720c..4d2f22a1bfa 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignTestSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-campaign/components/SendMessageCampaignTestSingleRecordCommand.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
@@ -12,8 +13,9 @@ export const SendMessageCampaignTestSingleRecordCommand = () => {
useOpenSendCampaignTestInSidePanel();
if (!isDefined(campaignId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to send a test email');
+ throw new Error(
+ doNotTranslate('Record ID is required to send a test email'),
+ );
}
const handleExecute = () => openSendCampaignTestInSidePanel(campaignId);
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-list/components/DuplicateMessageListSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-list/components/DuplicateMessageListSingleRecordCommand.tsx
index ac140fdd632..2ef0854a929 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-list/components/DuplicateMessageListSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/message-list/components/DuplicateMessageListSingleRecordCommand.tsx
@@ -6,6 +6,7 @@ import { useLingui } from '@lingui/react/macro';
import { isNonEmptyString } from '@sniptt/guards';
import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { useNavigateApp } from '~/hooks/useNavigateApp';
@@ -19,8 +20,7 @@ export const DuplicateMessageListSingleRecordCommand = () => {
const { t } = useLingui();
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to duplicate list');
+ throw new Error(doNotTranslate('Record ID is required to duplicate list'));
}
const handleExecute = async () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-runs/components/SeeVersionWorkflowRunSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-runs/components/SeeVersionWorkflowRunSingleRecordCommand.tsx
index de79ea57502..4da6e70e257 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-runs/components/SeeVersionWorkflowRunSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-runs/components/SeeVersionWorkflowRunSingleRecordCommand.tsx
@@ -2,6 +2,7 @@ import { HeadlessNavigateEngineCommand } from '@/command-menu-item/engine-comman
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { AppPath, CoreObjectNameSingular } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const SeeVersionWorkflowRunSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -11,8 +12,9 @@ export const SeeVersionWorkflowRunSingleRecordCommand = () => {
!isDefined(selectedRecord) ||
!isDefined(selectedRecord?.workflowVersion?.id)
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Selected record is required to see version workflow run');
+ throw new Error(
+ doNotTranslate('Selected record is required to see version workflow run'),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/SeeRunsWorkflowVersionSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/SeeRunsWorkflowVersionSingleRecordCommand.tsx
index 7c47e195962..74262dac243 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/SeeRunsWorkflowVersionSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/SeeRunsWorkflowVersionSingleRecordCommand.tsx
@@ -6,6 +6,7 @@ import { CoreObjectNamePlural } from '@/object-metadata/types/CoreObjectNamePlur
import { useCoreWorkflowVersion } from '@/object-core/workflows/versions/hooks/useCoreWorkflowVersion';
import { AppPath, ViewFilterOperand } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { GetCoreWorkflowDocument } from '~/generated/graphql';
const SeeRunsWorkflowVersionSingleRecordCommandContent = ({
@@ -65,8 +66,9 @@ export const SeeRunsWorkflowVersionSingleRecordCommand = () => {
if (!isDefined(coreWorkflowVersion.coreWorkflowId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Record ID and workflow ID are required to see runs workflow version',
+ doNotTranslate(
+ 'Record ID and workflow ID are required to see runs workflow version',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand.tsx
index 2b139ca10ba..46967bccdae 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow-versions/components/UseAsDraftWorkflowVersionSingleRecordCommand.tsx
@@ -7,6 +7,7 @@ import { useCoreWorkflowVersion } from '@/object-core/workflows/versions/hooks/u
import { useLingui } from '@lingui/react/macro';
import { AppPath } from 'twenty-shared/types';
import { getAppPath, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useNavigateApp } from '~/hooks/useNavigateApp';
const UseAsDraftWorkflowVersionSingleRecordCommandContent = ({
@@ -71,8 +72,9 @@ export const UseAsDraftWorkflowVersionSingleRecordCommand = () => {
if (!isDefined(coreWorkflowVersion.coreWorkflowId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- 'Record ID and workflow ID are required to use as draft workflow version',
+ doNotTranslate(
+ 'Record ID and workflow ID are required to use as draft workflow version',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ActivateWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ActivateWorkflowSingleRecordCommand.tsx
index bef6f9c86fb..8392a4254b3 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ActivateWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ActivateWorkflowSingleRecordCommand.tsx
@@ -3,6 +3,7 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useActivateWorkflowVersion } from '@/workflow/hooks/useActivateWorkflowVersion';
import { useWorkflowWithCurrentVersion } from '@/workflow/hooks/useWorkflowWithCurrentVersion';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ActivateWorkflowSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -14,8 +15,9 @@ export const ActivateWorkflowSingleRecordCommand = () => {
);
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to activate workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to activate workflow'),
+ );
}
const handleExecute = () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/AddNodeWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/AddNodeWorkflowSingleRecordCommand.tsx
index b4c25742fad..b8a2a388c93 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/AddNodeWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/AddNodeWorkflowSingleRecordCommand.tsx
@@ -3,6 +3,7 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useSidePanelWorkflowNavigation } from '@/side-panel/pages/workflow/hooks/useSidePanelWorkflowNavigation';
import { useWorkflowWithCurrentVersion } from '@/workflow/hooks/useWorkflowWithCurrentVersion';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const AddNodeWorkflowSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -15,8 +16,9 @@ export const AddNodeWorkflowSingleRecordCommand = () => {
useSidePanelWorkflowNavigation();
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to add node workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to add node workflow'),
+ );
}
const handleExecute = () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DeactivateWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DeactivateWorkflowSingleRecordCommand.tsx
index 9c47fbfcde7..25b636c08f5 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DeactivateWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DeactivateWorkflowSingleRecordCommand.tsx
@@ -3,6 +3,7 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useDeactivateWorkflowVersion } from '@/workflow/hooks/useDeactivateWorkflowVersion';
import { useWorkflowWithCurrentVersion } from '@/workflow/hooks/useWorkflowWithCurrentVersion';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const DeactivateWorkflowSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -14,8 +15,9 @@ export const DeactivateWorkflowSingleRecordCommand = () => {
);
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to deactivate workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to deactivate workflow'),
+ );
}
const handleExecute = () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DiscardDraftWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DiscardDraftWorkflowSingleRecordCommand.tsx
index 5fb4875d604..47407172954 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DiscardDraftWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DiscardDraftWorkflowSingleRecordCommand.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
@@ -15,8 +16,9 @@ export const DiscardDraftWorkflowSingleRecordCommand = () => {
);
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to discard draft workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to discard draft workflow'),
+ );
}
const handleExecute = () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DuplicateWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DuplicateWorkflowSingleRecordCommand.tsx
index 8ac15e4765f..309c29bda3b 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DuplicateWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/DuplicateWorkflowSingleRecordCommand.tsx
@@ -6,6 +6,7 @@ import { useLingui } from '@lingui/react/macro';
import { isNonEmptyString } from '@sniptt/guards';
import { AppPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { useNavigateApp } from '~/hooks/useNavigateApp';
@@ -20,8 +21,9 @@ export const DuplicateWorkflowSingleRecordCommand = () => {
const { t } = useLingui();
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to duplicate workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to duplicate workflow'),
+ );
}
const handleExecute = async () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeActiveVersionWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeActiveVersionWorkflowSingleRecordCommand.tsx
index bf34214ae5e..eece26478f4 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeActiveVersionWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeActiveVersionWorkflowSingleRecordCommand.tsx
@@ -3,6 +3,7 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { useActiveWorkflowVersion } from '@/workflow/hooks/useActiveWorkflowVersion';
import { AppPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const SeeActiveVersionWorkflowSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -15,8 +16,9 @@ export const SeeActiveVersionWorkflowSingleRecordCommand = () => {
});
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to see active version workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to see active version workflow'),
+ );
}
if (loading || !isDefined(workflowVersion)) {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeRunsWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeRunsWorkflowSingleRecordCommand.tsx
index f3090e96d2b..9a331c457b7 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeRunsWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeRunsWorkflowSingleRecordCommand.tsx
@@ -3,6 +3,7 @@ import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command
import { CoreObjectNamePlural } from '@/object-metadata/types/CoreObjectNamePlural';
import { AppPath, ViewFilterOperand } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const SeeRunsWorkflowSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -11,8 +12,9 @@ export const SeeRunsWorkflowSingleRecordCommand = () => {
const workflowName = selectedRecords[0]?.name;
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to see runs workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to see runs workflow'),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeVersionsWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeVersionsWorkflowSingleRecordCommand.tsx
index abec399da9f..1d047a51c55 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeVersionsWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/SeeVersionsWorkflowSingleRecordCommand.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-command/components/HeadlessEngineCommandWrapperEffect';
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
@@ -12,8 +13,9 @@ export const SeeVersionsWorkflowSingleRecordCommand = () => {
const recordId = selectedRecords[0]?.id;
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to see versions workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to see versions workflow'),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TestWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TestWorkflowSingleRecordCommand.tsx
index 2d87c7080a6..ec8bde2a9a0 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TestWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TestWorkflowSingleRecordCommand.tsx
@@ -5,6 +5,7 @@ import { useWorkflowVersionContent } from '@/workflow/workflow-version/hooks/use
import { useWorkflowWithCurrentVersion } from '@/workflow/hooks/useWorkflowWithCurrentVersion';
import { getTestPayloadFromTrigger } from '@/workflow/workflow-trigger/utils/getTestPayloadFromTrigger';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const TestWorkflowSingleRecordCommand = () => {
const { selectedRecords } = useHeadlessCommandContextApi();
@@ -19,8 +20,7 @@ export const TestWorkflowSingleRecordCommand = () => {
);
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to test workflow');
+ throw new Error(doNotTranslate('Record ID is required to test workflow'));
}
const handleExecute = () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TidyUpWorkflowSingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TidyUpWorkflowSingleRecordCommand.tsx
index ab0c2b5579c..a035250ff4a 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TidyUpWorkflowSingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/TidyUpWorkflowSingleRecordCommand.tsx
@@ -6,6 +6,7 @@ import { workflowDiagramComponentState } from '@/workflow/workflow-diagram/state
import { useTidyUpWorkflowVersion } from '@/workflow/workflow-version/hooks/useTidyUpWorkflowVersion';
import { useStore } from 'jotai';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const TidyUpWorkflowSingleRecordCommand = () => {
const store = useStore();
@@ -20,8 +21,9 @@ export const TidyUpWorkflowSingleRecordCommand = () => {
useGetUpdatableWorkflowVersionOrThrow(instanceId);
if (!isDefined(recordId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to tidy up workflow');
+ throw new Error(
+ doNotTranslate('Record ID is required to tidy up workflow'),
+ );
}
const handleExecute = async () => {
diff --git a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ToggleWorkflowVisibilitySingleRecordCommand.tsx b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ToggleWorkflowVisibilitySingleRecordCommand.tsx
index 7fe0cf4edd3..9aaea996b43 100644
--- a/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ToggleWorkflowVisibilitySingleRecordCommand.tsx
+++ b/packages/twenty-front/src/modules/command-menu-item/engine-command/record/single-record/workflow/components/ToggleWorkflowVisibilitySingleRecordCommand.tsx
@@ -4,6 +4,7 @@ import { HeadlessEngineCommandWrapperEffect } from '@/command-menu-item/engine-c
import { useHeadlessCommandContextApi } from '@/command-menu-item/engine-command/hooks/useHeadlessCommandContextApi';
import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
UpdateCoreWorkflowVisibilityDocument,
WorkflowVisibility,
@@ -20,8 +21,9 @@ export const ToggleWorkflowVisibilitySingleRecordCommand = () => {
);
if (!isDefined(selectedRecord)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal command precondition diagnostic.
- throw new Error('Record ID is required to change workflow visibility');
+ throw new Error(
+ doNotTranslate('Record ID is required to change workflow visibility'),
+ );
}
const handleExecute = () =>
diff --git a/packages/twenty-front/src/modules/command-menu-item/record/single-record/utils/exportBlockNoteEditorToPdf.ts b/packages/twenty-front/src/modules/command-menu-item/record/single-record/utils/exportBlockNoteEditorToPdf.ts
index 85470ec2f45..961613d3824 100644
--- a/packages/twenty-front/src/modules/command-menu-item/record/single-record/utils/exportBlockNoteEditorToPdf.ts
+++ b/packages/twenty-front/src/modules/command-menu-item/record/single-record/utils/exportBlockNoteEditorToPdf.ts
@@ -5,6 +5,7 @@ import {
} from '@blocknote/xl-pdf-exporter';
import { pdf } from '@react-pdf/renderer';
import { saveAs } from 'file-saver';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const exportBlockNoteEditorToPdf = async (
parsedBody: PartialBlock[],
@@ -24,8 +25,9 @@ export const exportBlockNoteEditorToPdf = async (
if (!response.ok) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This asset-fetch failure is an export diagnostic.
- `Failed to fetch asset at ${url}: ${response.status} ${response.statusText}`,
+ doNotTranslate(
+ `Failed to fetch asset at ${url}: ${response.status} ${response.statusText}`,
+ ),
);
}
@@ -33,14 +35,14 @@ export const exportBlockNoteEditorToPdf = async (
} catch (error) {
if (
error instanceof Error &&
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This discriminator must match the diagnostic emitted above.
- error.message.includes('Failed to fetch asset')
+ error.message.includes(doNotTranslate('Failed to fetch asset'))
) {
throw error;
}
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This asset-fetch failure is an export diagnostic.
- `Failed to fetch asset at ${url}: ${error instanceof Error ? error.message : 'Unknown error'}`,
+ doNotTranslate(
+ `Failed to fetch asset at ${url}: ${error instanceof Error ? error.message : 'Unknown error'}`,
+ ),
);
}
},
diff --git a/packages/twenty-front/src/modules/context-store/hooks/useContextStoreObjectMetadataItemOrThrow.ts b/packages/twenty-front/src/modules/context-store/hooks/useContextStoreObjectMetadataItemOrThrow.ts
index a6b1bcd30c2..5dc80a60355 100644
--- a/packages/twenty-front/src/modules/context-store/hooks/useContextStoreObjectMetadataItemOrThrow.ts
+++ b/packages/twenty-front/src/modules/context-store/hooks/useContextStoreObjectMetadataItemOrThrow.ts
@@ -2,6 +2,7 @@ import { contextStoreCurrentObjectMetadataItemIdComponentState } from '@/context
import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useContextStoreObjectMetadataItemOrThrow = (
contextStoreInstanceId?: string,
@@ -16,8 +17,9 @@ export const useContextStoreObjectMetadataItemOrThrow = (
});
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only configuration or context invariant diagnostic.
- throw new Error('Object metadata item is not set in context store');
+ throw new Error(
+ doNotTranslate('Object metadata item is not set in context store'),
+ );
}
return { objectMetadataItem };
diff --git a/packages/twenty-front/src/modules/domain-manager/hooks/useIsCurrentLocationOnAWorkspace.ts b/packages/twenty-front/src/modules/domain-manager/hooks/useIsCurrentLocationOnAWorkspace.ts
index c491a9289e2..eeffb570365 100644
--- a/packages/twenty-front/src/modules/domain-manager/hooks/useIsCurrentLocationOnAWorkspace.ts
+++ b/packages/twenty-front/src/modules/domain-manager/hooks/useIsCurrentLocationOnAWorkspace.ts
@@ -3,6 +3,7 @@ import { useReadDefaultDomainFromConfiguration } from '@/domain-manager/hooks/us
import { domainConfigurationState } from '@/domain-manager/states/domainConfigurationState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useIsCurrentLocationOnAWorkspace = () => {
const { defaultDomain } = useReadDefaultDomainFromConfiguration();
@@ -17,8 +18,9 @@ export const useIsCurrentLocationOnAWorkspace = () => {
(!isDefined(domainConfiguration.frontDomain) ||
!isDefined(domainConfiguration.defaultSubdomain))
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only configuration or context invariant diagnostic.
- throw new Error('frontDomain and defaultSubdomain are required');
+ throw new Error(
+ doNotTranslate('frontDomain and defaultSubdomain are required'),
+ );
}
const isOnAWorkspace = !isMultiWorkspaceEnabled
diff --git a/packages/twenty-front/src/modules/dropdown-context-state-management/hooks/useDropdownContextStateManagement.ts b/packages/twenty-front/src/modules/dropdown-context-state-management/hooks/useDropdownContextStateManagement.ts
index 8166f5550ea..359ff1dfc9a 100644
--- a/packages/twenty-front/src/modules/dropdown-context-state-management/hooks/useDropdownContextStateManagement.ts
+++ b/packages/twenty-front/src/modules/dropdown-context-state-management/hooks/useDropdownContextStateManagement.ts
@@ -2,6 +2,7 @@ import { type ObjectOptionsDropdownContextValue } from '@/object-record/object-o
import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
import { type Context, useCallback, useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useDropdownContextStateManagement = <
TDropdownContext extends ObjectOptionsDropdownContextValue,
@@ -14,8 +15,9 @@ export const useDropdownContextStateManagement = <
if (!isDefined(dropdownContext)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only configuration or context invariant diagnostic.
- `useDropdownContextStateManagement must be used within a context provider (${context.Provider.name})`,
+ doNotTranslate(
+ `useDropdownContextStateManagement must be used within a context provider (${context.Provider.name})`,
+ ),
);
}
const dropdownId = dropdownContext.dropdownId;
diff --git a/packages/twenty-front/src/modules/error-handler/utils/checkIfItsAViteStaleChunkLazyLoadingError.ts b/packages/twenty-front/src/modules/error-handler/utils/checkIfItsAViteStaleChunkLazyLoadingError.ts
index 0a9f7fa740a..306dac80727 100644
--- a/packages/twenty-front/src/modules/error-handler/utils/checkIfItsAViteStaleChunkLazyLoadingError.ts
+++ b/packages/twenty-front/src/modules/error-handler/utils/checkIfItsAViteStaleChunkLazyLoadingError.ts
@@ -1,13 +1,11 @@
-const VITE_STALE_CHUNK_ERROR_MESSAGES = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are exact browser error signatures used to identify stale chunks.
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+const VITE_STALE_CHUNK_ERROR_MESSAGES = doNotTranslate([
'Failed to fetch dynamically imported module',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are exact browser error signatures used to identify stale chunks.
'error loading dynamically imported module',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are exact browser error signatures used to identify stale chunks.
'Importing a module script failed',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are exact browser error signatures used to identify stale chunks.
'Unable to preload CSS for',
-];
+]);
export const checkIfItsAViteStaleChunkLazyLoadingError = (error: Error) => {
return VITE_STALE_CHUNK_ERROR_MESSAGES.some((staleChunkErrorMessage) =>
diff --git a/packages/twenty-front/src/modules/file-upload/hooks/useFileUpload.ts b/packages/twenty-front/src/modules/file-upload/hooks/useFileUpload.ts
index 484eb81df89..575bcf64330 100644
--- a/packages/twenty-front/src/modules/file-upload/hooks/useFileUpload.ts
+++ b/packages/twenty-front/src/modules/file-upload/hooks/useFileUpload.ts
@@ -1,12 +1,14 @@
import { FileUploadContext } from '@/file-upload/contexts/FileUploadContext';
import { useContext } from 'react';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useFileUpload = () => {
const context = useContext(FileUploadContext);
if (!context) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only configuration or context invariant diagnostic.
- throw new Error('useFileUpload must be used within a FileUploadProvider');
+ throw new Error(
+ doNotTranslate('useFileUpload must be used within a FileUploadProvider'),
+ );
}
return context;
diff --git a/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentApplicationTokenPair.ts b/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentApplicationTokenPair.ts
index 036a7a28b89..435b73734ef 100644
--- a/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentApplicationTokenPair.ts
+++ b/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentApplicationTokenPair.ts
@@ -4,6 +4,7 @@ import { type GraphQLFormattedError } from 'graphql';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { frontComponentApplicationTokenPairFamilyState } from '@/front-components/states/frontComponentApplicationTokenPairFamilyState';
import { pendingFrontComponentApplicationTokenPairPromiseFamilyState } from '@/front-components/states/pendingFrontComponentApplicationTokenPairPromiseFamilyState';
@@ -62,8 +63,9 @@ export const useFrontComponentApplicationTokenPair = () => {
if (!isDefined(generatedApplicationTokenPair)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This token failure is an internal diagnostic.
- 'Failed to generate front component application token pair',
+ doNotTranslate(
+ 'Failed to generate front component application token pair',
+ ),
);
}
@@ -92,8 +94,7 @@ export const useFrontComponentApplicationTokenPair = () => {
const renewedApplicationTokenPair = result.data?.renewApplicationToken;
if (!isDefined(renewedApplicationTokenPair)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This token failure is an internal diagnostic.
- throw new Error('Failed to renew application token');
+ throw new Error(doNotTranslate('Failed to renew application token'));
}
return { ...renewedApplicationTokenPair, obtainedAt: Date.now() };
diff --git a/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentExecutionContext.ts b/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentExecutionContext.ts
index c05e343c757..4f458b97e9d 100644
--- a/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentExecutionContext.ts
+++ b/packages/twenty-front/src/modules/front-components/hooks/useFrontComponentExecutionContext.ts
@@ -53,6 +53,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState';
import { useStore } from 'jotai';
import { CustomError, getAppPath, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { useIcons } from 'twenty-ui/icon';
import { useIsMobile } from 'twenty-ui/utilities';
@@ -223,8 +224,7 @@ export const useFrontComponentExecutionContext = ({
if ('to' in params) {
if (params.to.includes(':') && !isDefined(params.params)) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This SDK route failure is a developer diagnostic.
- `Missing params for side-panel route: ${params.to}`,
+ doNotTranslate(`Missing params for side-panel route: ${params.to}`),
'FRONT_COMPONENT_SIDE_PANEL_ROUTE_PARAMS_REQUIRED',
);
}
@@ -246,8 +246,7 @@ export const useFrontComponentExecutionContext = ({
if (!isDefined(pageId)) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This SDK route failure is a developer diagnostic.
- `Unsupported side-panel route: ${pathWithHash}`,
+ doNotTranslate(`Unsupported side-panel route: ${pathWithHash}`),
'FRONT_COMPONENT_UNSUPPORTED_SIDE_PANEL_ROUTE',
);
}
@@ -264,8 +263,7 @@ export const useFrontComponentExecutionContext = ({
if (!isDefined(pageId)) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This SDK route failure is a developer diagnostic.
- `Unsupported side-panel route: ${params.path}`,
+ doNotTranslate(`Unsupported side-panel route: ${params.path}`),
'FRONT_COMPONENT_UNSUPPORTED_SIDE_PANEL_ROUTE',
);
}
@@ -275,8 +273,9 @@ export const useFrontComponentExecutionContext = ({
if (params.page === SidePanelPages.ViewRecords) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This SDK migration failure is a developer diagnostic.
- 'ViewRecords is no longer supported. Open AppPath.RecordIndexPage with typed params instead.',
+ doNotTranslate(
+ 'ViewRecords is no longer supported. Open AppPath.RecordIndexPage with typed params instead.',
+ ),
'FRONT_COMPONENT_VIEW_RECORDS_UNSUPPORTED',
);
}
@@ -403,8 +402,9 @@ export const useFrontComponentExecutionContext = ({
if (isPageLayoutSidePanelPage(params.page)) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This SDK route failure is a developer diagnostic.
- `${params.page} edits the page layout it was opened from and cannot be opened by a front component`,
+ doNotTranslate(
+ `${params.page} edits the page layout it was opened from and cannot be opened by a front component`,
+ ),
'FRONT_COMPONENT_PAGE_LAYOUT_SIDE_PANEL_PAGE_UNSUPPORTED',
);
}
@@ -580,8 +580,7 @@ export const useFrontComponentExecutionContext = ({
const requireStorageNamespace = (): string => {
if (!isDefined(storageNamespace)) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This SDK permission failure is a developer diagnostic.
- 'Device storage requires a signed-in user',
+ doNotTranslate('Device storage requires a signed-in user'),
'FRONT_COMPONENT_STORAGE_REQUIRES_SIGNED_IN_USER',
);
}
diff --git a/packages/twenty-front/src/modules/keyboard-shortcut-menu/constants/KeyboardShortcutsGeneral.ts b/packages/twenty-front/src/modules/keyboard-shortcut-menu/constants/KeyboardShortcutsGeneral.ts
index 4d12bb294f1..8c504840982 100644
--- a/packages/twenty-front/src/modules/keyboard-shortcut-menu/constants/KeyboardShortcutsGeneral.ts
+++ b/packages/twenty-front/src/modules/keyboard-shortcut-menu/constants/KeyboardShortcutsGeneral.ts
@@ -1,15 +1,14 @@
import { type Shortcut } from '@/keyboard-shortcut-menu/types/Shortcut';
import { msg } from '@lingui/core/macro';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const KEYBOARD_SHORTCUTS_GENERAL: Shortcut[] = [
{
label: msg`Open search`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These keyboard tokens must match shortcut dispatch.
- shortcuts: [['Mod', 'K']],
+ shortcuts: [doNotTranslate(['Mod', 'K'])],
},
{
label: msg`Mark as favourite`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These keyboard tokens must match shortcut dispatch.
- shortcuts: [['⇧', 'F']],
+ shortcuts: [['⇧', doNotTranslate('F')]],
},
];
diff --git a/packages/twenty-front/src/modules/localization/constants/AvailableTimezoneOptionsByLabel.ts b/packages/twenty-front/src/modules/localization/constants/AvailableTimezoneOptionsByLabel.ts
index 07854c54857..f9dd1a96535 100644
--- a/packages/twenty-front/src/modules/localization/constants/AvailableTimezoneOptionsByLabel.ts
+++ b/packages/twenty-front/src/modules/localization/constants/AvailableTimezoneOptionsByLabel.ts
@@ -1,18 +1,22 @@
import { IANA_TIME_ZONES } from 'twenty-shared/constants';
import { formatTimeZoneLabel } from '@/localization/utils/formatTimeZoneLabel';
import { type SelectOption } from 'twenty-ui/primitives/input';
+import { doNotTranslate } from 'twenty-shared/i18n';
const { AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL } = {
AVAILABLE_TIME_ZONE_OPTIONS_BY_LABEL: IANA_TIME_ZONES.reduce<
Record<string, SelectOption>
>((result, ianaTimeZone) => {
if (
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- formatTimeZoneLabel(ianaTimeZone).slice(11).includes('GMT') ||
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- formatTimeZoneLabel(ianaTimeZone).slice(11).includes('UTC') ||
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- formatTimeZoneLabel(ianaTimeZone).slice(11).includes('UCT') ||
+ formatTimeZoneLabel(ianaTimeZone)
+ .slice(11)
+ .includes(doNotTranslate('GMT')) ||
+ formatTimeZoneLabel(ianaTimeZone)
+ .slice(11)
+ .includes(doNotTranslate('UTC')) ||
+ formatTimeZoneLabel(ianaTimeZone)
+ .slice(11)
+ .includes(doNotTranslate('UCT')) ||
formatTimeZoneLabel(ianaTimeZone) in result
) {
return result;
diff --git a/packages/twenty-front/src/modules/localization/utils/detection/detectTimeZone.ts b/packages/twenty-front/src/modules/localization/utils/detection/detectTimeZone.ts
index 6d107890d53..2d9ef5583ed 100644
--- a/packages/twenty-front/src/modules/localization/utils/detection/detectTimeZone.ts
+++ b/packages/twenty-front/src/modules/localization/utils/detection/detectTimeZone.ts
@@ -1,8 +1,9 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export const detectTimeZone = (): string => {
try {
return Intl.DateTimeFormat().resolvedOptions().timeZone;
} catch {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- return 'UTC';
+ return doNotTranslate('UTC');
}
};
diff --git a/packages/twenty-front/src/modules/localization/utils/formatTimeZoneLabel.ts b/packages/twenty-front/src/modules/localization/utils/formatTimeZoneLabel.ts
index e3f8b7048aa..8213d2003fa 100644
--- a/packages/twenty-front/src/modules/localization/utils/formatTimeZoneLabel.ts
+++ b/packages/twenty-front/src/modules/localization/utils/formatTimeZoneLabel.ts
@@ -1,5 +1,6 @@
import { formatInTimeZone } from 'date-fns-tz';
import { enUS as defaultLocale } from 'date-fns/locale/en-US';
+import { doNotTranslate } from 'twenty-shared/i18n';
// 'Europe/Paris' => '(GMT+01:00) Central European Time - Paris'
export const formatTimeZoneLabel = (ianaTimeZone: string) => {
@@ -9,8 +10,7 @@ export const formatTimeZoneLabel = (ianaTimeZone: string) => {
timeZoneWithGmtOffset = formatInTimeZone(
Date.now(),
ianaTimeZone,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- `(OOOO) zzzz`,
+ doNotTranslate(`(OOOO) zzzz`),
{ locale: defaultLocale },
);
} catch {
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx
index 2eb2a0ae7a3..fb2428050fc 100644
--- a/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleDetailPanel.tsx
@@ -4,6 +4,7 @@ import { isNonEmptyString, isString } from '@sniptt/guards';
import { formatInTimeZone } from 'date-fns-tz';
import { useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { JsonTree } from 'twenty-ui/components/data-display';
import { IconButton, LightButton } from 'twenty-ui/components/input';
import { Section } from 'twenty-ui/components/layout';
@@ -152,9 +153,9 @@ export const LogConsoleDetailPanel = () => {
? recordIdentifier.name
: source.getDetailTitle(entry, { objectMetadataItem });
- const timeWithMillisecondsFormat =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- timeFormat === TimeFormat.HOUR_12 ? 'h:mm:ss.SSS aa' : 'HH:mm:ss.SSS';
+ const timeWithMillisecondsFormat = doNotTranslate(
+ timeFormat === TimeFormat.HOUR_12 ? 'h:mm:ss.SSS aa' : 'HH:mm:ss.SSS',
+ );
const formattedTimestamp = formatInTimeZone(
entry.timestamp,
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeCell.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeCell.tsx
index 54a91d8ef80..8b8a2eecd66 100644
--- a/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeCell.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeCell.tsx
@@ -14,6 +14,7 @@ import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { dateLocaleState } from '@/localization/states/dateLocaleState';
import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledTimeAndDate = styled.span`
align-items: center;
@@ -34,9 +35,9 @@ export const LogConsoleTimeCell = ({ timestamp }: LogConsoleTimeCellProps) => {
const dayAndMonthFormat =
DATE_FORMAT_WITHOUT_YEAR[getWorkspaceDateFormatFromDateFormat(dateFormat)];
- const timeWithMillisecondsFormat =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- timeFormat === TimeFormat.HOUR_12 ? 'h:mm:ss.SSS aa' : 'HH:mm:ss.SSS';
+ const timeWithMillisecondsFormat = doNotTranslate(
+ timeFormat === TimeFormat.HOUR_12 ? 'h:mm:ss.SSS aa' : 'HH:mm:ss.SSS',
+ );
const formatTimestamp = (format: string) =>
formatInTimeZone(timestamp, timeZone, format, { locale: localeCatalog });
diff --git a/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeRangeDropdown.tsx b/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeRangeDropdown.tsx
index eaa2d75c69e..31f74435c80 100644
--- a/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeRangeDropdown.tsx
+++ b/packages/twenty-front/src/modules/log-console/components/LogConsoleTimeRangeDropdown.tsx
@@ -2,6 +2,7 @@ import { useLingui } from '@lingui/react/macro';
import { useState } from 'react';
import { SettingsPath } from 'twenty-shared/types';
import { typedObjectEntries } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
IconCalendarEvent,
IconChevronDown,
@@ -56,13 +57,11 @@ export const LogConsoleTimeRangeDropdown = ({
const timeZoneOptions = [
{ value: 'member', label: memberTimeZone },
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- { value: 'utc', label: 'UTC' },
+ { value: 'utc', label: doNotTranslate('UTC') },
] as const;
const selectedTimeZoneLabel =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- logConsoleTimeZone === 'utc' ? 'UTC' : memberTimeZone;
+ logConsoleTimeZone === 'utc' ? doNotTranslate('UTC') : memberTimeZone;
const getTimeRangeLabel = (labeledTimeRange: LogConsoleTimeRange) => {
if (labeledTimeRange === 'today') {
diff --git a/packages/twenty-front/src/modules/log-console/constants/LogConsoleRecordChangeFilterFields.tsx b/packages/twenty-front/src/modules/log-console/constants/LogConsoleRecordChangeFilterFields.tsx
index ec1fbafc8fb..78e2b5f6752 100644
--- a/packages/twenty-front/src/modules/log-console/constants/LogConsoleRecordChangeFilterFields.tsx
+++ b/packages/twenty-front/src/modules/log-console/constants/LogConsoleRecordChangeFilterFields.tsx
@@ -1,5 +1,6 @@
import { msg, t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconBox, IconTimelineEvent } from 'twenty-ui/icon';
import { Status } from 'twenty-ui/primitives/data-display';
@@ -8,20 +9,14 @@ import { LOG_CONSOLE_RECORD_ACTIONS } from '@/log-console/constants/LogConsoleRe
import { type LogConsoleFilterField } from '@/log-console/types/LogConsoleFilterField';
import { ObjectMetadataIcon } from '@/object-metadata/components/ObjectMetadataIcon';
-const LOGGED_RECORD_CHANGE_EVENTS = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
+const LOGGED_RECORD_CHANGE_EVENTS = doNotTranslate([
'Object Record Created',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Object Record Updated',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Object Record Upserted',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Object Record Deleted',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Object Record Restored',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Object Record Destroyed',
-];
+]);
export const LOG_CONSOLE_RECORD_CHANGE_FILTER_FIELDS: LogConsoleFilterField[] =
[
diff --git a/packages/twenty-front/src/modules/log-console/constants/LogConsoleSecurityFilterFields.tsx b/packages/twenty-front/src/modules/log-console/constants/LogConsoleSecurityFilterFields.tsx
index b2606d1aab4..f127db05dc5 100644
--- a/packages/twenty-front/src/modules/log-console/constants/LogConsoleSecurityFilterFields.tsx
+++ b/packages/twenty-front/src/modules/log-console/constants/LogConsoleSecurityFilterFields.tsx
@@ -10,6 +10,7 @@ import {
import { LOG_CONSOLE_ACTOR_FILTER_FIELD } from '@/log-console/constants/LogConsoleActorFilterField';
import { type LogConsoleFilterField } from '@/log-console/types/LogConsoleFilterField';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const LOG_CONSOLE_SECURITY_FILTER_FIELDS: LogConsoleFilterField[] = [
{
@@ -25,20 +26,20 @@ export const LOG_CONSOLE_SECURITY_FILTER_FIELDS: LogConsoleFilterField[] = [
},
{
label: t`Impersonation`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
- values: ['Impersonation'],
+ values: [doNotTranslate('Impersonation')],
startIcon: <IconSpy />,
},
{
label: t`Signed up`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
- values: ['User Signup'],
+ values: [doNotTranslate('User Signup')],
startIcon: <IconUserPlus />,
},
{
label: t`Custom domain`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
- values: ['Custom Domain Activated', 'Custom Domain Deactivated'],
+ values: doNotTranslate([
+ 'Custom Domain Activated',
+ 'Custom Domain Deactivated',
+ ]),
startIcon: <IconWorld />,
},
{
diff --git a/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx b/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx
index ecab2ccc0a9..95e03c83401 100644
--- a/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx
+++ b/packages/twenty-front/src/modules/log-console/constants/LogConsoleSources.tsx
@@ -7,6 +7,7 @@ import {
isDefined,
isValidUrl,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
IconAddressBook,
IconAlertTriangle,
@@ -122,18 +123,14 @@ export const LOG_CONSOLE_SOURCES: LogConsoleSource[] = [
{
field: 'event',
operand: EventLogFilterOperand.IS,
- values: [
+ values: doNotTranslate([
'AuthSession',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Impersonation',
'ServerAdminAccessChanged',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'User Signup',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Custom Domain Activated',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
'Custom Domain Deactivated',
- ],
+ ]),
},
],
filterFields: LOG_CONSOLE_SECURITY_FILTER_FIELDS,
@@ -214,8 +211,7 @@ export const LOG_CONSOLE_SOURCES: LogConsoleSource[] = [
{
field: 'event',
operand: EventLogFilterOperand.IS,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These exact event names are sent to the log filter API.
- values: ['Webhook Response'],
+ values: [doNotTranslate('Webhook Response')],
},
],
requiresAuditLogs: true,
diff --git a/packages/twenty-front/src/modules/log-console/hooks/useLogConsoleTimeZone.ts b/packages/twenty-front/src/modules/log-console/hooks/useLogConsoleTimeZone.ts
index f06e1f4dfe4..9f3ca932da3 100644
--- a/packages/twenty-front/src/modules/log-console/hooks/useLogConsoleTimeZone.ts
+++ b/packages/twenty-front/src/modules/log-console/hooks/useLogConsoleTimeZone.ts
@@ -1,11 +1,11 @@
import { useDateTimeFormat } from '@/localization/hooks/useDateTimeFormat';
import { logConsoleTimeZoneState } from '@/log-console/states/logConsoleTimeZoneState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useLogConsoleTimeZone = () => {
const { timeZone } = useDateTimeFormat();
const logConsoleTimeZone = useAtomStateValue(logConsoleTimeZoneState);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date format or time-zone identifier.
- return logConsoleTimeZone === 'utc' ? 'UTC' : timeZone;
+ return logConsoleTimeZone === 'utc' ? doNotTranslate('UTC') : timeZone;
};
diff --git a/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx b/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx
index 1ff4a7e9eb1..aff5a4b2ed9 100644
--- a/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx
+++ b/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx
@@ -17,6 +17,7 @@ import { useCallback, useEffect, useState } from 'react';
import { type APP_LOCALES, SOURCE_LOCALE } from 'twenty-shared/translations';
import { type CurrentUserWorkspaceObjectPermissions } from '@/auth/types/CurrentUserWorkspaceObjectPermissions';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useQuery } from '@apollo/client/react';
import {
type WorkspaceMember,
@@ -132,10 +133,11 @@ export const UserMetadataProviderInitialEffect = () => {
) => {
return {
...workspaceMember,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted color-scheme identifier.
- colorScheme: (workspaceMember.colorScheme as ColorScheme) ?? 'System',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted UI-scale identifier.
- uiScale: (workspaceMember.uiScale as UiScale) ?? 'Default',
+ colorScheme:
+ (workspaceMember.colorScheme as ColorScheme) ??
+ doNotTranslate('System'),
+ uiScale:
+ (workspaceMember.uiScale as UiScale) ?? doNotTranslate('Default'),
openRecordIn: toOpenRecordInPreference(workspaceMember.openRecordIn),
locale:
(workspaceMember.locale as keyof typeof APP_LOCALES) ?? SOURCE_LOCALE,
diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/hooks/useHandleNavigationMenuItemDragAndDrop.ts b/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/hooks/useHandleNavigationMenuItemDragAndDrop.ts
index 642163888a9..b645f8ac480 100644
--- a/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/hooks/useHandleNavigationMenuItemDragAndDrop.ts
+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/dnd/hooks/useHandleNavigationMenuItemDragAndDrop.ts
@@ -1,6 +1,7 @@
import { useStore } from 'jotai';
import { type NavigationMenuItem } from '~/generated-metadata/graphql';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import type { NavigationMenuItemDropResult } from '@/navigation-menu-item/common/types/NavigationMenuItemDropResult';
@@ -154,8 +155,7 @@ export const useHandleNavigationMenuItemDragAndDrop = (
if (destination.droppableId.startsWith(config.folderHeaderPrefix)) {
if (destinationFolderId === null) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This invalid drag target is an internal diagnostic.
- throw new Error('Invalid folder header ID');
+ throw new Error(doNotTranslate('Invalid folder header ID'));
}
const folderList = getSortedItems().filter((item) =>
diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx
index a0ac524a0eb..9a5bb3f86b6 100644
--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx
+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/favorites/components/FavoritesSection.tsx
@@ -24,6 +24,7 @@ import { NavigationMenuItemSection } from '@/navigation-menu-item/display/sectio
import { useNavigationSection } from '@/ui/navigation/navigation-drawer/hooks/useNavigationSection';
import { isNavigationSectionOpenFamilyState } from '@/ui/navigation/navigation-drawer/states/isNavigationSectionOpenFamilyState';
import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledList = styled.div`
display: flex;
@@ -50,12 +51,10 @@ export const FavoritesSection = () => {
const { t } = useLingui();
const { toggleNavigationSection, openNavigationSection } =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is the persisted section identifier.
- useNavigationSection('Favorites');
+ useNavigationSection(doNotTranslate('Favorites'));
const isNavigationSectionOpen = useAtomFamilyStateValue(
isNavigationSectionOpenFamilyState,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is the persisted section identifier.
- 'Favorites',
+ doNotTranslate('Favorites'),
);
const allTopLevelItems = useMemo(
diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx
index b68eb6fe84f..0be84c6e33a 100644
--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx
+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSection.tsx
@@ -29,6 +29,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
import { viewsSelector } from '@/views/states/selectors/viewsSelector';
import { PermissionFlagType } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledRightIconsContainer = styled.div`
align-items: center;
@@ -54,8 +55,9 @@ export const WorkspaceSection = () => {
setSelectedNavigationMenuItemIdInEditMode,
] = useAtomState(selectedNavigationMenuItemIdInEditModeState);
const navigate = useNavigate();
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is the persisted section identifier.
- const { openNavigationSection } = useNavigationSection('Workspace');
+ const { openNavigationSection } = useNavigationSection(
+ doNotTranslate('Workspace'),
+ );
const { t } = useLingui();
diff --git a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx
index 77a9b40f3fe..929927dc3b4 100644
--- a/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx
+++ b/packages/twenty-front/src/modules/navigation-menu-item/display/sections/workspace/components/WorkspaceSectionContainer.tsx
@@ -1,6 +1,7 @@
import { styled } from '@linaria/react';
import React, { lazy, Suspense } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
import { type NavigationMenuItem } from '~/generated-metadata/graphql';
@@ -52,8 +53,7 @@ export const WorkspaceSectionContainer = ({
isLayoutCustomizationModeEnabledState,
);
const { toggleNavigationSection, isNavigationSectionOpen } =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is the persisted section identifier.
- useNavigationSection('Workspace');
+ useNavigationSection(doNotTranslate('Workspace'));
const views = useAtomStateValue(viewsSelector);
const objectMetadataItems = useAtomStateValue(objectMetadataItemsSelector);
diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemMenu.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemMenu.tsx
index 22c8a0e962f..a79179c0610 100644
--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemMenu.tsx
+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemMenu.tsx
@@ -2,6 +2,7 @@ import { NavigationMenuItemMenuModeEffect } from '@/navigation-menu-item/edit/ef
import { type ComponentProps, type ReactElement, type ReactNode } from 'react';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { Dropdown, type DropdownType } from 'twenty-ui/components/navigation';
import { useTheme } from 'twenty-ui/theme';
@@ -107,8 +108,9 @@ export const NavigationMenuItemMenu = ({
onInteractOutside={(event) => {
const isOnRowActions = isDefined(
event.target?.closest(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This must remain a CSS selector.
- `[data-navigation-menu-item-id="${dropdownId}"] [data-navigation-actions]`,
+ doNotTranslate(
+ `[data-navigation-menu-item-id="${dropdownId}"] [data-navigation-actions]`,
+ ),
),
);
@@ -127,7 +129,6 @@ export const NavigationMenuItemMenu = ({
);
const isInsideRow = isDefined(
event.target?.closest(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This must remain a CSS selector.
`[data-navigation-menu-item-id="${dropdownId}"]`,
),
);
diff --git a/packages/twenty-front/src/modules/object-core/agents/hooks/useCreateCoreAgent.ts b/packages/twenty-front/src/modules/object-core/agents/hooks/useCreateCoreAgent.ts
index d650bc96cdc..06e9315bb75 100644
--- a/packages/twenty-front/src/modules/object-core/agents/hooks/useCreateCoreAgent.ts
+++ b/packages/twenty-front/src/modules/object-core/agents/hooks/useCreateCoreAgent.ts
@@ -5,6 +5,7 @@ import { AUTO_SELECT_WORKSPACE_DEFAULT_MODEL_ID } from 'twenty-shared/ai';
import { PermissionFlagType } from 'twenty-shared/constants';
import { AppPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { v4 } from 'uuid';
@@ -43,8 +44,7 @@ export const useCreateCoreAgent = () => {
name: `untitledAgent${v4().split('-')[0]}`,
label: t`Untitled agent`,
icon: 'IconLego',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The persisted default instruction is canonical across locales.
- prompt: 'You are a helpful AI assistant.',
+ prompt: doNotTranslate('You are a helpful AI assistant.'),
modelId: AUTO_SELECT_WORKSPACE_DEFAULT_MODEL_ID,
},
},
diff --git a/packages/twenty-front/src/modules/object-metadata/errors/ObjectMetadataNotFoundError.ts b/packages/twenty-front/src/modules/object-metadata/errors/ObjectMetadataNotFoundError.ts
index 9a0b66e26d7..755f5cf9da8 100644
--- a/packages/twenty-front/src/modules/object-metadata/errors/ObjectMetadataNotFoundError.ts
+++ b/packages/twenty-front/src/modules/object-metadata/errors/ObjectMetadataNotFoundError.ts
@@ -1,15 +1,16 @@
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
+import { doNotTranslate } from 'twenty-shared/i18n';
export class ObjectMetadataItemNotFoundError extends Error {
constructor(
objectName: string,
objectMetadataItems: EnrichedObjectMetadataItem[],
) {
- // Diagnostic text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const message = `Object metadata item "${objectName}" cannot be found in an array of ${
- objectMetadataItems?.length ?? 0
- } elements`;
+ const message = doNotTranslate(
+ `Object metadata item "${objectName}" cannot be found in an array of ${
+ objectMetadataItems?.length ?? 0
+ } elements`,
+ );
super(message);
diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useApolloCoreClient.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useApolloCoreClient.ts
index dee61cb4a90..0bd084db76a 100644
--- a/packages/twenty-front/src/modules/object-metadata/hooks/useApolloCoreClient.ts
+++ b/packages/twenty-front/src/modules/object-metadata/hooks/useApolloCoreClient.ts
@@ -1,6 +1,7 @@
import { ApolloCoreClientContext } from '@/object-metadata/contexts/ApolloCoreClientContext';
import { useApolloClient } from '@apollo/client/react';
import { useContext } from 'react';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useApolloCoreClient = () => {
const apolloCoreClient = useContext(ApolloCoreClientContext);
@@ -11,9 +12,7 @@ export const useApolloCoreClient = () => {
}
if (!apolloCoreClient) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ApolloCoreClient not found');
+ throw new Error(doNotTranslate('ApolloCoreClient not found'));
}
return apolloCoreClient;
diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useObjectMetadataItemById.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useObjectMetadataItemById.ts
index f51ce6826fe..2241c165f43 100644
--- a/packages/twenty-front/src/modules/object-metadata/hooks/useObjectMetadataItemById.ts
+++ b/packages/twenty-front/src/modules/object-metadata/hooks/useObjectMetadataItemById.ts
@@ -1,6 +1,7 @@
import { objectMetadataItemsSelector } from '@/object-metadata/states/objectMetadataItemsSelector';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useObjectMetadataItemById = ({
objectId,
@@ -15,9 +16,7 @@ export const useObjectMetadataItemById = ({
if (!isDefined(objectMetadataItem)) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for id ${objectId}`,
+ doNotTranslate(`Object metadata item not found for id ${objectId}`),
'OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNamePluralFromSingular.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNamePluralFromSingular.ts
index 85a18c3b7a0..6a1067f940d 100644
--- a/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNamePluralFromSingular.ts
+++ b/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNamePluralFromSingular.ts
@@ -1,6 +1,7 @@
import { objectMetadataItemFamilySelector } from '@/object-metadata/states/objectMetadataItemFamilySelector';
import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useObjectNamePluralFromSingular = ({
objectNameSingular,
@@ -17,9 +18,9 @@ export const useObjectNamePluralFromSingular = ({
if (!isDefined(objectMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for ${objectNameSingular} object`,
+ doNotTranslate(
+ `Object metadata item not found for ${objectNameSingular} object`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNameSingularFromPlural.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNameSingularFromPlural.ts
index 254681daa36..aa41903adac 100644
--- a/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNameSingularFromPlural.ts
+++ b/packages/twenty-front/src/modules/object-metadata/hooks/useObjectNameSingularFromPlural.ts
@@ -1,6 +1,7 @@
import { objectMetadataItemFamilySelector } from '@/object-metadata/states/objectMetadataItemFamilySelector';
import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useObjectNameSingularFromPlural = ({
objectNamePlural,
@@ -17,9 +18,9 @@ export const useObjectNameSingularFromPlural = ({
if (!isDefined(objectMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for ${objectNamePlural} object`,
+ doNotTranslate(
+ `Object metadata item not found for ${objectNamePlural} object`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-metadata/utils/computeOptionValueFromLabel.ts b/packages/twenty-front/src/modules/object-metadata/utils/computeOptionValueFromLabel.ts
index ef385123e17..d8bc0ec2054 100644
--- a/packages/twenty-front/src/modules/object-metadata/utils/computeOptionValueFromLabel.ts
+++ b/packages/twenty-front/src/modules/object-metadata/utils/computeOptionValueFromLabel.ts
@@ -1,9 +1,10 @@
import { slugify } from 'transliteration';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const computeOptionValueFromLabel = (label: string): string => {
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const prefixedLabel = /^\d/.test(label) ? `OPT${label}` : label;
+ const prefixedLabel = /^\d/.test(label)
+ ? doNotTranslate(`OPT${label}`)
+ : label;
const formattedString = slugify(prefixedLabel, {
trim: true,
diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getFieldMetadataItemByIdOrThrow.ts b/packages/twenty-front/src/modules/object-metadata/utils/getFieldMetadataItemByIdOrThrow.ts
index f16e56d6d36..00de7934113 100644
--- a/packages/twenty-front/src/modules/object-metadata/utils/getFieldMetadataItemByIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/object-metadata/utils/getFieldMetadataItemByIdOrThrow.ts
@@ -1,6 +1,7 @@
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
import { findFieldMetadataItemByFieldMetadataId } from '@/object-metadata/utils/findFieldMetadataItemByFieldMetadataId';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type GetFieldMetadataItemByIdParams = {
fieldMetadataId: string;
@@ -29,9 +30,9 @@ export const getFieldMetadataItemByIdOrThrow = ({
}
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for field id ${fieldMetadataId}`,
+ doNotTranslate(
+ `Object metadata item not found for field id ${fieldMetadataId}`,
+ ),
FIELD_METADATA_ITEM_NOT_FOUND_ERROR_CODE,
);
};
diff --git a/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts b/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts
index dcf964f1163..2dfc2c6dec0 100644
--- a/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts
+++ b/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts
@@ -15,6 +15,7 @@ import {
computeRelationGqlFieldJoinColumnName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type MapFieldMetadataToGraphQLQueryArgs = {
objectMetadataItems: EnrichedObjectMetadataItem[];
@@ -79,9 +80,9 @@ export const mapFieldMetadataToGraphQLQuery = ({
) {
if (!isDefined(morphRelation.targetObjectMetadata.id)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Target object metadata id not found with field metadata ${fieldMetadata.name}`,
+ doNotTranslate(
+ `Target object metadata id not found with field metadata ${fieldMetadata.name}`,
+ ),
);
}
@@ -100,9 +101,7 @@ export const mapFieldMetadataToGraphQLQuery = ({
continue;
}
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- gqlMorphField += `${relationFieldName}
+ gqlMorphField += doNotTranslate(`${relationFieldName}
{
edges {
node ${mapObjectMetadataToGraphQLQuery({
@@ -114,7 +113,7 @@ export const mapFieldMetadataToGraphQLQuery = ({
objectPermissionsByObjectMetadataId,
})}
}
-}`;
+}`);
}
if (fieldMetadata.settings?.relationType === RelationType.MANY_TO_ONE) {
@@ -162,9 +161,9 @@ ${mapObjectMetadataToGraphQLQuery({
) {
if (!isDefined(fieldMetadata.relation?.targetObjectMetadata.id)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Target object metadata id not found with field metadata ${fieldMetadata.name}`,
+ doNotTranslate(
+ `Target object metadata id not found with field metadata ${fieldMetadata.name}`,
+ ),
);
}
@@ -216,9 +215,9 @@ ${mapObjectMetadataToGraphQLQuery({
) {
if (!isDefined(fieldMetadata.relation?.targetObjectMetadata.id)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Target object metadata id not found with field metadata ${fieldMetadata.name}`,
+ doNotTranslate(
+ `Target object metadata id not found with field metadata ${fieldMetadata.name}`,
+ ),
);
}
@@ -232,9 +231,7 @@ ${mapObjectMetadataToGraphQLQuery({
}
}
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
edges {
node ${mapObjectMetadataToGraphQLQuery({
@@ -246,13 +243,11 @@ ${mapObjectMetadataToGraphQLQuery({
objectPermissionsByObjectMetadataId,
})}
}
-}`;
+}`);
}
if (fieldType === FieldMetadataType.LINKS) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
primaryLinkUrl
primaryLinkLabel
@@ -260,34 +255,28 @@ ${mapObjectMetadataToGraphQLQuery({
label
url
}
-}`;
+}`);
}
if (fieldType === FieldMetadataType.CURRENCY) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
amountMicros
currencyCode
}
- `;
+ `);
}
if (fieldType === FieldMetadataType.FULL_NAME) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
firstName
lastName
-}`;
+}`);
}
if (fieldType === FieldMetadataType.ADDRESS) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
addressStreet1
addressStreet2
@@ -297,13 +286,11 @@ ${mapObjectMetadataToGraphQLQuery({
addressPostcode
addressLat
addressLng
-}`;
+}`);
}
if (fieldType === FieldMetadataType.ACTOR) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
source
workspaceMemberId
@@ -312,23 +299,19 @@ ${mapObjectMetadataToGraphQLQuery({
provider
applicationId
}
-}`;
+}`);
}
if (fieldType === FieldMetadataType.EMAILS) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
primaryEmail
additionalEmails
-}`;
+}`);
}
if (fieldType === FieldMetadataType.PHONES) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
primaryPhoneNumber
primaryPhoneCountryCode
@@ -338,29 +321,25 @@ ${mapObjectMetadataToGraphQLQuery({
callingCode
countryCode
}
- }`;
+ }`);
}
if (fieldType === FieldMetadataType.FILES) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
fileId
label
extension
url
- }`;
+ }`);
}
if (fieldType === FieldMetadataType.RICH_TEXT) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${gqlField}
+ return doNotTranslate(`${gqlField}
{
blocknote
markdown
-}`;
+}`);
}
return '';
diff --git a/packages/twenty-front/src/modules/object-metadata/utils/mapObjectMetadataToGraphQLQuery.ts b/packages/twenty-front/src/modules/object-metadata/utils/mapObjectMetadataToGraphQLQuery.ts
index 54c6e2c0510..815f639aa99 100644
--- a/packages/twenty-front/src/modules/object-metadata/utils/mapObjectMetadataToGraphQLQuery.ts
+++ b/packages/twenty-front/src/modules/object-metadata/utils/mapObjectMetadataToGraphQLQuery.ts
@@ -14,6 +14,7 @@ import {
computeMorphRelationGqlFieldName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type MapObjectMetadataToGraphQLQueryArgs = {
objectMetadataItems: EnrichedObjectMetadataItem[];
@@ -129,11 +130,9 @@ export const mapObjectMetadataToGraphQLQuery = ({
);
if (!isRootLevel && computeReferences) {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `{
+ return doNotTranslate(`{
__ref
- }`;
+ }`);
}
const mappedFields = gqlFieldWithFieldMetadataThatSouldBeQueried
.map((gqlFieldWithFieldMetadata) => {
@@ -156,10 +155,8 @@ export const mapObjectMetadataToGraphQLQuery = ({
.filter((field) => field !== '')
.join('\n');
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `{
+ return doNotTranslate(`{
__typename
${mappedFields}
-}`;
+}`);
};
diff --git a/packages/twenty-front/src/modules/object-metadata/utils/mapSoftDeleteFieldsToGraphQLQuery.ts b/packages/twenty-front/src/modules/object-metadata/utils/mapSoftDeleteFieldsToGraphQLQuery.ts
index 4339ed9adeb..bec6635c605 100644
--- a/packages/twenty-front/src/modules/object-metadata/utils/mapSoftDeleteFieldsToGraphQLQuery.ts
+++ b/packages/twenty-front/src/modules/object-metadata/utils/mapSoftDeleteFieldsToGraphQLQuery.ts
@@ -1,4 +1,5 @@
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const mapSoftDeleteFieldsToGraphQLQuery = (
objectMetadataItem: Pick<EnrichedObjectMetadataItem, 'readableFields'>,
@@ -12,10 +13,8 @@ export const mapSoftDeleteFieldsToGraphQLQuery = (
softDeleteFields.indexOf(a.name) - softDeleteFields.indexOf(b.name),
);
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `{
+ return doNotTranslate(`{
__typename
${fieldsThatShouldBeQueried.map((field) => field.name).join('\n')}
- }`;
+ }`);
};
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterAddFilterRuleSelect.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterAddFilterRuleSelect.tsx
index cecd56a9a87..917deec465c 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterAddFilterRuleSelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterAddFilterRuleSelect.tsx
@@ -19,6 +19,7 @@ import { t } from '@lingui/core/macro';
import { useContext } from 'react';
import { RecordFilterGroupLogicalOperator } from 'twenty-shared/types';
import { getFilterTypeFromFieldType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconLibraryPlus, IconPlus } from 'twenty-ui/icon';
import { v4 } from 'uuid';
@@ -58,9 +59,9 @@ export const AdvancedFilterAddFilterRuleSelect = ({
getDefaultFieldMetadataItemForFilter(objectMetadataItem);
if (!isDefined(defaultFieldMetadataItemForFilter)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Missing default field metadata item for filter');
+ throw new Error(
+ doNotTranslate('Missing default field metadata item for filter'),
+ );
}
const filterType = getFilterTypeFromFieldType(
@@ -93,15 +94,13 @@ export const AdvancedFilterAddFilterRuleSelect = ({
getDefaultFieldMetadataItemForFilter(objectMetadataItem);
if (!isDefined(defaultFieldMetadataItemForFilter)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Missing default field metadata item for filter');
+ throw new Error(
+ doNotTranslate('Missing default field metadata item for filter'),
+ );
}
if (!isDefined(currentView)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Missing view');
+ throw new Error(doNotTranslate('Missing view'));
}
const newRecordFilterGroupId = v4();
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelectContent.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelectContent.tsx
index fc2ee140ce3..c6475b080ee 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelectContent.tsx
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/components/AdvancedFilterRecordFilterOperandSelectContent.tsx
@@ -15,6 +15,7 @@ import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent
import { t } from '@lingui/core/macro';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type ViewFilterOperand } from 'twenty-shared/types';
type AdvancedFilterRecordFilterOperandSelectContentProps = {
@@ -54,8 +55,7 @@ export const AdvancedFilterRecordFilterOperandSelectContent = ({
const timeZoneAbbreviation =
isWorkflowFindRecords === true
? // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'UTC'
+ doNotTranslate('UTC')
: !isSystemTimezone
? userTimeZoneAbbreviation
: null;
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterCompositeSubField.ts b/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterCompositeSubField.ts
index a7b41eb93f0..23a84294b02 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterCompositeSubField.ts
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterCompositeSubField.ts
@@ -14,6 +14,7 @@ import { type CompositeFieldSubFieldName } from '@/settings/data-model/types/Com
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { getFilterTypeFromFieldType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type ApplyAdvancedFilterCompositeSubFieldParams = {
sourceFieldMetadataItem: FieldMetadataItem;
@@ -73,9 +74,9 @@ export const useApplyAdvancedFilterCompositeSubField = () => {
if (!isDefined(firstOperand)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `No valid operand found for filter type: ${filterType} and subFieldName: ${subFieldName}`,
+ doNotTranslate(
+ `No valid operand found for filter type: ${filterType} and subFieldName: ${subFieldName}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterRelationTargetField.ts b/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterRelationTargetField.ts
index 23d402ef4bc..39026dfcbda 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterRelationTargetField.ts
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterRelationTargetField.ts
@@ -13,6 +13,7 @@ import { getRecordFilterOperands } from '@/object-record/record-filter/utils/get
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { getFilterTypeFromFieldType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type ApplyAdvancedFilterRelationTargetFieldParams = {
sourceFieldMetadataItem: FieldMetadataItem;
@@ -75,9 +76,9 @@ export const useApplyAdvancedFilterRelationTargetField = () => {
if (!isDefined(firstOperand)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `No valid operand found for relation-traversal filter type: ${filterType}`,
+ doNotTranslate(
+ `No valid operand found for relation-traversal filter type: ${filterType}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterSourceField.ts b/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterSourceField.ts
index 084531c4ffb..bd2b2abc6ad 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterSourceField.ts
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/hooks/useApplyAdvancedFilterSourceField.ts
@@ -13,6 +13,7 @@ import { type RecordFilter } from '@/object-record/record-filter/types/RecordFil
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { getFilterTypeFromFieldType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type ApplyAdvancedFilterSourceFieldParams = {
sourceFieldMetadataItem: FieldMetadataItem;
@@ -66,9 +67,9 @@ export const useApplyAdvancedFilterSourceField = () => {
});
if (!isDefined(defaultOperand)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error(`No valid operand found for filter type: ${filterType}`);
+ throw new Error(
+ doNotTranslate(`No valid operand found for filter type: ${filterType}`),
+ );
}
setSelectedOperandInDropdown(defaultOperand);
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelCreateRootFilterButton.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelCreateRootFilterButton.tsx
index e4a69ccaa7d..9d6accc9883 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelCreateRootFilterButton.tsx
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelCreateRootFilterButton.tsx
@@ -13,6 +13,7 @@ import { t } from '@lingui/core/macro';
import { useContext } from 'react';
import { RecordFilterGroupLogicalOperator } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconFilter } from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';
import { v4 } from 'uuid';
@@ -67,9 +68,7 @@ export const AdvancedFilterSidePanelCreateRootFilterButton = ({
upsertRecordFilterGroup(newRecordFilterGroup);
if (!isDefined(defaultFieldMetadataItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Missing default filter definition');
+ throw new Error(doNotTranslate('Missing default filter definition'));
}
const { newRecordFilter } = createEmptyRecordFilterFromFieldMetadataItem(
diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterOperandSelect.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterOperandSelect.tsx
index c29dff5c8b5..e50a39b6368 100644
--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterOperandSelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelRecordFilterOperandSelect.tsx
@@ -8,6 +8,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { t } from '@lingui/core/macro';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type AdvancedFilterSidePanelRecordFilterOperandSelectProps = {
recordFilterId: string;
@@ -37,9 +38,9 @@ export const AdvancedFilterSidePanelRecordFilterOperandSelect = ({
: [];
const shouldUseUTCTimeZone = isWorkflowFindRecords === true;
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const timeZoneAbbreviation = shouldUseUTCTimeZone ? 'UTC' : undefined;
+ const timeZoneAbbreviation = shouldUseUTCTimeZone
+ ? doNotTranslate('UTC')
+ : undefined;
if (isDisabled === true) {
return (
diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/generateRecordCacheFragment.ts b/packages/twenty-front/src/modules/object-record/cache/utils/generateRecordCacheFragment.ts
index c1afc940b3a..7ad4f80ce77 100644
--- a/packages/twenty-front/src/modules/object-record/cache/utils/generateRecordCacheFragment.ts
+++ b/packages/twenty-front/src/modules/object-record/cache/utils/generateRecordCacheFragment.ts
@@ -7,6 +7,7 @@ import {
type RecordGqlFields,
} from 'twenty-shared/types';
import { capitalize, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type GenerateRecordCacheFragmentArgs = {
objectMetadataItems: EnrichedObjectMetadataItem[];
@@ -37,17 +38,17 @@ export const generateRecordCacheFragment = ({
}: GenerateRecordCacheFragmentArgs): DocumentNode => {
const capitalizedObjectName = capitalize(objectMetadataItem.nameSingular);
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const fragmentSource = `fragment ${capitalizedObjectName}Fragment on ${capitalizedObjectName} ${mapObjectMetadataToGraphQLQuery(
- {
- objectMetadataItems,
- objectMetadataItem,
- computeReferences,
- recordGqlFields,
- objectPermissionsByObjectMetadataId,
- },
- )}`;
+ const fragmentSource = doNotTranslate(
+ `fragment ${capitalizedObjectName}Fragment on ${capitalizedObjectName} ${mapObjectMetadataToGraphQLQuery(
+ {
+ objectMetadataItems,
+ objectMetadataItem,
+ computeReferences,
+ recordGqlFields,
+ objectPermissionsByObjectMetadataId,
+ },
+ )}`,
+ );
const cachedFragment = recordCacheFragmentBySource.get(fragmentSource);
diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/getRecordNodeFromRecord.ts b/packages/twenty-front/src/modules/object-record/cache/utils/getRecordNodeFromRecord.ts
index b5614554a48..93f8c7921bf 100644
--- a/packages/twenty-front/src/modules/object-record/cache/utils/getRecordNodeFromRecord.ts
+++ b/packages/twenty-front/src/modules/object-record/cache/utils/getRecordNodeFromRecord.ts
@@ -16,6 +16,7 @@ import {
isDefined,
pascalCase,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
export const getRecordNodeFromRecord = <T extends ObjectRecord>({
@@ -198,10 +199,8 @@ export const getRecordNodeFromRecord = <T extends ObjectRecord>({
morphRelations: field.morphRelations ?? [],
fieldName: field.name,
},
- }).map(
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- (possibleMorphRelationName) => `${possibleMorphRelationName}Id`,
+ }).map((possibleMorphRelationName) =>
+ doNotTranslate(`${possibleMorphRelationName}Id`),
);
const isJoinColumn =
diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnection.ts b/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnection.ts
index 29dcefe3489..c79b49e0f37 100644
--- a/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnection.ts
+++ b/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnection.ts
@@ -3,15 +3,16 @@ import { z } from 'zod';
import { type RecordGqlConnection } from '@/object-record/graphql/types/RecordGqlConnection';
import { capitalize, getConnectionTypename } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const isObjectRecordConnection = (
objectNameSingular: string,
storeValue: StoreValue,
): storeValue is RecordGqlConnection => {
const objectConnectionTypeName = getConnectionTypename(objectNameSingular);
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const objectEdgeTypeName = `${capitalize(objectNameSingular)}Edge`;
+ const objectEdgeTypeName = doNotTranslate(
+ `${capitalize(objectNameSingular)}Edge`,
+ );
const cachedObjectConnectionSchema = z.object({
__typename: z.literal(objectConnectionTypeName),
edges: z
diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnectionWithRefs.ts b/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnectionWithRefs.ts
index 00ac58fe4f8..c31508f3904 100644
--- a/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnectionWithRefs.ts
+++ b/packages/twenty-front/src/modules/object-record/cache/utils/isObjectRecordConnectionWithRefs.ts
@@ -3,15 +3,16 @@ import { z } from 'zod';
import { type RecordGqlRefConnection } from '@/object-record/cache/types/RecordGqlRefConnection';
import { capitalize, getConnectionTypename } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const isObjectRecordConnectionWithRefs = (
objectNameSingular: string,
storeValue: StoreValue,
): storeValue is RecordGqlRefConnection => {
const objectConnectionTypeName = getConnectionTypename(objectNameSingular);
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const objectEdgeTypeName = `${capitalize(objectNameSingular)}Edge`;
+ const objectEdgeTypeName = doNotTranslate(
+ `${capitalize(objectNameSingular)}Edge`,
+ );
const cachedObjectConnectionSchema = z.object({
__typename: z.literal(objectConnectionTypeName),
edges: z.array(
diff --git a/packages/twenty-front/src/modules/object-record/graphql/record-gql-fields/utils/generateDepthRecordGqlFieldsFromFields.ts b/packages/twenty-front/src/modules/object-record/graphql/record-gql-fields/utils/generateDepthRecordGqlFieldsFromFields.ts
index 9488fd4e65a..39291de713a 100644
--- a/packages/twenty-front/src/modules/object-record/graphql/record-gql-fields/utils/generateDepthRecordGqlFieldsFromFields.ts
+++ b/packages/twenty-front/src/modules/object-record/graphql/record-gql-fields/utils/generateDepthRecordGqlFieldsFromFields.ts
@@ -12,6 +12,7 @@ import {
computeMorphRelationGqlFieldName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const generateDepthRecordGqlFieldsFromFields = ({
objectMetadataItems,
@@ -38,9 +39,9 @@ export const generateDepthRecordGqlFieldsFromFields = ({
if (!targetObjectMetadataItem) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Target object metadata item not found for ${fieldMetadata.name}`,
+ doNotTranslate(
+ `Target object metadata item not found for ${fieldMetadata.name}`,
+ ),
);
}
@@ -74,9 +75,7 @@ export const generateDepthRecordGqlFieldsFromFields = ({
);
const manyToOneGqlFields = {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- [`${fieldMetadata.name}Id`]: true,
+ [doNotTranslate(`${fieldMetadata.name}Id`)]: true,
};
return {
@@ -109,9 +108,9 @@ export const generateDepthRecordGqlFieldsFromFields = ({
if (!morphTargetObjectMetadataItem) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Target object metadata item not found for ${fieldMetadata.name} (morph target ${morphRelation.targetObjectMetadata.nameSingular})`,
+ doNotTranslate(
+ `Target object metadata item not found for ${fieldMetadata.name} (morph target ${morphRelation.targetObjectMetadata.nameSingular})`,
+ ),
);
}
@@ -148,8 +147,7 @@ export const generateDepthRecordGqlFieldsFromFields = ({
: {}),
...(relationType === RelationType.MANY_TO_ONE
? // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- { [`${morphGqlField.gqlField}Id`]: true }
+ { [doNotTranslate(`${morphGqlField.gqlField}Id`)]: true }
: {}),
}),
{},
diff --git a/packages/twenty-front/src/modules/object-record/hooks/useBuildRecordInputFromRLSPredicates.ts b/packages/twenty-front/src/modules/object-record/hooks/useBuildRecordInputFromRLSPredicates.ts
index 36d7e2613a0..f30b168521b 100644
--- a/packages/twenty-front/src/modules/object-record/hooks/useBuildRecordInputFromRLSPredicates.ts
+++ b/packages/twenty-front/src/modules/object-record/hooks/useBuildRecordInputFromRLSPredicates.ts
@@ -17,6 +17,7 @@ import { isUndefined } from '@sniptt/guards';
import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined, isPlainObject } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const mergeCompositeValues = (
existingValue: unknown,
@@ -54,8 +55,7 @@ export const useBuildRecordInputFromRLSPredicates = ({
fieldMetadataItem.type === 'RELATION' &&
fieldMetadataItem.settings?.relationType === RelationType.MANY_TO_ONE
? // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `${fieldMetadataItem.name}Id`
+ doNotTranslate(`${fieldMetadataItem.name}Id`)
: fieldMetadataItem.name;
const getWorkspaceMemberFieldValue = ({
@@ -72,9 +72,9 @@ export const useBuildRecordInputFromRLSPredicates = ({
if (!isDefined(workspaceMemberFieldMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Workspace member field metadata item not found for id: ${workspaceMemberFieldMetadataId}`,
+ doNotTranslate(
+ `Workspace member field metadata item not found for id: ${workspaceMemberFieldMetadataId}`,
+ ),
);
}
@@ -86,9 +86,9 @@ export const useBuildRecordInputFromRLSPredicates = ({
if (isCompositeFieldType(workspaceMemberFieldMetadataItem.type)) {
if (!workspaceMemberSubFieldName) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Workspace member subfield name not found for field: ${workspaceMemberFieldMetadataItem.name}`,
+ doNotTranslate(
+ `Workspace member subfield name not found for field: ${workspaceMemberFieldMetadataItem.name}`,
+ ),
);
}
@@ -100,9 +100,9 @@ export const useBuildRecordInputFromRLSPredicates = ({
if (isUndefined(workspaceMemberFieldValue)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Current workspace member field value not found for field: ${workspaceMemberFieldMetadataItem.name}`,
+ doNotTranslate(
+ `Current workspace member field value not found for field: ${workspaceMemberFieldMetadataItem.name}`,
+ ),
);
}
@@ -115,9 +115,11 @@ export const useBuildRecordInputFromRLSPredicates = ({
objectMetadataItem?: EnrichedObjectMetadataItem;
} = {}): Partial<ObjectRecord> => {
if (!isDefined(objectMetadataItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata item is required to build RLS defaults');
+ throw new Error(
+ doNotTranslate(
+ 'Object metadata item is required to build RLS defaults',
+ ),
+ );
}
const objectPermissions = getObjectPermissionsForObject(
@@ -164,9 +166,9 @@ export const useBuildRecordInputFromRLSPredicates = ({
if (isCompositeFieldType(fieldMetadataItem.type)) {
if (!filter.subFieldName) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Subfield name not found for composite field: ${fieldMetadataItem.name}`,
+ doNotTranslate(
+ `Subfield name not found for composite field: ${fieldMetadataItem.name}`,
+ ),
);
}
@@ -178,9 +180,9 @@ export const useBuildRecordInputFromRLSPredicates = ({
if (!compositeValue) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Composite subfield not found for field: ${fieldMetadataItem.name}`,
+ doNotTranslate(
+ `Composite subfield not found for field: ${fieldMetadataItem.name}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/hooks/useRecordChipData.ts b/packages/twenty-front/src/modules/object-record/hooks/useRecordChipData.ts
index e3f9e5beb71..fd34cec5fcb 100644
--- a/packages/twenty-front/src/modules/object-record/hooks/useRecordChipData.ts
+++ b/packages/twenty-front/src/modules/object-record/hooks/useRecordChipData.ts
@@ -3,6 +3,7 @@ import { type RecordChipData } from '@/object-record/record-field/ui/types/Recor
import { type ObjectRecord } from '@/object-record/types/ObjectRecord';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type UseRecordChipDataArgs = {
objectNameSingular: string;
@@ -24,9 +25,9 @@ export const useRecordChipData = ({
if (!isDefined(identifierChipGenerator)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `No identifier chip generator found for object name singular: ${objectNameSingular}`,
+ doNotTranslate(
+ `No identifier chip generator found for object name singular: ${objectNameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldAttachTargetRecord.ts b/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldAttachTargetRecord.ts
index 4f8af580dec..c4cd2f80235 100644
--- a/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldAttachTargetRecord.ts
+++ b/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldAttachTargetRecord.ts
@@ -7,6 +7,7 @@ import { generateDepthRecordGqlFieldsFromRecord } from '@/object-record/graphql/
import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions';
import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRecordOneToManyFieldAttachTargetRecord = () => {
const apolloCoreClient = useApolloCoreClient();
@@ -40,18 +41,18 @@ export const useRecordOneToManyFieldAttachTargetRecord = () => {
if (!targetObjectMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Could not find related object metadata for ${targetObjectNameSingular}`,
+ doNotTranslate(
+ `Could not find related object metadata for ${targetObjectNameSingular}`,
+ ),
'RELATED_OBJECT_METADATA_NOT_FOUND',
);
}
if (!sourceObjectMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Could not find source object metadata for ${sourceObjectNameSingular}`,
+ doNotTranslate(
+ `Could not find source object metadata for ${sourceObjectNameSingular}`,
+ ),
'SOURCE_OBJECT_METADATA_NOT_FOUND',
);
}
@@ -65,9 +66,7 @@ export const useRecordOneToManyFieldAttachTargetRecord = () => {
});
if (!cachedTargetRecord) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Could not find cached related record');
+ throw new Error(doNotTranslate('Could not find cached related record'));
}
const previousRecordId = cachedTargetRecord?.[`${targetGQLFieldName}Id`];
@@ -110,9 +109,7 @@ export const useRecordOneToManyFieldAttachTargetRecord = () => {
objectNameSingular: targetObjectNameSingular,
idToUpdate: targetRecordId,
updateOneRecordInput: {
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- [`${targetGQLFieldName}Id`]: sourceRecordId,
+ [doNotTranslate(`${targetGQLFieldName}Id`)]: sourceRecordId,
},
});
};
diff --git a/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldDetachTargetRecord.ts b/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldDetachTargetRecord.ts
index 03f8a4ad8f7..aabfadafceb 100644
--- a/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldDetachTargetRecord.ts
+++ b/packages/twenty-front/src/modules/object-record/hooks/useRecordOneToManyFieldDetachTargetRecord.ts
@@ -6,6 +6,7 @@ import { getRefName } from '@/object-record/cache/utils/getRefName';
import { modifyRecordFromCache } from '@/object-record/cache/utils/modifyRecordFromCache';
import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';
import { CustomError } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRecordOneToManyFieldDetachTargetRecord = () => {
const apolloCoreClient = useApolloCoreClient();
@@ -37,18 +38,18 @@ export const useRecordOneToManyFieldDetachTargetRecord = () => {
if (!targetObjectMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Could not find related object metadata for ${targetObjectNameSingular}`,
+ doNotTranslate(
+ `Could not find related object metadata for ${targetObjectNameSingular}`,
+ ),
'RELATED_OBJECT_METADATA_NOT_FOUND',
);
}
if (!sourceObjectMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Could not find source object metadata for ${sourceObjectNameSingular}`,
+ doNotTranslate(
+ `Could not find source object metadata for ${sourceObjectNameSingular}`,
+ ),
'SOURCE_OBJECT_METADATA_NOT_FOUND',
);
}
@@ -87,9 +88,7 @@ export const useRecordOneToManyFieldDetachTargetRecord = () => {
objectNameSingular: targetObjectNameSingular,
idToUpdate: targetRecordId,
updateOneRecordInput: {
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- [`${targetGQLFieldName}Id`]: null,
+ [doNotTranslate(`${targetGQLFieldName}Id`)]: null,
},
});
};
diff --git a/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecord.ts b/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecord.ts
index f77793304da..f214fd3ec56 100644
--- a/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecord.ts
+++ b/packages/twenty-front/src/modules/object-record/hooks/useUpdateOneRecord.ts
@@ -23,6 +23,7 @@ import { sanitizeRecordInput } from '@/object-record/utils/sanitizeRecordInput';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isNull } from '@sniptt/guards';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { buildRecordFromKeysWithSameValue } from '~/utils/array/buildRecordFromKeysWithSameValue';
type UpdateOneRecordArgs<UpdatedObjectRecord> = {
@@ -58,9 +59,9 @@ export const useUpdateOneRecord = () => {
if (!objectMetadataItem) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for ${objectNameSingular}`,
+ doNotTranslate(
+ `Object metadata item not found for ${objectNameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/useGenerateCombinedFindManyRecordsQuery.ts b/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/useGenerateCombinedFindManyRecordsQuery.ts
index cdb3be4493a..6c4be874844 100644
--- a/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/useGenerateCombinedFindManyRecordsQuery.ts
+++ b/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/useGenerateCombinedFindManyRecordsQuery.ts
@@ -11,6 +11,7 @@ import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions
import { getCombinedFindManyRecordsQueryFilteringPart } from '@/object-record/multiple-objects/utils/getCombinedFindManyRecordsQueryFilteringPart';
import isEmpty from 'lodash.isempty';
import { capitalize } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { generateDepthRecordGqlFieldsFromObject } from '@/object-record/graphql/record-gql-fields/utils/generateDepthRecordGqlFieldsFromObject';
export const useGenerateCombinedFindManyRecordsQuery = ({
@@ -37,9 +38,9 @@ export const useGenerateCombinedFindManyRecordsQuery = ({
if (isUndefined(objectMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for object name singular: ${operationSignature.objectNameSingular}`,
+ doNotTranslate(
+ `Object metadata item not found for object name singular: ${operationSignature.objectNameSingular}`,
+ ),
);
}
@@ -55,35 +56,32 @@ export const useGenerateCombinedFindManyRecordsQuery = ({
const filterPerMetadataItemArray =
queryOperationSignatureWithObjectMetadataItemArray
- .map(
- ({ objectMetadataItem }) =>
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ .map(({ objectMetadataItem }) =>
+ doNotTranslate(
`$filter${capitalize(objectMetadataItem.nameSingular)}: ${capitalize(
objectMetadataItem.nameSingular,
)}FilterInput`,
+ ),
)
.join(', ');
const orderByPerMetadataItemArray =
queryOperationSignatureWithObjectMetadataItemArray
- .map(
- ({ objectMetadataItem }) =>
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ .map(({ objectMetadataItem }) =>
+ doNotTranslate(
`$orderBy${capitalize(objectMetadataItem.nameSingular)}: [${capitalize(
objectMetadataItem.nameSingular,
)}OrderByInput]`,
+ ),
)
.join(', ');
const cursorFilteringPerMetadataItemArray =
queryOperationSignatureWithObjectMetadataItemArray
- .map(
- ({ objectMetadataItem }) =>
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ .map(({ objectMetadataItem }) =>
+ doNotTranslate(
`$after${capitalize(objectMetadataItem.nameSingular)}: String, $before${capitalize(objectMetadataItem.nameSingular)}: String, $first${capitalize(objectMetadataItem.nameSingular)}: Int, $last${capitalize(objectMetadataItem.nameSingular)}: Int`,
+ ),
)
.join(', ');
diff --git a/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/usePerformCombinedFindManyRecords.ts b/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/usePerformCombinedFindManyRecords.ts
index 9a017265633..89964d6c53c 100644
--- a/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/usePerformCombinedFindManyRecords.ts
+++ b/packages/twenty-front/src/modules/object-record/multiple-objects/hooks/usePerformCombinedFindManyRecords.ts
@@ -14,6 +14,7 @@ import { type CombinedFindManyRecordsQueryResult } from '@/object-record/multipl
import { generateCombinedFindManyRecordsQueryVariables } from '@/object-record/multiple-objects/utils/generateCombinedFindManyRecordsQueryVariables';
import { getCombinedFindManyRecordsQueryFilteringPart } from '@/object-record/multiple-objects/utils/getCombinedFindManyRecordsQueryFilteringPart';
import { capitalize } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const usePerformCombinedFindManyRecords = () => {
const apolloCoreClient = useApolloCoreClient();
@@ -26,33 +27,30 @@ export const usePerformCombinedFindManyRecords = () => {
objectMetadataItemsValue: EnrichedObjectMetadataItem[],
) => {
const filterPerMetadataItemArray = operationSignatures
- .map(
- ({ objectNameSingular }) =>
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ .map(({ objectNameSingular }) =>
+ doNotTranslate(
`$filter${capitalize(objectNameSingular)}: ${capitalize(
objectNameSingular,
)}FilterInput`,
+ ),
)
.join(', ');
const orderByPerMetadataItemArray = operationSignatures
- .map(
- ({ objectNameSingular }) =>
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ .map(({ objectNameSingular }) =>
+ doNotTranslate(
`$orderBy${capitalize(objectNameSingular)}: [${capitalize(
objectNameSingular,
)}OrderByInput]`,
+ ),
)
.join(', ');
const cursorFilteringPerMetadataItemArray = operationSignatures
- .map(
- ({ objectNameSingular }) =>
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ .map(({ objectNameSingular }) =>
+ doNotTranslate(
`$after${capitalize(objectNameSingular)}: String, $before${capitalize(objectNameSingular)}: String, $first${capitalize(objectNameSingular)}: Int, $last${capitalize(objectNameSingular)}: Int`,
+ ),
)
.join(', ');
@@ -66,9 +64,9 @@ export const usePerformCombinedFindManyRecords = () => {
if (isUndefined(objectMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Object metadata item not found for object name singular: ${operationSignature.objectNameSingular}`,
+ doNotTranslate(
+ `Object metadata item not found for object name singular: ${operationSignature.objectNameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/multiple-objects/utils/getCombinedFindManyRecordsQueryFilteringPart.ts b/packages/twenty-front/src/modules/object-record/multiple-objects/utils/getCombinedFindManyRecordsQueryFilteringPart.ts
index 06cf6ad2d1b..e5bff00d04e 100644
--- a/packages/twenty-front/src/modules/object-record/multiple-objects/utils/getCombinedFindManyRecordsQueryFilteringPart.ts
+++ b/packages/twenty-front/src/modules/object-record/multiple-objects/utils/getCombinedFindManyRecordsQueryFilteringPart.ts
@@ -1,16 +1,15 @@
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
import { capitalize } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getCombinedFindManyRecordsQueryFilteringPart = (
objectMetadataItem: EnrichedObjectMetadataItem,
) => {
- // Generated GraphQL syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${objectMetadataItem.namePlural}(
+ return doNotTranslate(`${objectMetadataItem.namePlural}(
filter: $filter${capitalize(objectMetadataItem.nameSingular)},
orderBy: $orderBy${capitalize(objectMetadataItem.nameSingular)},
after: $after${capitalize(objectMetadataItem.nameSingular)},
before: $before${capitalize(objectMetadataItem.nameSingular)},
first: $first${capitalize(objectMetadataItem.nameSingular)},
- last: $last${capitalize(objectMetadataItem.nameSingular)})`;
+ last: $last${capitalize(objectMetadataItem.nameSingular)})`);
};
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCountrySelect.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCountrySelect.tsx
index ee22b409148..179a080e3cf 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCountrySelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCountrySelect.tsx
@@ -18,6 +18,7 @@ import { useLingui } from '@lingui/react/macro';
import { isNonEmptyString } from '@sniptt/guards';
import { type ChangeEvent, useState } from 'react';
import { isDefined, parseJson } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { z } from 'zod';
export const EMPTY_FILTER_VALUE = '[]';
@@ -74,9 +75,9 @@ export const ObjectFilterDropdownCountrySelect = () => {
if (!isDefined(fieldMetadataItemUsedInFilterDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item used in filter dropdown should be defined',
+ doNotTranslate(
+ 'Field metadata item used in filter dropdown should be defined',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCurrencySelect.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCurrencySelect.tsx
index c9ee662ae93..cbf04c21bbd 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCurrencySelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownCurrencySelect.tsx
@@ -18,6 +18,7 @@ import { useLingui } from '@lingui/react/macro';
import { isNonEmptyString } from '@sniptt/guards';
import { type ChangeEvent, useState } from 'react';
import { isDefined, parseJson } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { z } from 'zod';
export const EMPTY_FILTER_VALUE = '[]';
@@ -75,9 +76,9 @@ export const ObjectFilterDropdownCurrencySelect = () => {
if (!isDefined(fieldMetadataItemUsedInFilterDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item used in filter dropdown should be defined',
+ doNotTranslate(
+ 'Field metadata item used in filter dropdown should be defined',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownDateTimeInput.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownDateTimeInput.tsx
index 3bf6e0eafd2..f237bf92433 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownDateTimeInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownDateTimeInput.tsx
@@ -17,6 +17,7 @@ import {
resolveDateTimeFilter,
type RelativeDateFilter,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';
import { isNonEmptyString } from '@sniptt/guards';
@@ -104,8 +105,7 @@ export const ObjectFilterDropdownDateTimeInput = () => {
const internalZonedDateTime =
!isRelativeDateFilter && isNonEmptyString(stringFilterValue)
? // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- stringFilterValue.includes('T')
+ stringFilterValue.includes(doNotTranslate('T'))
? Temporal.Instant.from(stringFilterValue).toZonedDateTimeISO(
timeZone ?? userTimezone,
)
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordSelect.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordSelect.tsx
index 54631754969..5d7eba3e904 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordSelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordSelect.tsx
@@ -24,6 +24,7 @@ import {
isDefined,
jsonRelationFilterValueSchema,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconUserCircle } from 'twenty-ui/icon';
import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
@@ -256,9 +257,9 @@ export const ObjectFilterDropdownRecordSelect = ({
const objectMetadataItems = useAtomStateValue(objectMetadataItemsSelector);
if (!isDefined(fieldMetadataItemUsedInFilterDropdown)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('fieldMetadataItemUsedInFilterDropdown is not defined');
+ throw new Error(
+ doNotTranslate('fieldMetadataItemUsedInFilterDropdown is not defined'),
+ );
}
// Nested relation filters pick records from the leaf relation's target object
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownSourceSelect.tsx b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownSourceSelect.tsx
index c3ae0460f8b..b742bef8dc2 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownSourceSelect.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/components/ObjectFilterDropdownSourceSelect.tsx
@@ -13,6 +13,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isNonEmptyString } from '@sniptt/guards';
import { isDefined, parseJson } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { z } from 'zod';
export const EMPTY_FILTER_VALUE = '[]';
@@ -62,9 +63,9 @@ export const ObjectFilterDropdownSourceSelect = ({
if (!isDefined(fieldMetadataItemUsedInFilterDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item used in filter dropdown should be defined',
+ doNotTranslate(
+ 'Field metadata item used in filter dropdown should be defined',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/constants/ActorSourceFilterOptions.ts b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/constants/ActorSourceFilterOptions.ts
index 53d6ed75b08..d0b6ed77b87 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/constants/ActorSourceFilterOptions.ts
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/constants/ActorSourceFilterOptions.ts
@@ -11,6 +11,7 @@ import {
IconUserCircle,
IconWebhook,
} from 'twenty-ui/icon';
+import { doNotTranslate } from 'twenty-shared/i18n';
// Source names are stored in saved filters; label descriptors provide localized display text.
export const ACTOR_SOURCE_FILTER_OPTIONS: Array<{
@@ -22,62 +23,54 @@ export const ACTOR_SOURCE_FILTER_OPTIONS: Array<{
}> = [
{
id: 'MANUAL',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'User',
+ name: doNotTranslate('User'),
label: msg`User`,
AvatarIcon: IconUserCircle,
isIconInverted: true,
},
{
id: 'IMPORT',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'Import',
+ name: doNotTranslate('Import'),
label: msg`Import`,
AvatarIcon: IconCsv,
isIconInverted: true,
},
{
id: 'API',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'Api',
+ name: doNotTranslate('Api'),
label: msg`API`,
AvatarIcon: IconApi,
isIconInverted: true,
},
{
id: 'EMAIL',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'Email',
+ name: doNotTranslate('Email'),
label: msg`Email`,
AvatarIcon: IconGmail,
},
{
id: 'CALENDAR',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'Calendar',
+ name: doNotTranslate('Calendar'),
label: msg`Calendar`,
AvatarIcon: IconGoogleCalendar,
},
{
id: 'WORKFLOW',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'Workflow',
+ name: doNotTranslate('Workflow'),
label: msg`Workflow`,
AvatarIcon: IconSettingsAutomation,
isIconInverted: true,
},
{
id: 'WEBHOOK',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'Webhook',
+ name: doNotTranslate('Webhook'),
label: msg`Webhook`,
AvatarIcon: IconWebhook,
isIconInverted: true,
},
{
id: 'SYSTEM',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- name: 'System',
+ name: doNotTranslate('System'),
label: msg`System`,
AvatarIcon: IconRobot,
isIconInverted: true,
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue.ts b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue.ts
index bd3821ddd4b..a7f7e184d2c 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue.ts
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue.ts
@@ -8,6 +8,7 @@ import { type RecordFilter } from '@/object-record/record-filter/types/RecordFil
import { useAtomComponentSelectorCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorCallbackState';
import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useStore } from 'jotai';
export const useApplyObjectFilterDropdownFilterValue = () => {
@@ -44,9 +45,9 @@ export const useApplyObjectFilterDropdownFilterValue = () => {
if (objectFilterDropdownFilterNotYetCreated) {
if (!isDefined(currentFieldMetadataItemUsedInDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Field metadata item is not defined in object filter dropdown when setting a filter value to create it, this should not happen.`,
+ doNotTranslate(
+ `Field metadata item is not defined in object filter dropdown when setting a filter value to create it, this should not happen.`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownOperand.ts b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownOperand.ts
index b600c43dff6..4ea503028b6 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownOperand.ts
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownOperand.ts
@@ -20,6 +20,7 @@ import {
isDefined,
relativeDateFilterStringifiedSchema,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useApplyObjectFilterDropdownOperand = () => {
const { userTimezone } = useUserTimezone();
@@ -69,9 +70,9 @@ export const useApplyObjectFilterDropdownOperand = () => {
} else if (isValuelessOperand) {
if (!isDefined(fieldMetadataItemUsedInDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'FieldMetadataItemUsedInDropdown is not defined, cannot create empty record filter, this should not happen',
+ doNotTranslate(
+ 'FieldMetadataItemUsedInDropdown is not defined, cannot create empty record filter, this should not happen',
+ ),
);
}
@@ -170,9 +171,7 @@ const convertDateTimeFilterValue = (
if (targetOperand === RecordFilterOperand.IS) {
try {
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const existingZoned = currentValue.includes('T')
+ const existingZoned = currentValue.includes(doNotTranslate('T'))
? Temporal.Instant.from(currentValue).toZonedDateTimeISO(userTimezone)
: Temporal.PlainDate.from(currentValue).toZonedDateTime(userTimezone);
diff --git a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/utils/getRelativeDateFilterTimeZoneAbbreviation.ts b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/utils/getRelativeDateFilterTimeZoneAbbreviation.ts
index 4b9af459a4a..edf3bd3bf98 100644
--- a/packages/twenty-front/src/modules/object-record/object-filter-dropdown/utils/getRelativeDateFilterTimeZoneAbbreviation.ts
+++ b/packages/twenty-front/src/modules/object-record/object-filter-dropdown/utils/getRelativeDateFilterTimeZoneAbbreviation.ts
@@ -2,14 +2,13 @@ import { getTimezoneAbbreviationForZonedDateTime } from '@/ui/input/components/i
import { Temporal } from 'temporal-polyfill';
import { type RelativeDateFilter } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getRelativeDateFilterTimeZoneAbbreviation = (
relativeDate: RelativeDateFilter,
) => {
const nowZonedDateTime = Temporal.Now.zonedDateTimeISO(
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- relativeDate.timezone ?? 'UTC',
+ relativeDate.timezone ?? doNotTranslate('UTC'),
);
const timeZoneAbbreviation =
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx
index 3384b952d45..acaec896aae 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx
@@ -29,6 +29,7 @@ import { useDestroyViewFromCurrentState } from '@/views/view-picker/hooks/useDes
import { viewPickerReferenceViewIdComponentState } from '@/views/view-picker/states/viewPickerReferenceViewIdComponentState';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
IconCalendar,
IconCalendarWeek,
@@ -116,24 +117,16 @@ export const ObjectOptionsDropdownCustomView = ({
};
const selectableItemIdArray = [
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Layout',
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Visibility',
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Fields',
+ doNotTranslate('Layout'),
+ doNotTranslate('Visibility'),
+ doNotTranslate('Fields'),
...(customViewData?.type === ViewType.CALENDAR
? ['CalendarDateField', 'CalendarView']
: []),
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- ...(customViewData?.type !== ViewType.CALENDAR ? ['Group'] : []),
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Delete view',
+ ...(customViewData?.type !== ViewType.CALENDAR
+ ? [doNotTranslate('Group')]
+ : []),
+ doNotTranslate('Delete view'),
];
const selectedItemId = useAtomComponentStateValue(
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownDefaultView.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownDefaultView.tsx
index bb457feead1..d5d330824e6 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownDefaultView.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownDefaultView.tsx
@@ -23,6 +23,7 @@ import {
useIcons,
} from 'twenty-ui/icon';
import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ObjectOptionsDropdownDefaultView = () => {
const { t } = useLingui();
@@ -38,17 +39,11 @@ export const ObjectOptionsDropdownDefaultView = () => {
const visibleFieldsCount = visibleRecordFields.length;
- const selectableItemIdArray = [
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ const selectableItemIdArray = doNotTranslate([
'Fields',
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
'Copy link to view',
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
'Create custom view',
- ];
+ ]);
const selectedItemId = useAtomComponentStateValue(
selectedItemIdComponentState,
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx
index 8c835eb7f47..886cbe3447c 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx
@@ -27,6 +27,7 @@ import { useGetAvailableFieldsToGroupRecordsBy } from '@/views/view-picker/hooks
import { useLingui } from '@lingui/react/macro';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { SettingsRow } from 'twenty-ui/components/settings';
import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';
import {
@@ -116,17 +117,14 @@ export const ObjectOptionsDropdownLayoutContent = () => {
ViewType.LIST,
...(!isDefaultView ? [ViewType.CALENDAR] : []),
...(isDefaultView ? [] : [ViewType.KANBAN]),
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- ...(currentView?.type === ViewType.KANBAN ? ['Group'] : []),
+ ...(currentView?.type === ViewType.KANBAN ? [doNotTranslate('Group')] : []),
...(currentView?.type === ViewType.CALENDAR
? ['CalendarView', 'CalendarDateField']
: []),
...(currentView?.type !== ViewType.TABLE &&
currentView?.type !== ViewType.LIST
? // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- ['Compact view']
+ [doNotTranslate('Compact view')]
: []),
];
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx
index 7856e436d0d..a50c29dff10 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx
@@ -29,6 +29,7 @@ import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';
import { useGetAvailableFieldsToGroupRecordsBy } from '@/views/view-picker/hooks/useGetAvailableFieldsToGroupRecordsBy';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { SettingsRow } from 'twenty-ui/components/settings';
import {
IconArrowBarToDownDashed,
@@ -120,9 +121,9 @@ export const ObjectOptionsDropdownRecordGroupsContent = () => {
);
const selectableItemIdArray = [
- // Selectable list ids must match their stable item ids.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- ...(currentView?.key !== 'INDEX' ? ['GroupBy', 'Sort'] : []),
+ ...(currentView?.key !== 'INDEX'
+ ? ['GroupBy', doNotTranslate('Sort')]
+ : []),
...(shouldShowGroupLoadLimit ? ['LoadLimit'] : []),
'HideEmptyGroups',
];
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown.ts b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown.ts
index fcef44aa7c7..850e8ed6e24 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown.ts
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown.ts
@@ -2,14 +2,15 @@ import { useDropdownContextStateManagement } from '@/dropdown-context-state-mana
import { ObjectOptionsDropdownContext } from '@/object-record/object-options-dropdown/states/contexts/ObjectOptionsDropdownContext';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useObjectOptionsDropdown = () => {
const context = useContext(ObjectOptionsDropdownContext);
if (!isDefined(context)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('useObjectOptionsDropdown must be used within a context');
+ throw new Error(
+ doNotTranslate('useObjectOptionsDropdown must be used within a context'),
+ );
}
const { closeDropdown } = useDropdownContextStateManagement({
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsForBoard.ts b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsForBoard.ts
index facd1a881e2..dd2230e31ae 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsForBoard.ts
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useObjectOptionsForBoard.ts
@@ -16,6 +16,7 @@ import { useSaveCurrentViewFields } from '@/views/hooks/useSaveCurrentViewFields
import { mapRecordFieldToViewField } from '@/views/utils/mapRecordFieldToViewField';
import { produce } from 'immer';
import { findByProperty, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import { mapArrayToObject } from '~/utils/array/mapArrayToObject';
import { sortByProperty } from '~/utils/array/sortByProperty';
@@ -187,9 +188,9 @@ export const useObjectOptionsForBoard = ({
(draftRecordIndexFieldDefinitions) => {
if (!isDefined(correspondingAvailableColumnDefinition)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `correspondingAvailableColumnDefinition is not defined this should not happen.`,
+ doNotTranslate(
+ `correspondingAvailableColumnDefinition is not defined this should not happen.`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts
index d5511116e00..157f8c310e5 100644
--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts
+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts
@@ -14,6 +14,7 @@ import { useGetAvailableFieldsToGroupRecordsBy } from '@/views/view-picker/hooks
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { assertUnreachable, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { ViewCalendarLayout } from '~/generated-metadata/graphql';
export const useSetViewTypeFromLayoutOptionsMenu = () => {
@@ -44,9 +45,7 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {
const existingViews = store.get(viewsSelector.atom);
if (!isDefined(currentViewId)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('No view id found');
+ throw new Error(doNotTranslate('No view id found'));
}
const currentView = existingViews.find(
@@ -54,9 +53,7 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {
);
if (!isDefined(currentView)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('No current view found');
+ throw new Error(doNotTranslate('No current view found'));
}
const updateCurrentViewParams: Partial<GraphQLView> = {};
@@ -65,9 +62,9 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {
switch (viewType) {
case ViewType.KANBAN: {
if (availableFieldsForGrouping.length === 0) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('No fields for kanban - should not happen');
+ throw new Error(
+ doNotTranslate('No fields for kanban - should not happen'),
+ );
}
const mainGroupByFieldMetadataId = availableFieldsForGrouping[0].id;
@@ -94,9 +91,7 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {
}
case ViewType.CALENDAR: {
if (availableFieldsForCalendar.length === 0) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('No date fields for calendar');
+ throw new Error(doNotTranslate('No date fields for calendar'));
}
const calendarFieldMetadataId = availableFieldsForCalendar[0].id;
diff --git a/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts b/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts
index e3ea858d8dc..fd30b8bf751 100644
--- a/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts
+++ b/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts
@@ -10,6 +10,7 @@ import { getOrderByForRelationField } from '@/object-metadata/utils/getOrderByFo
import { hasObjectMetadataItemPositionField } from '@/object-metadata/utils/hasObjectMetadataItemPositionField';
import { type RecordSort } from '@/object-record/record-sort/types/RecordSort';
import { getOrderByForFieldMetadataType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
FieldMetadataType,
ViewSortDirection,
@@ -52,9 +53,9 @@ export const turnSortsIntoOrderBy = (
orderByDirection: direction,
});
}
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return [{ [`${correspondingField.name}Id`]: direction }];
+ return [
+ { [doNotTranslate(`${correspondingField.name}Id`)]: direction },
+ ];
}
return getOrderByForFieldMetadataType({
diff --git a/packages/twenty-front/src/modules/object-record/record-board/hooks/useGetRecordBoardEffectsForUpdateInputs.ts b/packages/twenty-front/src/modules/object-record/record-board/hooks/useGetRecordBoardEffectsForUpdateInputs.ts
index a52086f1f7e..099476fb874 100644
--- a/packages/twenty-front/src/modules/object-record/record-board/hooks/useGetRecordBoardEffectsForUpdateInputs.ts
+++ b/packages/twenty-front/src/modules/object-record/record-board/hooks/useGetRecordBoardEffectsForUpdateInputs.ts
@@ -8,6 +8,7 @@ import { type ObjectRecordOperationUpdateInput } from '@/object-record/types/Obj
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined, mapById } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useGetRecordBoardEffectsForUpdateInputs = () => {
const { objectMetadataItem } = useRecordIndexContextOrThrow();
@@ -50,9 +51,7 @@ export const useGetRecordBoardEffectsForUpdateInputs = () => {
fieldNamesForUpdateInput.includes(fieldMetadataItemToFilter.name) ||
(fieldMetadataItemToFilter.type === FieldMetadataType.RELATION &&
fieldNamesForUpdateInput.includes(
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `${fieldMetadataItemToFilter.name}Id`,
+ doNotTranslate(`${fieldMetadataItemToFilter.name}Id`),
)),
);
diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationLabel.ts b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationLabel.ts
index bb33d23e41c..ad939293a70 100644
--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationLabel.ts
+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationLabel.ts
@@ -3,6 +3,7 @@ import { DateAggregateOperations } from '@/object-record/record-table/constants/
import { type ExtendedAggregateOperations } from '@/object-record/record-table/types/ExtendedAggregateOperations';
import { t } from '@lingui/core/macro';
import { CustomError } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getAggregateOperationLabel = (
operation: ExtendedAggregateOperations,
@@ -38,9 +39,7 @@ export const getAggregateOperationLabel = (
return t`Count false`;
default:
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Unknown aggregate operation: ${operation}`,
+ doNotTranslate(`Unknown aggregate operation: ${operation}`),
'UNKNOWN_AGGREGATE_OPERATION',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationShortLabel.ts b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationShortLabel.ts
index ed9522ba1ec..6ab1f7d7cc5 100644
--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationShortLabel.ts
+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-column/utils/getAggregateOperationShortLabel.ts
@@ -3,6 +3,7 @@ import { DateAggregateOperations } from '@/object-record/record-table/constants/
import { type ExtendedAggregateOperations } from '@/object-record/record-table/types/ExtendedAggregateOperations';
import { msg } from '@lingui/core/macro';
import { CustomError } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getAggregateOperationShortLabel = (
operation: ExtendedAggregateOperations,
@@ -36,9 +37,7 @@ export const getAggregateOperationShortLabel = (
return msg`False`;
default:
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Unknown aggregate operation: ${operation}`,
+ doNotTranslate(`Unknown aggregate operation: ${operation}`),
'UNKNOWN_AGGREGATE_OPERATION',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx
index 7271b5bcce1..7b6fd258ed6 100644
--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx
@@ -29,6 +29,7 @@ import {
isDefined,
turnPlainDateToShiftedDateInSystemTimeZone,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';
import { themeCssVariables } from 'twenty-ui/theme';
@@ -147,9 +148,7 @@ export const RecordCalendarTopBar = () => {
turnPlainDateToShiftedDateInSystemTimeZone(
recordCalendarSelectedDate,
),
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'MMMM yyyy',
+ doNotTranslate('MMMM yyyy'),
{ locale: dateLocale.localeCatalog },
);
diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarDaysRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarDaysRange.ts
index 42201071dc8..034c9a911c8 100644
--- a/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarDaysRange.ts
+++ b/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarDaysRange.ts
@@ -6,6 +6,7 @@ import { format } from 'date-fns';
import { type Temporal } from 'temporal-polyfill';
import { CalendarStartDay } from 'twenty-shared/constants';
import { turnPlainDateToShiftedDateInSystemTimeZone } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type ViewCalendarLayout } from '~/generated-metadata/graphql';
import { dateLocaleState } from '@/localization/states/dateLocaleState';
@@ -30,11 +31,13 @@ export const useRecordCalendarDaysRange = (
return {
...range,
weekDayLabels: range.days[0].map((day) =>
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- format(turnPlainDateToShiftedDateInSystemTimeZone(day), 'EEE', {
- locale: dateLocale.localeCatalog,
- }),
+ format(
+ turnPlainDateToShiftedDateInSystemTimeZone(day),
+ doNotTranslate('EEE'),
+ {
+ locale: dateLocale.localeCatalog,
+ },
+ ),
),
};
};
diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/formatRecordCalendarWeekRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/formatRecordCalendarWeekRange.ts
index d624639548f..a494a673e54 100644
--- a/packages/twenty-front/src/modules/object-record/record-calendar/utils/formatRecordCalendarWeekRange.ts
+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/formatRecordCalendarWeekRange.ts
@@ -1,6 +1,7 @@
import { format, type Locale } from 'date-fns';
import { type Temporal } from 'temporal-polyfill';
import { turnPlainDateToShiftedDateInSystemTimeZone } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type FormatRecordCalendarWeekRangeArgs = {
firstDayOfWeek: Temporal.PlainDate;
@@ -18,13 +19,9 @@ export const formatRecordCalendarWeekRange = ({
const formatOptions = { locale };
if (firstDayOfWeek.year !== lastDayOfWeek.year) {
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${format(firstDay, 'MMM d, yyyy', formatOptions)} – ${format(
+ return `${format(firstDay, doNotTranslate('MMM d, yyyy'), formatOptions)} – ${format(
lastDay,
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'MMM d, yyyy',
+ doNotTranslate('MMM d, yyyy'),
formatOptions,
)}`;
}
@@ -32,18 +29,14 @@ export const formatRecordCalendarWeekRange = ({
if (firstDayOfWeek.month !== lastDayOfWeek.month) {
return `${format(firstDay, 'MMM d', formatOptions)} – ${format(
lastDay,
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'MMM d, yyyy',
+ doNotTranslate('MMM d, yyyy'),
formatOptions,
)}`;
}
return `${format(firstDay, 'MMM d', formatOptions)} – ${format(
lastDay,
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'd, yyyy',
+ doNotTranslate('d, yyyy'),
formatOptions,
)}`;
};
diff --git a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessBoardCardDrop.ts b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessBoardCardDrop.ts
index 169cf5fe1c9..87c3372087c 100644
--- a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessBoardCardDrop.ts
+++ b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessBoardCardDrop.ts
@@ -1,6 +1,7 @@
import { useStore } from 'jotai';
import { useCallback, useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useDebouncedCallback } from 'use-debounce';
import { RecordBoardContext } from '@/object-record/record-board/contexts/RecordBoardContext';
@@ -76,9 +77,7 @@ export const useProcessBoardCardDrop = () => {
);
if (!isDefined(destinationRecordGroup)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Record group is not defined');
+ throw new Error(doNotTranslate('Record group is not defined'));
}
store.set(isRecordBoardDropProcessingCallbackState, true);
diff --git a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts
index 5ee89ccde31..9c6769a782d 100644
--- a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts
+++ b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts
@@ -20,6 +20,7 @@ import { recordIndexCalendarFieldMetadataIdComponentState } from '@/object-recor
import { Temporal } from 'temporal-polyfill';
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useProcessCalendarCardDrop = () => {
const store = useStore();
@@ -110,9 +111,9 @@ export const useProcessCalendarCardDrop = () => {
if (!isDefined(targetRecord)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `targetRecord cannot be found in passed recordsWithPosition, this should not happen.`,
+ doNotTranslate(
+ `targetRecord cannot be found in passed recordsWithPosition, this should not happen.`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessRecordGroupDrop.ts b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessRecordGroupDrop.ts
index e12dc6ade97..d621d28e58f 100644
--- a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessRecordGroupDrop.ts
+++ b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessRecordGroupDrop.ts
@@ -1,6 +1,7 @@
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { getFieldMetadataItemGqlFieldName } from '@/object-metadata/utils/getFieldMetadataItemGqlFieldName';
import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';
@@ -57,9 +58,7 @@ export const useProcessRecordGroupDrop = () => {
!isDefined(destinationRecordGroup) ||
!isDefined(recordIndexGroupFieldMetadataItem)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Record group is not defined');
+ throw new Error(doNotTranslate('Record group is not defined'));
}
const updatedRecords = computeDroppedRecordPositions({
diff --git a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useUpdateDroppedRecordOnBoard.ts b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useUpdateDroppedRecordOnBoard.ts
index 824b8bc3784..3ca9fa73636 100644
--- a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useUpdateDroppedRecordOnBoard.ts
+++ b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useUpdateDroppedRecordOnBoard.ts
@@ -13,6 +13,7 @@ import { useAtomComponentFamilyStateCallbackState } from '@/ui/utilities/state/j
import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';
import { useCallback, useContext } from 'react';
import { findByProperty, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { sortByProperty } from '~/utils/array/sortByProperty';
export const useUpdateDroppedRecordOnBoard = () => {
@@ -111,9 +112,9 @@ export const useUpdateDroppedRecordOnBoard = () => {
if (indexOfDroppedRecordInInitialRecordGroup === -1) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Cannot find record id in initial record group ids on drop, this should not happen, recordId: ${recordId}, initialRecordGroupId: ${initialRecordGroupId}`,
+ doNotTranslate(
+ `Cannot find record id in initial record group ids on drop, this should not happen, recordId: ${recordId}, initialRecordGroupId: ${initialRecordGroupId}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-drag/utils/computeDroppedRecordPositions.ts b/packages/twenty-front/src/modules/object-record/record-drag/utils/computeDroppedRecordPositions.ts
index 18f9a0e27cd..6851d8018b5 100644
--- a/packages/twenty-front/src/modules/object-record/record-drag/utils/computeDroppedRecordPositions.ts
+++ b/packages/twenty-front/src/modules/object-record/record-drag/utils/computeDroppedRecordPositions.ts
@@ -1,5 +1,6 @@
import type { Store } from 'jotai/vanilla/store';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { extractRecordPositions } from '@/object-record/record-drag/utils/extractRecordPositions';
import {
@@ -37,9 +38,11 @@ export const computeDroppedRecordPositions = ({
: destinationRecordIds.at(destinationIndex);
if (!isDefined(targetRecordId)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Target record id cannot be found, this should not happen');
+ throw new Error(
+ doNotTranslate(
+ 'Target record id cannot be found, this should not happen',
+ ),
+ );
}
const recordsWithPosition = extractRecordPositions(
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx
index 7b8cf95abe9..6aaacc39ba3 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailMorphRelationSectionDropdownOneToMany.tsx
@@ -23,6 +23,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { FieldMetadataType } from 'twenty-shared/types';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type RecordDetailMorphRelationSectionDropdownOneToManyProps = {
dropdownTriggerClickableComponent: ReactNode;
@@ -136,9 +137,7 @@ export const RecordDetailMorphRelationSectionDropdownOneToMany = ({
record.objectNameSingular,
)?.targetObjectMetadata.id;
if (!objectMetadataId) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ObjectMetadataId is required');
+ throw new Error(doNotTranslate('ObjectMetadataId is required'));
}
return {
recordId: record.value.id,
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx
index 8f198caf38c..fa1952b9ea5 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationRecordsListItem.tsx
@@ -33,6 +33,7 @@ import {
CustomError,
computeMorphRelationGqlFieldName,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { LightIconButton } from 'twenty-ui/components/input';
import { Dropdown } from 'twenty-ui/components/navigation';
import {
@@ -96,9 +97,7 @@ export const RecordDetailRelationRecordsListItem = ({
if (!objectMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Object metadata item not found',
+ doNotTranslate('Object metadata item not found'),
'OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx
index 934d1bb9c85..2b14537ebba 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToMany.tsx
@@ -29,6 +29,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';
import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type RecordDetailRelationSectionDropdownToManyProps = {
dropdownTriggerClickableComponent: ReactNode;
@@ -54,9 +55,7 @@ export const RecordDetailRelationSectionDropdownToMany = ({
if (!isDefined(fieldMetadataItem) || !isDefined(objectMetadataItem)) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item or object metadata item not found',
+ doNotTranslate('Field metadata item or object metadata item not found'),
'FIELD_METADATA_ITEM_OR_OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
@@ -85,9 +84,7 @@ export const RecordDetailRelationSectionDropdownToMany = ({
);
if (!relationFieldMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Relation field metadata item not found',
+ doNotTranslate('Relation field metadata item not found'),
'RELATION_FIELD_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx
index 050f56d98d6..79a0540f941 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/RecordDetailRelationSectionDropdownToOne.tsx
@@ -26,6 +26,7 @@ import { getFieldMetadataItemById } from '@/object-metadata/utils/getFieldMetada
import { assertFieldMetadata } from '@/object-record/record-field/ui/types/guards/assertFieldMetadata';
import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/isFieldRelation';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconForbid } from 'twenty-ui/icon';
type RecordDetailRelationSectionDropdownToOneProps = {
@@ -57,9 +58,7 @@ export const RecordDetailRelationSectionDropdownToOne = ({
if (!isDefined(fieldMetadataItem) || !isDefined(objectMetadataItem)) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item or object metadata item not found',
+ doNotTranslate('Field metadata item or object metadata item not found'),
'FIELD_METADATA_ITEM_OR_OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
@@ -75,9 +74,7 @@ export const RecordDetailRelationSectionDropdownToOne = ({
if (!relationFieldMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Relation field metadata item not found',
+ doNotTranslate('Relation field metadata item not found'),
'RELATION_FIELD_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/hooks/useGetMorphRelationRelatedRecordsWithObjectNameSingular.ts b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/hooks/useGetMorphRelationRelatedRecordsWithObjectNameSingular.ts
index 34d79efab5f..f99d1a5541b 100644
--- a/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/hooks/useGetMorphRelationRelatedRecordsWithObjectNameSingular.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field-list/record-detail-section/relation/components/hooks/useGetMorphRelationRelatedRecordsWithObjectNameSingular.ts
@@ -2,6 +2,7 @@ import { type FieldMetadataItemRelation } from '@/object-metadata/types/FieldMet
import { recordStoreMorphOneToManyValueWithObjectNameFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreMorphOneToManyValueWithObjectNameFamilySelector';
import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';
import { CustomError, isDefined, isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useGetMorphRelationRelatedRecordsWithObjectNameSingular = ({
recordId,
@@ -17,9 +18,9 @@ export const useGetMorphRelationRelatedRecordsWithObjectNameSingular = ({
if (morphRelations.length < 1) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Cannot load relation records: no morph relations were provided to this component.',
+ doNotTranslate(
+ 'Cannot load relation records: no morph relations were provided to this component.',
+ ),
'MORPH_RELATIONS_REQUIRED',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/hooks/useUpdateRecordField.ts b/packages/twenty-front/src/modules/object-record/record-field/hooks/useUpdateRecordField.ts
index 58f9f85d6bd..98b51317140 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/hooks/useUpdateRecordField.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/hooks/useUpdateRecordField.ts
@@ -3,6 +3,7 @@ import { type RecordField } from '@/object-record/record-field/types/RecordField
import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useStore } from 'jotai';
export const useUpdateRecordField = (
@@ -30,9 +31,9 @@ export const useUpdateRecordField = (
if (!isDefined(foundRecordFieldInCurrentRecordFields)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Cannot find record field to update with field metadata item id : ${fieldMetadataItemId}`,
+ doNotTranslate(
+ `Cannot find record field to update with field metadata item id : ${fieldMetadataItemId}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx
index 7c875573702..4a145a30b91 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx
@@ -26,6 +26,7 @@ import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';
import { type FocusEvent, type KeyboardEvent, useId, useState } from 'react';
import { Key } from 'ts-key-enum';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconPlus } from 'twenty-ui/icon';
import { Dropdown } from 'twenty-ui/components/navigation';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
@@ -214,9 +215,9 @@ export const FormArrayFieldInput = ({
const handleDeleteItem = (index: number) => {
if (draftValue.type !== 'static') {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Cannot delete item when value is a variable.');
+ throw new Error(
+ doNotTranslate('Cannot delete item when value is a variable.'),
+ );
}
const updatedItems = toSpliced(draftValue.value, index, 1);
@@ -280,9 +281,9 @@ export const FormArrayFieldInput = ({
const handleNewItemInputSubmit = () => {
if (draftValue.type !== 'static') {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Cannot submit input when value is a variable.');
+ throw new Error(
+ doNotTranslate('Cannot submit input when value is a variable.'),
+ );
}
const sanitizedInput = inputValue.trim();
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx
index d8cff117034..550421abe8a 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx
@@ -27,6 +27,7 @@ import { useId, useRef, useState } from 'react';
import { Temporal } from 'temporal-polyfill';
import { Key } from 'ts-key-enum';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
import { type Nullable } from 'twenty-shared/types';
@@ -125,9 +126,7 @@ export const FormDateFieldInput = ({
useListenClickOutside({
refs: [datePickerWrapperRef],
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- listenerId: `FormDateFieldInputBase-${instanceId}`,
+ listenerId: doNotTranslate(`FormDateFieldInputBase-${instanceId}`),
callback: (event) => {
if (isDatePickerDropdownOpen(instanceId)) {
return;
@@ -240,8 +239,7 @@ export const FormDateFieldInput = ({
defaultValue === 'null'
? null
: // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- defaultValue.includes('T')
+ defaultValue.includes(doNotTranslate('T'))
? Temporal.Instant.from(defaultValue)
.toZonedDateTimeISO(userTimezone)
.toPlainDate()
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx
index 77e24755f2e..5a1622b0fdc 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx
@@ -28,6 +28,7 @@ import { useId, useRef, useState } from 'react';
import { Temporal } from 'temporal-polyfill';
import { Key } from 'ts-key-enum';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type Nullable } from 'twenty-shared/types';
const FORM_DATE_TIME_FIELD_PICKER_CLICK_OUTSIDE_ID =
@@ -122,9 +123,7 @@ export const FormDateTimeFieldInput = ({
useListenClickOutside({
refs: [datePickerWrapperRef],
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- listenerId: `FormDateTimeFieldInputBase-${instanceId}`,
+ listenerId: doNotTranslate(`FormDateTimeFieldInputBase-${instanceId}`),
callback: (event) => {
if (isDatePickerDropdownOpen(instanceId)) {
return;
@@ -247,8 +246,7 @@ export const FormDateTimeFieldInput = ({
defaultValue === ''
? null
: // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- defaultValue.includes('T')
+ defaultValue.includes(doNotTranslate('T'))
? Temporal.Instant.from(defaultValue).toZonedDateTimeISO(
timeZone ?? userTimezone,
)
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx
index 277ea4b2f7e..1221288c0c9 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx
@@ -8,6 +8,7 @@ import { Field } from 'twenty-ui/primitives/input';
import { t } from '@lingui/core/macro';
import { useId } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
type FormFilesFieldInputProps = {
@@ -61,9 +62,9 @@ export const FormFilesFieldInput = ({
const handleVariableTagInsert = (variableName: string) => {
if (!isDefined(editor)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Expected the editor to be defined when a variable is selected',
+ doNotTranslate(
+ 'Expected the editor to be defined when a variable is selected',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx
index f164a5a0ff4..efde180e956 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx
@@ -16,6 +16,7 @@ import { isStandaloneVariableString } from 'twenty-shared/workflow';
import { isArray, isNonEmptyString } from '@sniptt/guards';
import { useId, useState } from 'react';
import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { Dropdown } from 'twenty-ui/components/navigation';
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
import { DropdownRoot } from '@/ui/layout/dropdown/components/DropdownRoot';
@@ -115,9 +116,9 @@ export const FormMultiSelectFieldInput = ({
const onOptionSelected = (value: FieldMultiSelectValue) => {
if (draftValue.type !== 'static') {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Can only be called when editing a static value');
+ throw new Error(
+ doNotTranslate('Can only be called when editing a static value'),
+ );
}
setDraftValue({
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx
index 50bf75ad785..9c54756e9ed 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx
@@ -9,6 +9,7 @@ import { parseMultiItemEditorContent } from '@/workflow/workflow-variables/utils
import { t } from '@lingui/core/macro';
import { useId } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type FormMultiTextFieldInputProps = {
label?: string;
@@ -44,9 +45,9 @@ export const FormMultiTextFieldInput = ({
const handleVariableTagInsert = (variableName: string) => {
if (!isDefined(editor)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Expected the editor to be defined when a variable is selected',
+ doNotTranslate(
+ 'Expected the editor to be defined when a variable is selected',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx
index 3e40ce2c5ac..5c2260ea1c1 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx
@@ -9,6 +9,7 @@ import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerCom
import { Field } from 'twenty-ui/primitives/input';
import { useId } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
type FormRawJsonFieldInputProps = {
@@ -63,9 +64,9 @@ export const FormRawJsonFieldInput = ({
const handleVariableTagInsert = (variableName: string) => {
if (!isDefined(editor)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Expected the editor to be defined when a variable is selected',
+ doNotTranslate(
+ 'Expected the editor to be defined when a variable is selected',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx
index 647e88338bf..9c812ebdada 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelativeDatePicker.tsx
@@ -13,6 +13,7 @@ import {
type RelativeDateFilter,
resolveRelativeDateFilterStringified,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledContainer = styled.div`
display: flex;
@@ -64,9 +65,7 @@ export const FormRelativeDatePicker = ({
instanceId={instanceId}
onChange={handleValueChange}
direction={valueParsed?.direction ?? 'THIS'}
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- unit={valueParsed?.unit ?? 'DAY'}
+ unit={valueParsed?.unit ?? doNotTranslate('DAY')}
amount={valueParsed?.amount ?? undefined}
isFormField={true}
readonly={readonly}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx
index 211ff866a8f..a20b8890c2e 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx
@@ -13,6 +13,7 @@ import { isNonEmptyString } from '@sniptt/guards';
import { useId, useState } from 'react';
import { Key } from 'ts-key-enum';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { isStandaloneVariableString } from 'twenty-shared/workflow';
import { IconCircleOff } from 'twenty-ui/icon';
import { Field, type SelectOption } from 'twenty-ui/primitives/input';
@@ -86,9 +87,9 @@ export const FormSelectFieldInput = ({
const onCancel = () => {
if (draftValue.type !== 'static') {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Can only be called when editing a static value');
+ throw new Error(
+ doNotTranslate('Can only be called when editing a static value'),
+ );
}
setDraftValue({
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx
index beccf37776e..b5b5f1517b7 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx
@@ -23,6 +23,7 @@ import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { useCallback, useId } from 'react';
import { CustomError, isDefined, isValidUuid } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconChevronDown, IconForbid } from 'twenty-ui/icon';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
@@ -122,9 +123,9 @@ export const FormSingleRecordPicker = ({
if (objectNameSingulars.length === 0) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Object is missing while building form single record picker',
+ doNotTranslate(
+ 'Object is missing while building form single record picker',
+ ),
'FORM_SINGLE_RECORD_PICKER_OBJECT_NAME_SINGULAR_IS_MISSING',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx
index 921b7b82d77..a74294848bc 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx
@@ -9,6 +9,7 @@ import { Field } from 'twenty-ui/primitives/input';
import { parseEditorContent } from '@/workflow/workflow-variables/utils/parseEditorContent';
import { useId } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type FormTextFieldInputProps = {
label?: string;
@@ -55,9 +56,9 @@ export const FormTextFieldInput = ({
const handleVariableTagInsert = (variableName: string) => {
if (!isDefined(editor)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Expected the editor to be defined when a variable is selected',
+ doNotTranslate(
+ 'Expected the editor to be defined when a variable is selected',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useClearField.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useClearField.ts
index be2e5aa0740..38e3af8b9a5 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useClearField.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useClearField.ts
@@ -8,6 +8,7 @@ import { generateEmptyFieldValue } from '@/object-record/utils/generateEmptyFiel
import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
import { getForeignKeyNameFromRelationFieldName } from '@/object-record/utils/getForeignKeyNameFromRelationFieldName';
import { FieldMetadataType, RelationType } from 'twenty-shared/types';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useClearField = () => {
const store = useStore();
@@ -33,9 +34,7 @@ export const useClearField = () => {
);
if (!foundObjectMetadataItem || !foundFieldMetadataItem) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Field metadata item cannot be found');
+ throw new Error(doNotTranslate('Field metadata item cannot be found'));
}
const isRelation =
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useObjectMorphJunctionConfigOrThrow.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useObjectMorphJunctionConfigOrThrow.ts
index feeaa43b704..319108b0b93 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useObjectMorphJunctionConfigOrThrow.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useObjectMorphJunctionConfigOrThrow.ts
@@ -1,5 +1,6 @@
import { useObjectMorphJunctionConfig } from '@/object-record/record-field/ui/hooks/useObjectMorphJunctionConfig';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useObjectMorphJunctionConfigOrThrow = ({
objectNameSingular,
@@ -10,9 +11,9 @@ export const useObjectMorphJunctionConfigOrThrow = ({
if (!isDefined(junctionConfig)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Cannot resolve morph junction metadata for ${objectNameSingular}`,
+ doNotTranslate(
+ `Cannot resolve morph junction metadata for ${objectNameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useOpenFieldInputEditMode.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useOpenFieldInputEditMode.ts
index 10afd768742..eb7ad030089 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useOpenFieldInputEditMode.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useOpenFieldInputEditMode.ts
@@ -23,6 +23,7 @@ import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentTyp
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useOpenFieldInputEditMode = () => {
const store = useStore();
@@ -133,9 +134,9 @@ export const useOpenFieldInputEditMode = () => {
if (isFieldMorphRelationOneToMany(fieldDefinition)) {
if (!isFieldMorphRelation(fieldDefinition)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Field is not a morph relation one to many');
+ throw new Error(
+ doNotTranslate('Field is not a morph relation one to many'),
+ );
}
openMorphRelationOneToManyFieldInput({
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/usePersistField.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/usePersistField.ts
index 03d553d5b59..15816ca4c1d 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/usePersistField.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/usePersistField.ts
@@ -56,6 +56,7 @@ import { isFieldTextValue } from '@/object-record/record-field/ui/types/guards/i
import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useUpsertRecordsInStore';
import { getForeignKeyNameFromRelationFieldName } from '@/object-record/utils/getForeignKeyNameFromRelationFieldName';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
export const usePersistField = ({
@@ -283,13 +284,13 @@ export const usePersistField = ({
);
} else {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Invalid value to persist: ${JSON.stringify(
- valueToPersist,
- )} for type : ${
- fieldDefinition.type
- }, type may not be implemented in usePersistField.`,
+ doNotTranslate(
+ `Invalid value to persist: ${JSON.stringify(
+ valueToPersist,
+ )} for type : ${
+ fieldDefinition.type
+ }, type may not be implemented in usePersistField.`,
+ ),
);
}
},
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useToggleEditOnlyInput.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useToggleEditOnlyInput.ts
index 0fe6d2d95d4..595abe4ff64 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useToggleEditOnlyInput.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/hooks/useToggleEditOnlyInput.ts
@@ -4,6 +4,7 @@ import { useStore } from 'jotai';
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
import { isFieldBoolean } from '@/object-record/record-field/ui/types/guards/isFieldBoolean';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useToggleEditOnlyInput = () => {
const store = useStore();
@@ -39,9 +40,9 @@ export const useToggleEditOnlyInput = () => {
});
} else {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Invalid value to toggle for type : ${fieldDefinition}, type may not be implemented in useToggleEditOnlyInput.`,
+ doNotTranslate(
+ `Invalid value to toggle for type : ${fieldDefinition}, type may not be implemented in useToggleEditOnlyInput.`,
+ ),
);
}
}, [recordId, fieldDefinition, store, updateRecord]);
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useChipFieldDisplay.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useChipFieldDisplay.ts
index de801e637eb..54c66ded519 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useChipFieldDisplay.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useChipFieldDisplay.ts
@@ -11,6 +11,7 @@ import { useRecordIndexContextOrThrow } from '@/object-record/record-index/conte
import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
export const useChipFieldDisplay = () => {
@@ -37,9 +38,9 @@ export const useChipFieldDisplay = () => {
);
if (!isDefined(chipGeneratorPerObjectPerField)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Chip generator per object per field is not defined');
+ throw new Error(
+ doNotTranslate('Chip generator per object per field is not defined'),
+ );
}
const objectNameSingular =
@@ -54,9 +55,9 @@ export const useChipFieldDisplay = () => {
const recordStore = useAtomFamilyStateValue(recordStoreFamilyState, recordId);
if (!isNonEmptyString(objectNameSingular)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata name singular is not a non-empty string');
+ throw new Error(
+ doNotTranslate('Object metadata name singular is not a non-empty string'),
+ );
}
return {
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationFromManyFieldDisplay.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationFromManyFieldDisplay.ts
index 4ee484eedc2..7b9158fa47c 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationFromManyFieldDisplay.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationFromManyFieldDisplay.ts
@@ -10,6 +10,7 @@ import { isFieldMorphRelation } from '@/object-record/record-field/ui/types/guar
import { useRecordFieldValue } from '@/object-record/record-store/hooks/useRecordFieldValue';
import { type ObjectRecord } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
import { assertFieldMetadata } from '@/object-record/record-field/ui/types/guards/assertFieldMetadata';
@@ -21,9 +22,9 @@ export const useMorphRelationFromManyFieldDisplay = () => {
);
if (!isDefined(chipGeneratorPerObjectPerField)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Chip generator per object per field is not defined');
+ throw new Error(
+ doNotTranslate('Chip generator per object per field is not defined'),
+ );
}
assertFieldMetadata(
@@ -50,9 +51,9 @@ export const useMorphRelationFromManyFieldDisplay = () => {
!isDefined(fieldDefinition.metadata.objectMetadataNameSingular) ||
!isNonEmptyString(fieldDefinition.metadata.objectMetadataNameSingular)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata name singular is not a non-empty string');
+ throw new Error(
+ doNotTranslate('Object metadata name singular is not a non-empty string'),
+ );
}
return {
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationToOneFieldDisplay.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationToOneFieldDisplay.ts
index fc9584bf2b6..f8b3f6aba92 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationToOneFieldDisplay.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useMorphRelationToOneFieldDisplay.ts
@@ -15,6 +15,7 @@ import { useRecordFieldValue } from '@/object-record/record-store/hooks/useRecor
import { type FieldMorphRelationManyToOneValue } from '@/object-record/record-field/ui/types/FieldMetadata';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useMorphRelationToOneFieldDisplay = () => {
const { recordId, fieldDefinition, maxWidth } = useContext(FieldContext);
@@ -23,9 +24,9 @@ export const useMorphRelationToOneFieldDisplay = () => {
);
if (!isDefined(chipGeneratorPerObjectPerField)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Chip generator per object per field is not defined');
+ throw new Error(
+ doNotTranslate('Chip generator per object per field is not defined'),
+ );
}
assertFieldMetadata(
@@ -65,9 +66,9 @@ export const useMorphRelationToOneFieldDisplay = () => {
!isDefined(fieldDefinition.metadata.objectMetadataNameSingular) ||
!isNonEmptyString(fieldDefinition.metadata.objectMetadataNameSingular)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata name singular is not a non-empty string');
+ throw new Error(
+ doNotTranslate('Object metadata name singular is not a non-empty string'),
+ );
}
return {
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationFromManyFieldDisplay.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationFromManyFieldDisplay.ts
index a71631d3317..c90c9a74907 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationFromManyFieldDisplay.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationFromManyFieldDisplay.ts
@@ -10,6 +10,7 @@ import { FieldMetadataType } from '~/generated-metadata/graphql';
import { useRecordFieldValue } from '@/object-record/record-store/hooks/useRecordFieldValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
import { assertFieldMetadata } from '@/object-record/record-field/ui/types/guards/assertFieldMetadata';
import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/isFieldRelation';
@@ -22,9 +23,9 @@ export const useRelationFromManyFieldDisplay = () => {
);
if (!isDefined(chipGeneratorPerObjectPerField)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Chip generator per object per field is not defined');
+ throw new Error(
+ doNotTranslate('Chip generator per object per field is not defined'),
+ );
}
assertFieldMetadata(
@@ -52,9 +53,9 @@ export const useRelationFromManyFieldDisplay = () => {
!isDefined(fieldDefinition.metadata.objectMetadataNameSingular) ||
!isNonEmptyString(fieldDefinition.metadata.objectMetadataNameSingular)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata name singular is not a non-empty string');
+ throw new Error(
+ doNotTranslate('Object metadata name singular is not a non-empty string'),
+ );
}
const fieldChipGenerator =
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationToOneFieldDisplay.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationToOneFieldDisplay.ts
index 6b150b1e52f..072b04b7878 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationToOneFieldDisplay.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/hooks/useRelationToOneFieldDisplay.ts
@@ -16,6 +16,7 @@ import {
computeRelationGqlFieldJoinColumnName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRelationToOneFieldDisplay = () => {
const { recordId, fieldDefinition, maxWidth } = useContext(FieldContext);
@@ -25,9 +26,9 @@ export const useRelationToOneFieldDisplay = () => {
);
if (!isDefined(chipGeneratorPerObjectPerField)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Chip generator per object per field is not defined');
+ throw new Error(
+ doNotTranslate('Chip generator per object per field is not defined'),
+ );
}
assertFieldMetadata(
@@ -65,9 +66,7 @@ export const useRelationToOneFieldDisplay = () => {
!isDefined(fieldDefinition.metadata.objectMetadataNameSingular) ||
!isNonEmptyString(fieldDefinition.metadata.objectMetadataNameSingular)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata name singular is empty');
+ throw new Error(doNotTranslate('Object metadata name singular is empty'));
}
const fieldChipGenerator =
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/FilesFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/FilesFieldInput.tsx
index 5c2a9c62b15..ca4284139a7 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/FilesFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/FilesFieldInput.tsx
@@ -18,6 +18,7 @@ import { useLingui } from '@lingui/react/macro';
import { useCallback, useContext, useMemo, useState } from 'react';
import { MULTI_ITEM_FIELD_DEFAULT_MAX_VALUES } from 'twenty-shared/constants';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { FieldMetadataType } from '~/generated-metadata/graphql';
@@ -184,9 +185,7 @@ export const FilesFieldInput = () => {
label: _input.trim(),
};
}
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Cannot create file from text input');
+ throw new Error(doNotTranslate('Cannot create file from text input'));
},
[files],
);
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MorphRelationManyToOneFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MorphRelationManyToOneFieldInput.tsx
index f52f7ec8f03..9f3c5a7c721 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MorphRelationManyToOneFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MorphRelationManyToOneFieldInput.tsx
@@ -15,6 +15,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconForbid } from 'twenty-ui/icon';
export const MorphRelationManyToOneFieldInput = () => {
@@ -51,9 +52,7 @@ export const MorphRelationManyToOneFieldInput = () => {
);
if (!isDefined(targetObjectMetadataItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('TargetObjectMetadataItem is required');
+ throw new Error(doNotTranslate('TargetObjectMetadataItem is required'));
}
await persistMorphManyToOne({
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
index 1f2e4a51c17..c5bc0a9de49 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
@@ -20,6 +20,7 @@ import { isNonEmptyString } from '@sniptt/guards';
import React, { useCallback, useMemo, useRef, useState } from 'react';
import { Key } from 'ts-key-enum';
import { CustomError, isDefined, isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { LightIconButton } from 'twenty-ui/components/input';
import { OverflowingTextWithTooltip } from 'twenty-ui/primitives/typography';
import { IconCheck, IconPlus } from 'twenty-ui/icon';
@@ -141,9 +142,7 @@ export const MultiItemFieldInput = <T,>({
return item.label || '';
default:
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Unsupported field type: ${fieldMetadataType}`,
+ doNotTranslate(`Unsupported field type: ${fieldMetadataType}`),
'UNSUPPORTED_FIELD_TYPE',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationManyToOneFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationManyToOneFieldInput.tsx
index 7de8de60206..99151820af7 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationManyToOneFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationManyToOneFieldInput.tsx
@@ -18,6 +18,7 @@ import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSe
import { useLingui } from '@lingui/react/macro';
import { useContext } from 'react';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconForbid } from 'twenty-ui/icon';
export const RelationManyToOneFieldInput = () => {
@@ -31,9 +32,7 @@ export const RelationManyToOneFieldInput = () => {
});
if (!isDefined(fieldMetadataItem) || !isDefined(objectMetadataItem)) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item or object metadata item not found',
+ doNotTranslate('Field metadata item or object metadata item not found'),
'FIELD_METADATA_ITEM_OR_OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
@@ -63,9 +62,7 @@ export const RelationManyToOneFieldInput = () => {
);
if (!relationFieldMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Relation field metadata item not found',
+ doNotTranslate('Relation field metadata item not found'),
'RELATION_FIELD_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationOneToManyFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationOneToManyFieldInput.tsx
index 96023cf6772..964ee90e68a 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationOneToManyFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RelationOneToManyFieldInput.tsx
@@ -17,6 +17,7 @@ import { MultipleRecordPicker } from '@/object-record/record-picker/multiple-rec
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const RelationOneToManyFieldInput = () => {
const { fieldDefinition, recordId } = useContext(FieldContext);
@@ -34,9 +35,7 @@ export const RelationOneToManyFieldInput = () => {
});
if (!isDefined(fieldMetadataItem) || !isDefined(objectMetadataItem)) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item or object metadata item not found',
+ doNotTranslate('Field metadata item or object metadata item not found'),
'FIELD_METADATA_ITEM_OR_OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
@@ -68,9 +67,7 @@ export const RelationOneToManyFieldInput = () => {
);
if (!relationFieldMetadataItem) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Relation field metadata item not found',
+ doNotTranslate('Relation field metadata item not found'),
'RELATION_FIELD_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor.tsx
index a5951ead4f5..ff044578276 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/RichTextFieldEditor.tsx
@@ -30,6 +30,7 @@ import { useCreateBlockNote } from '@blocknote/react';
import '@blocknote/react/style.css';
import { Key } from 'ts-key-enum';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useDebouncedCallback } from 'use-debounce';
type RichTextFieldEditorProps = {
@@ -123,9 +124,9 @@ export const RichTextFieldEditor = ({
return parseInitialBlocknote(
fieldValue?.blocknote,
- // Diagnostic text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Failed to parse body for field ${fieldName} on record ${recordId}`,
+ doNotTranslate(
+ `Failed to parse body for field ${fieldName} on record ${recordId}`,
+ ),
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [fieldName, recordId]);
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useAddNewRecordAndOpenSidePanel.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useAddNewRecordAndOpenSidePanel.ts
index 1ef73c526ae..a0685474d51 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useAddNewRecordAndOpenSidePanel.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useAddNewRecordAndOpenSidePanel.ts
@@ -17,6 +17,7 @@ import {
computeMorphRelationGqlFieldName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
type useAddNewRecordAndOpenSidePanelProps = {
@@ -104,9 +105,7 @@ export const useAddNewRecordAndOpenSidePanel = ({
objectNameSingular: objectMetadataItem.nameSingular,
idToUpdate: recordId,
updateOneRecordInput: {
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- [`${fieldMetadataItem.name}Id`]: newRecordId,
+ [doNotTranslate(`${fieldMetadataItem.name}Id`)]: newRecordId,
},
});
}
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useMorphPersistManyToOne.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useMorphPersistManyToOne.ts
index d305f8d09cb..d811478ad25 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useMorphPersistManyToOne.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useMorphPersistManyToOne.ts
@@ -14,6 +14,7 @@ import { isFieldMorphRelation } from '@/object-record/record-field/ui/types/guar
import { isFieldRelationManyToOneValue } from '@/object-record/record-field/ui/types/guards/isFieldRelationManyToOneValue';
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export type MorphPersistManyToOneProps = {
objectMetadataNameSingular: string;
@@ -61,9 +62,7 @@ export const useMorphPersistManyToOne = ({
isDefined(targetObjectMetadataNameSingular) &&
!isDefined(targetObjectMetadataItem)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object metadata item not found');
+ throw new Error(doNotTranslate('Object metadata item not found'));
}
const currentValue = store.get(
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateMorphRelationOneToManyFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateMorphRelationOneToManyFieldInput.tsx
index 89a4e65167c..9aa3ee29221 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateMorphRelationOneToManyFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateMorphRelationOneToManyFieldInput.tsx
@@ -7,6 +7,7 @@ import { assertFieldMetadata } from '@/object-record/record-field/ui/types/guard
import { isFieldMorphRelation } from '@/object-record/record-field/ui/types/guards/isFieldMorphRelation';
import { type RecordPickerPickableMorphItem } from '@/object-record/record-picker/types/RecordPickerPickableMorphItem';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType } from '~/generated-metadata/graphql';
export const useUpdateMorphRelationOneToManyFieldInput = () => {
@@ -19,9 +20,7 @@ export const useUpdateMorphRelationOneToManyFieldInput = () => {
);
if (!fieldDefinition.metadata.objectMetadataNameSingular) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ObjectMetadataNameSingular is required');
+ throw new Error(doNotTranslate('ObjectMetadataNameSingular is required'));
}
const { recordOneToManyFieldDetachTargetRecord } =
@@ -38,9 +37,9 @@ export const useUpdateMorphRelationOneToManyFieldInput = () => {
>,
) => {
if (!fieldDefinition.metadata.objectMetadataNameSingular) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ObjectMetadataNameSingular is required');
+ throw new Error(
+ doNotTranslate('ObjectMetadataNameSingular is required'),
+ );
}
const targetMorphRelation = fieldDefinition.metadata.morphRelations.find(
@@ -49,9 +48,7 @@ export const useUpdateMorphRelationOneToManyFieldInput = () => {
);
if (!isDefined(targetMorphRelation)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('TargetMorphRelation is required');
+ throw new Error(doNotTranslate('TargetMorphRelation is required'));
}
if (morphItem.isSelected) {
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateRelationOneToManyFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateRelationOneToManyFieldInput.tsx
index 108837f0b5f..975f53c4fc1 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateRelationOneToManyFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/hooks/useUpdateRelationOneToManyFieldInput.tsx
@@ -11,6 +11,7 @@ import {
computeMorphRelationGqlFieldName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType } from '~/generated-metadata/graphql';
export const useUpdateRelationOneToManyFieldInput = () => {
@@ -29,9 +30,7 @@ export const useUpdateRelationOneToManyFieldInput = () => {
});
if (!isDefined(fieldDefinition.metadata.objectMetadataNameSingular)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ObjectMetadataNameSingular is required');
+ throw new Error(doNotTranslate('ObjectMetadataNameSingular is required'));
}
const { objectMetadataItem: sourceObjectMetadataItem } =
@@ -40,15 +39,11 @@ export const useUpdateRelationOneToManyFieldInput = () => {
});
if (!fieldDefinition.metadata.objectMetadataNameSingular) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ObjectMetadataNameSingular is required');
+ throw new Error(doNotTranslate('ObjectMetadataNameSingular is required'));
}
if (!isDefined(targetObjectMetadataItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('TargetObjectMetadataItem is required');
+ throw new Error(doNotTranslate('TargetObjectMetadataItem is required'));
}
const { recordOneToManyFieldDetachTargetRecord } =
@@ -63,15 +58,13 @@ export const useUpdateRelationOneToManyFieldInput = () => {
!fieldDefinition.metadata?.relationObjectMetadataNameSingular ||
!fieldDefinition.metadata?.targetFieldMetadataName
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('RelationObjectMetadataNameSingular is required');
+ throw new Error(
+ doNotTranslate('RelationObjectMetadataNameSingular is required'),
+ );
}
if (!fieldDefinition.metadata?.objectMetadataNameSingular) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('RelationFieldMetadata is required');
+ throw new Error(doNotTranslate('RelationFieldMetadata is required'));
}
const targetFieldMetadata = targetObjectMetadataItem.fields.find(
@@ -80,9 +73,7 @@ export const useUpdateRelationOneToManyFieldInput = () => {
);
if (!isDefined(targetFieldMetadata)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('TargetFieldMetadata is required');
+ throw new Error(doNotTranslate('TargetFieldMetadata is required'));
}
let targetGQLFieldName: string;
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/utils/buildMorphRelationUpdateInput.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/utils/buildMorphRelationUpdateInput.ts
index d7a3ab6731c..83ca2521d4c 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/utils/buildMorphRelationUpdateInput.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/utils/buildMorphRelationUpdateInput.ts
@@ -3,6 +3,7 @@ import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/Enriche
import { buildRecordWithAllMorphObjectIdsToNull } from '@/object-record/record-field/ui/meta-types/input/utils/buildRecordWithAllMorphObjectIdsToNull';
import { type RelationType } from 'twenty-shared/types';
import { computeMorphRelationGqlFieldName } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const buildMorphRelationUpdateInput = ({
morphRelations,
@@ -41,9 +42,9 @@ export const buildMorphRelationUpdateInput = ({
if (!targetObjectMetadataItem) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Target object metadata item not found for id ${targetObjectMetadataId}`,
+ doNotTranslate(
+ `Target object metadata item not found for id ${targetObjectMetadataId}`,
+ ),
);
}
@@ -56,9 +57,7 @@ export const buildMorphRelationUpdateInput = ({
const updateInput: Record<string, string | null> = {
...allMorphForeignKeysNulled,
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- [`${computedFieldName}Id`]: targetRecordId,
+ [doNotTranslate(`${computedFieldName}Id`)]: targetRecordId,
};
return { updateInput, allMorphForeignKeysNulled };
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/types/FieldMetadata.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/types/FieldMetadata.ts
index 3202a5f3c78..282fca31e76 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/types/FieldMetadata.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/types/FieldMetadata.ts
@@ -11,6 +11,7 @@ import {
import { type ThemeColor } from 'twenty-ui/theme';
import { z } from 'zod';
import { type RelationType } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
type BaseFieldMetadata = {
description?: string | null;
@@ -307,9 +308,7 @@ export type FieldRichTextValue = {
};
const FieldActorSourceSchema = z.union([
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- z.literal('API'),
+ z.literal(doNotTranslate('API')),
z.literal('IMPORT'),
z.literal('EMAIL'),
z.literal('CALENDAR'),
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/types/guards/assertFieldMetadata.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/types/guards/assertFieldMetadata.ts
index 34caac4a455..bdad22e76bf 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/types/guards/assertFieldMetadata.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/types/guards/assertFieldMetadata.ts
@@ -29,6 +29,7 @@ import {
type FieldTextMetadata,
type FieldUuidMetadata,
} from '@/object-record/record-field/ui/types/FieldMetadata';
+import { doNotTranslate } from 'twenty-shared/i18n';
type AssertFieldMetadataFunction = <
E extends FieldMetadataType,
@@ -100,9 +101,9 @@ export const assertFieldMetadata: AssertFieldMetadataFunction = (
if (!fieldTypeGuard(fieldDefinition) || fieldDefinitionType !== fieldType) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Trying to use a "${fieldDefinitionType}" field as a "${fieldType}" field. Verify that the field is defined as a type "${fieldDefinitionType}" field in assertFieldMetadata.ts.`,
+ doNotTranslate(
+ `Trying to use a "${fieldDefinitionType}" field as a "${fieldType}" field. Verify that the field is defined as a type "${fieldDefinitionType}" field in assertFieldMetadata.ts.`,
+ ),
);
} else {
return;
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts
index da2a0980c1d..9878d06ff51 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromString.ts
@@ -13,6 +13,7 @@ import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/is
import { isFieldText } from '@/object-record/record-field/ui/types/guards/isFieldText';
import { isFieldUuid } from '@/object-record/record-field/ui/types/guards/isFieldUuid';
import { CustomError } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type computeDraftValueFromStringParams = {
fieldDefinition: Pick<FieldDefinition<FieldMetadata>, 'type'>;
@@ -82,9 +83,9 @@ export const computeDraftValueFromString = <FieldValue>({
}
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Record field type not supported : ${fieldDefinition.type}}`,
+ doNotTranslate(
+ `Record field type not supported : ${fieldDefinition.type}}`,
+ ),
'RECORD_FIELD_TYPE_NOT_SUPPORTED',
);
};
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts
index ab6f3688264..326259b2863 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeEmptyDraftValue.ts
@@ -12,6 +12,7 @@ import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/is
import { isFieldText } from '@/object-record/record-field/ui/types/guards/isFieldText';
import { isFieldUuid } from '@/object-record/record-field/ui/types/guards/isFieldUuid';
import { CustomError } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type computeEmptyDraftValueParams = {
fieldDefinition: Pick<FieldDefinition<FieldMetadata>, 'type'>;
@@ -67,9 +68,9 @@ export const computeEmptyDraftValue = <FieldValue>({
}
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Record field type not supported : ${fieldDefinition.type}}`,
+ doNotTranslate(
+ `Record field type not supported : ${fieldDefinition.type}}`,
+ ),
'RECORD_FIELD_TYPE_NOT_SUPPORTED',
);
};
diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/isFieldValueEmpty.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/isFieldValueEmpty.ts
index dd4158abd58..751228f2ea2 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/isFieldValueEmpty.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/isFieldValueEmpty.ts
@@ -40,6 +40,7 @@ import { isFieldText } from '@/object-record/record-field/ui/types/guards/isFiel
import { isFieldTsVector } from '@/object-record/record-field/ui/types/guards/isFieldTsVectorValue';
import { isFieldUuid } from '@/object-record/record-field/ui/types/guards/isFieldUuid';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const isValueEmpty = (value: unknown) =>
!isDefined(value) || (isString(value) && value === '');
@@ -186,8 +187,8 @@ export const isFieldValueEmpty = ({
}
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Entity field type not supported in isFieldValueEmpty : ${fieldDefinition.type}}`,
+ doNotTranslate(
+ `Entity field type not supported in isFieldValueEmpty : ${fieldDefinition.type}}`,
+ ),
);
};
diff --git a/packages/twenty-front/src/modules/object-record/record-filter/hooks/useCreateRecordFilterFromObjectFilterDropdownCurrentStates.ts b/packages/twenty-front/src/modules/object-record/record-filter/hooks/useCreateRecordFilterFromObjectFilterDropdownCurrentStates.ts
index 556ac8c3327..9978817c423 100644
--- a/packages/twenty-front/src/modules/object-record/record-filter/hooks/useCreateRecordFilterFromObjectFilterDropdownCurrentStates.ts
+++ b/packages/twenty-front/src/modules/object-record/record-filter/hooks/useCreateRecordFilterFromObjectFilterDropdownCurrentStates.ts
@@ -7,6 +7,7 @@ import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/h
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { getFilterTypeFromFieldType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
export const useCreateRecordFilterFromObjectFilterDropdownCurrentStates =
@@ -44,9 +45,9 @@ export const useCreateRecordFilterFromObjectFilterDropdownCurrentStates =
if (!isDefined(fieldMetadataItemUsedInDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Field metadata item used in dropdown is not defined when creating a record filter from object filter dropdown current states, this should not happen.`,
+ doNotTranslate(
+ `Field metadata item used in dropdown is not defined when creating a record filter from object filter dropdown current states, this should not happen.`,
+ ),
);
}
@@ -56,9 +57,9 @@ export const useCreateRecordFilterFromObjectFilterDropdownCurrentStates =
if (!isDefined(selectedOperandInDropdown)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Selected operand in dropdown is not defined when creating a record filter from object filter dropdown current states, this should not happen.`,
+ doNotTranslate(
+ `Selected operand in dropdown is not defined when creating a record filter from object filter dropdown current states, this should not happen.`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-filter/hooks/useGetRecordFilterDisplayValue.ts b/packages/twenty-front/src/modules/object-record/record-filter/hooks/useGetRecordFilterDisplayValue.ts
index 87ece016892..a828386f85b 100644
--- a/packages/twenty-front/src/modules/object-record/record-filter/hooks/useGetRecordFilterDisplayValue.ts
+++ b/packages/twenty-front/src/modules/object-record/record-filter/hooks/useGetRecordFilterDisplayValue.ts
@@ -25,6 +25,7 @@ import {
parseJson,
relativeDateFilterStringifiedSchema,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
// TODO: finish the implementation of this hook to obtain filter display value and remove deprecated display value property
export const useGetRecordFilterDisplayValue = () => {
@@ -109,9 +110,7 @@ export const useGetRecordFilterDisplayValue = () => {
return '';
}
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const zonedDateTime = recordFilter.value.includes('T')
+ const zonedDateTime = recordFilter.value.includes(doNotTranslate('T'))
? Temporal.Instant.from(recordFilter.value).toZonedDateTimeISO(
userTimezone,
)
diff --git a/packages/twenty-front/src/modules/object-record/record-filter/utils/getRecordFilterFieldMetadataItem.ts b/packages/twenty-front/src/modules/object-record/record-filter/utils/getRecordFilterFieldMetadataItem.ts
index 2da4b34652b..5134f6fdb5e 100644
--- a/packages/twenty-front/src/modules/object-record/record-filter/utils/getRecordFilterFieldMetadataItem.ts
+++ b/packages/twenty-front/src/modules/object-record/record-filter/utils/getRecordFilterFieldMetadataItem.ts
@@ -1,6 +1,7 @@
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
import { type RecordFilter } from '@/object-record/record-filter/types/RecordFilter';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getRecordFilterFieldMetadataItem = ({
recordFilter,
@@ -20,9 +21,9 @@ export const getRecordFilterFieldMetadataItem = ({
if (!isDefined(foundFieldMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Field metadata item not found for field metadata id: ${recordFilter.fieldMetadataId}`,
+ doNotTranslate(
+ `Field metadata item not found for field metadata id: ${recordFilter.fieldMetadataId}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts b/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts
index 292fe07aaee..4c35d618139 100644
--- a/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts
+++ b/packages/twenty-front/src/modules/object-record/record-filter/utils/isRecordMatchingFilter.ts
@@ -47,6 +47,7 @@ import {
isMatchingTSVectorFilter,
isMatchingUUIDFilter,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';
@@ -82,9 +83,7 @@ const isMorphRelationJoinColumnKey = ({
morphRelations: fieldMetadataItem.morphRelations,
fieldName: fieldMetadataItem.name,
},
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- }).map((name) => `${name}Id`);
+ }).map((name) => doNotTranslate(`${name}Id`));
return possibleJoinColumnNames.includes(key);
};
@@ -127,9 +126,8 @@ const getJoinColumnValue = ({
return record[joinColumnName];
}
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const relationRecord = record[joinColumnName.slice(0, -'Id'.length)];
+ const relationRecord =
+ record[joinColumnName.slice(0, -doNotTranslate('Id').length)];
return isObject(relationRecord)
? (relationRecord.id ?? null)
@@ -243,9 +241,8 @@ export const isRecordMatchingFilter = ({
if (!Array.isArray(filterValue)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Unexpected value for "and" filter : ' + JSON.stringify(filterValue),
+ doNotTranslate('Unexpected value for "and" filter : ') +
+ JSON.stringify(filterValue),
);
}
@@ -292,18 +289,18 @@ export const isRecordMatchingFilter = ({
});
}
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Unexpected value for "or" filter : ' + filterValue);
+ throw new Error(
+ doNotTranslate('Unexpected value for "or" filter : ') + filterValue,
+ );
}
if (isNotFilter(filter)) {
const filterValue = filter.not;
if (!isDefined(filterValue)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Unexpected value for "not" filter : ' + filterValue);
+ throw new Error(
+ doNotTranslate('Unexpected value for "not" filter : ') + filterValue,
+ );
}
return (
@@ -327,9 +324,10 @@ export const isRecordMatchingFilter = ({
return Object.entries(filter).every(([filterKey, filterValue]) => {
if (!isDefined(filterValue)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Unexpected value for filter key "' + filterKey + '" : ' + filterValue,
+ doNotTranslate('Unexpected value for filter key "') +
+ filterKey +
+ '" : ' +
+ filterValue,
);
}
@@ -355,13 +353,9 @@ export const isRecordMatchingFilter = ({
if (!isDefined(objectMetadataField)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Field metadata item "' +
+ doNotTranslate('Field metadata item "') +
filterKey +
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- '" not found for object metadata item ' +
+ doNotTranslate('" not found for object metadata item ') +
objectMetadataItem.nameSingular,
);
}
@@ -603,9 +597,9 @@ export const isRecordMatchingFilter = ({
}
default: {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Not implemented yet for field type "${objectMetadataField.type}"`,
+ doNotTranslate(
+ `Not implemented yet for field type "${objectMetadataField.type}"`,
+ ),
);
}
}
diff --git a/packages/twenty-front/src/modules/object-record/record-group/hooks/useCurrentRecordGroupId.ts b/packages/twenty-front/src/modules/object-record/record-group/hooks/useCurrentRecordGroupId.ts
index 4eebdb7c0b4..b26d4ca2d5b 100644
--- a/packages/twenty-front/src/modules/object-record/record-group/hooks/useCurrentRecordGroupId.ts
+++ b/packages/twenty-front/src/modules/object-record/record-group/hooks/useCurrentRecordGroupId.ts
@@ -1,23 +1,24 @@
import { RecordGroupContext } from '@/object-record/record-group/states/context/RecordGroupContext';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCurrentRecordGroupId = (): string => {
const context = useContext(RecordGroupContext);
if (!isDefined(context)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'useCurrentRecordGroupId must be used within a RecordGroupContextProvider.',
+ doNotTranslate(
+ 'useCurrentRecordGroupId must be used within a RecordGroupContextProvider.',
+ ),
);
}
if (!context.recordGroupId) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'RecordGroupContext is malformed. recordGroupId is missing.',
+ doNotTranslate(
+ 'RecordGroupContext is malformed. recordGroupId is missing.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupActions.ts b/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupActions.ts
index 8c527216376..5f21dc8f870 100644
--- a/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupActions.ts
+++ b/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupActions.ts
@@ -19,6 +19,7 @@ import { useCallback, useContext } from 'react';
import { useLocation } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
IconArrowLeft,
IconArrowRight,
@@ -74,9 +75,9 @@ export const useRecordGroupActions = ({
setNavigationMemorizedUrl(location.pathname + location.search);
if (!isDefined(recordIndexGroupFieldMetadataItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('recordGroupFieldMetadata is not a non-empty string');
+ throw new Error(
+ doNotTranslate('recordGroupFieldMetadata is not a non-empty string'),
+ );
}
navigate(SettingsPath.ObjectFieldEdit, {
diff --git a/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupFilter.ts b/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupFilter.ts
index 85c651b7a1f..7807052d762 100644
--- a/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupFilter.ts
+++ b/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupFilter.ts
@@ -5,6 +5,7 @@ import { recordIndexGroupFieldMetadataItemComponentState } from '@/object-record
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useMemo } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRecordGroupFilter = (fields: FieldMetadataItem[]) => {
const currentRecordGroupDefinition = useCurrentRecordGroupDefinition();
@@ -21,9 +22,9 @@ export const useRecordGroupFilter = (fields: FieldMetadataItem[]) => {
if (!fieldMetadataItem) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Field metadata item with id ${recordIndexGroupFieldMetadataItem?.id} not found`,
+ doNotTranslate(
+ `Field metadata item with id ${recordIndexGroupFieldMetadataItem?.id} not found`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupReorderConfirmationModal.ts b/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupReorderConfirmationModal.ts
index 463afad989b..035f80f2971 100644
--- a/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupReorderConfirmationModal.ts
+++ b/packages/twenty-front/src/modules/object-record/record-group/hooks/useRecordGroupReorderConfirmationModal.ts
@@ -12,6 +12,7 @@ import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/
import { type ViewType } from '@/views/types/ViewType';
import { type DraggableListDropResult } from '@/ui/layout/draggable-list/types/DraggableListDropResult';
import { useState } from 'react';
+import { doNotTranslate } from 'twenty-shared/i18n';
type UseRecordGroupReorderConfirmationModalParams = {
recordIndexId: string;
@@ -70,9 +71,7 @@ export const useRecordGroupReorderConfirmationModal = ({
const handleConfirmClick = () => {
if (!pendingDragEndHandlerParams) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('pendingDragEndReorder is not set');
+ throw new Error(doNotTranslate('pendingDragEndReorder is not set'));
}
setRecordIndexRecordGroupSort(RecordGroupSort.Manual);
diff --git a/packages/twenty-front/src/modules/object-record/record-group/hooks/useReorderRecordGroups.ts b/packages/twenty-front/src/modules/object-record/record-group/hooks/useReorderRecordGroups.ts
index 1e82947ac64..e7f66622586 100644
--- a/packages/twenty-front/src/modules/object-record/record-group/hooks/useReorderRecordGroups.ts
+++ b/packages/twenty-front/src/modules/object-record/record-group/hooks/useReorderRecordGroups.ts
@@ -13,6 +13,7 @@ import { type ViewType } from '@/views/types/ViewType';
import { mapRecordGroupDefinitionsToViewGroups } from '@/views/utils/mapRecordGroupDefinitionsToViewGroups';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { moveArrayItem } from '~/utils/array/moveArrayItem';
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
@@ -87,9 +88,9 @@ export const useReorderRecordGroups = ({
}, []);
if (!isDefined(recordIndexGroupFieldMetadataItem?.id)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('mainGroupByFieldMetadataId is required');
+ throw new Error(
+ doNotTranslate('mainGroupByFieldMetadataId is required'),
+ );
}
setRecordGroups({
diff --git a/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts b/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts
index 387433bc8f7..5bf8d0b9d91 100644
--- a/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts
+++ b/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts
@@ -19,6 +19,7 @@ import {
isDefined,
sanitizeValueForCSVExport,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
type GenerateExportOptions = {
@@ -51,8 +52,7 @@ export const generateCsv: GenerateExport = ({
fieldMetadataId: '',
type: FieldMetadataType.UUID,
iconName: '',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Preserve the CSV header expected by existing importers.
- label: 'Id',
+ label: doNotTranslate('Id'),
metadata: {
fieldName: 'id',
},
@@ -63,12 +63,10 @@ export const generateCsv: GenerateExport = ({
const columnsToExportWithIdColumn = [objectIdColumn, ...columnsToExport];
const keys = columnsToExportWithIdColumn.flatMap((col) => {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Preserve the relation CSV header expected by existing importers.
- const headerLabel = col.type === 'RELATION' ? `${col.label} Id` : col.label;
+ const headerLabel =
+ col.type === 'RELATION' ? doNotTranslate(`${col.label} Id`) : col.label;
const column = {
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- field: `${col.metadata.fieldName}${col.type === 'RELATION' ? 'Id' : ''}`,
+ field: `${col.metadata.fieldName}${col.type === 'RELATION' ? doNotTranslate('Id') : ''}`,
title: formatValueForCSV(sanitizeValueForCSVExport(headerLabel)),
};
diff --git a/packages/twenty-front/src/modules/object-record/record-index/hooks/useAggregateGqlFieldsFromRecordIndexGroupAggregates.ts b/packages/twenty-front/src/modules/object-record/record-index/hooks/useAggregateGqlFieldsFromRecordIndexGroupAggregates.ts
index 3eb22b61816..840f6aef4d8 100644
--- a/packages/twenty-front/src/modules/object-record/record-index/hooks/useAggregateGqlFieldsFromRecordIndexGroupAggregates.ts
+++ b/packages/twenty-front/src/modules/object-record/record-index/hooks/useAggregateGqlFieldsFromRecordIndexGroupAggregates.ts
@@ -5,6 +5,7 @@ import { getAvailableAggregationsFromObjectFields } from '@/object-record/utils/
import { useMemo } from 'react';
import { type Nullable } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { AggregateOperations } from '~/generated-metadata/graphql';
export const useAggregateGqlFieldsFromRecordIndexGroupAggregates = ({
@@ -32,9 +33,9 @@ export const useAggregateGqlFieldsFromRecordIndexGroupAggregates = ({
if (!isDefined(recordIndexGroupAggregateFieldMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Cannot query an aggregate without a field metadata item for ${objectMetadataItem.nameSingular}, aggregate operation : ${recordIndexGroupAggregateOperation}`,
+ doNotTranslate(
+ `Cannot query an aggregate without a field metadata item for ${objectMetadataItem.nameSingular}, aggregate operation : ${recordIndexGroupAggregateOperation}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/hooks/useSingleRecordPickerPerformSearch.ts b/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/hooks/useSingleRecordPickerPerformSearch.ts
index 27a3c80f495..994618d8b35 100644
--- a/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/hooks/useSingleRecordPickerPerformSearch.ts
+++ b/packages/twenty-front/src/modules/object-record/record-picker/single-record-picker/hooks/useSingleRecordPickerPerformSearch.ts
@@ -13,6 +13,7 @@ import { type RecordPickerPickableMorphItem } from '@/object-record/record-picke
import { getObjectPermissionsForObject } from '@/object-metadata/utils/getObjectPermissionsForObject';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSingleRecordPickerPerformSearch = ({
selectedIds,
@@ -146,10 +147,9 @@ export const useSingleRecordPickerPerformSearch = ({
if (!isDefined(objectMetadataItem)) {
throw new CustomError(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Object metadata item not found for object name singular: ' +
- record.objectNameSingular,
+ doNotTranslate(
+ 'Object metadata item not found for object name singular: ',
+ ) + record.objectNameSingular,
'OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPage.ts b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPage.ts
index 19879fe5908..4839f43d45d 100644
--- a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPage.ts
+++ b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPage.ts
@@ -2,6 +2,7 @@ import { useParams } from 'react-router-dom';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRecordShowPage = (
propsObjectNameSingular: string,
@@ -16,9 +17,7 @@ export const useRecordShowPage = (
const objectRecordId = propsObjectRecordId ?? paramObjectRecordId;
if (!isDefined(objectNameSingular) || !isDefined(objectRecordId)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object name or Record id is not defined');
+ throw new Error(doNotTranslate('Object name or Record id is not defined'));
}
const { objectMetadataItem } = useObjectMetadataItem({ objectNameSingular });
diff --git a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
index 8312aa94c87..8e14a63d614 100644
--- a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
+++ b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
@@ -26,6 +26,7 @@ import {
SidePanelPages,
} from 'twenty-shared/types';
import { combineFilters, getAppPath, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRecordShowPagePagination = (
propsObjectNameSingular: string,
@@ -56,9 +57,7 @@ export const useRecordShowPagePagination = (
const objectRecordId = propsObjectRecordId || paramObjectRecordId;
if (!objectNameSingular || !objectRecordId) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Object name or Record id is not defined');
+ throw new Error(doNotTranslate('Object name or Record id is not defined'));
}
const { objectMetadataItem } = useObjectMetadataItem({
diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts b/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts
index c85deede600..48f0f32d897 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts
+++ b/packages/twenty-front/src/modules/object-record/record-table/components/HorizontalScrollBoxShadowCSS.ts
@@ -1,9 +1,8 @@
import { RECORD_TABLE_HORIZONTAL_SCROLL_SHADOW_VISIBILITY_CSS_VARIABLE_NAME } from '@/object-record/record-table/constants/RecordTableHorizontalScrollShadowVisibilityCssVariableName';
import { themeCssVariables } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// CSS source syntax must stay stable across locales.
-// oxlint-disable-next-line lingui/no-unlocalized-strings
-export const HorizontalScrollBoxShadowCSS = `
+export const HorizontalScrollBoxShadowCSS = doNotTranslate(`
&::after {
content: '';
position: absolute;
@@ -20,4 +19,4 @@ export const HorizontalScrollBoxShadowCSS = `
hidden
);
}
-`;
+`);
diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts b/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts
index 5166a2f1a51..f736c262176 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts
+++ b/packages/twenty-front/src/modules/object-record/record-table/components/VerticalScrollBoxShadowCSS.ts
@@ -1,9 +1,8 @@
import { RECORD_TABLE_VERTICAL_SCROLL_SHADOW_VISIBILITY_CSS_VARIABLE_NAME } from '@/object-record/record-table/constants/RecordTableVerticalScrollShadowVisibilityCssVariableName';
import { themeCssVariables } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// CSS source syntax must stay stable across locales.
-// oxlint-disable-next-line lingui/no-unlocalized-strings
-export const VerticalScrollBoxShadowCSS = `
+export const VerticalScrollBoxShadowCSS = doNotTranslate(`
&::before {
bottom: -1px;
box-shadow:
@@ -19,4 +18,4 @@ export const VerticalScrollBoxShadowCSS = `
);
width: 100%;
}
-`;
+`);
diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/hooks/useViewFieldAggregateOperation.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/hooks/useViewFieldAggregateOperation.tsx
index fdaac3fa273..14dc70d2b56 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/hooks/useViewFieldAggregateOperation.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-footer/hooks/useViewFieldAggregateOperation.tsx
@@ -13,6 +13,7 @@ import { usePerformViewFieldApiPersist } from '@/views/hooks/internal/usePerform
import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useViewFieldAggregateOperation = () => {
const { fieldMetadataId } = useContext(
@@ -50,9 +51,7 @@ export const useViewFieldAggregateOperation = () => {
aggregateOperation: ExtendedAggregateOperations | null,
) => {
if (!currentViewField) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('ViewField not found');
+ throw new Error(doNotTranslate('ViewField not found'));
}
const aggregateOperationForPersistence =
diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/hooks/useOpenRecordFilterChipFromTableHeader.ts b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/hooks/useOpenRecordFilterChipFromTableHeader.ts
index 92c12e4dd29..47667989f75 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/hooks/useOpenRecordFilterChipFromTableHeader.ts
+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/hooks/useOpenRecordFilterChipFromTableHeader.ts
@@ -7,6 +7,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { getEditableChipDropdownId } from '@/views/editable-chip/utils/getEditableChipDropdownId';
import { useSetEditableFilterChipDropdownStates } from '@/views/hooks/useSetEditableFilterChipDropdownStates';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useOpenRecordFilterChipFromTableHeader = () => {
const { filterableFieldMetadataItems } =
@@ -34,9 +35,9 @@ export const useOpenRecordFilterChipFromTableHeader = () => {
if (!isDefined(correspondingFieldMetadataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Cannot find field metadata item with id : ${fieldMetadataItemId}`,
+ doNotTranslate(
+ `Cannot find field metadata item with id : ${fieldMetadataItemId}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/record-table/utils/buildValueFromFilter.ts b/packages/twenty-front/src/modules/object-record/record-table/utils/buildValueFromFilter.ts
index 8940fe2b34d..89705c93107 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/utils/buildValueFromFilter.ts
+++ b/packages/twenty-front/src/modules/object-record/record-table/utils/buildValueFromFilter.ts
@@ -23,6 +23,7 @@ import {
parseToInstantOrThrow,
parseToPlainDateOrThrow,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { RelationType } from '~/generated-metadata/graphql';
type FilterOption = {
@@ -96,9 +97,7 @@ const filterDateTimeToInstant = (
value: string,
timeZone: string,
): Temporal.Instant =>
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- value.includes('T')
+ value.includes(doNotTranslate('T'))
? parseToInstantOrThrow(value)
: parseToPlainDateOrThrow(value).toZonedDateTime(timeZone).toInstant();
@@ -106,9 +105,7 @@ const computeValueFromFilterDate = (
operand: RecordFilterToRecordInputOperand<'DATE_TIME'>,
value: string,
isDateOnly: boolean,
- // Date and time syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- timeZone = 'UTC',
+ timeZone = doNotTranslate('UTC'),
): string | undefined => {
switch (operand) {
case ViewFilterOperand.IS:
@@ -509,9 +506,9 @@ const buildCompositeValueFromFilter = ({
});
if (!operands.some((operand) => operand === filter.operand)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Operand not supported for this sub field type');
+ throw new Error(
+ doNotTranslate('Operand not supported for this sub field type'),
+ );
}
const subFieldValue = computeValueFromSubFieldType({
@@ -572,9 +569,9 @@ export const buildValueFromFilter = ({
const operands = FILTER_OPERANDS_MAP[filter.type];
if (!operands.some((operand) => operand === filter.operand)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Operand not supported for this field type');
+ throw new Error(
+ doNotTranslate('Operand not supported for this field type'),
+ );
}
const handler = VALUE_HANDLER_REGISTRY[filter.type as FieldMetadataType];
diff --git a/packages/twenty-front/src/modules/object-record/record-table/utils/getRecordTableColumnWidthRules.ts b/packages/twenty-front/src/modules/object-record/record-table/utils/getRecordTableColumnWidthRules.ts
index db275b281c2..24f54947a68 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/utils/getRecordTableColumnWidthRules.ts
+++ b/packages/twenty-front/src/modules/object-record/record-table/utils/getRecordTableColumnWidthRules.ts
@@ -1,5 +1,6 @@
import { getRecordTableColumnFieldWidthCSSVariableName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthCSSVariableName';
import { getRecordTableColumnFieldWidthClassName } from '@/object-record/record-table/utils/getRecordTableColumnFieldWidthClassName';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getRecordTableColumnWidthRules = ({
scopeSelector,
@@ -11,7 +12,7 @@ export const getRecordTableColumnWidthRules = ({
Array.from({ length: columnCount }, (_, columnIndex) => {
const columnWidth = `var(${getRecordTableColumnFieldWidthCSSVariableName(columnIndex)})`;
- // CSS source syntax must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `${scopeSelector} div.${getRecordTableColumnFieldWidthClassName(columnIndex)} { width: ${columnWidth}; min-width: ${columnWidth}; max-width: ${columnWidth}; }`;
+ return doNotTranslate(
+ `${scopeSelector} div.${getRecordTableColumnFieldWidthClassName(columnIndex)} { width: ${columnWidth}; min-width: ${columnWidth}; max-width: ${columnWidth}; }`,
+ );
}).join('\n');
diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx b/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx
index d56ed593fa6..29bdd980c6f 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableRowVirtualizedDebugRowHelper.tsx
@@ -12,6 +12,7 @@ import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/
import { useAtomComponentFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue';
import { styled } from '@linaria/react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
const StyledDebugRow = styled.div`
@@ -83,30 +84,37 @@ export const RecordTableRowVirtualizedDebugRowHelper = ({
const position = recordStore?.position;
- // The row overlay exposes internal virtualization state to developers.
- // oxlint-disable lingui/no-unlocalized-strings
return (
<StyledDebugRow>
- <StyledDebugColumn width={70}>virtual :{virtualIndex}</StyledDebugColumn>
<StyledDebugColumn width={70}>
- real :{realIndexByVirtualIndex}
+ {doNotTranslate('virtual :')}
+ {virtualIndex}
+ </StyledDebugColumn>
+ <StyledDebugColumn width={70}>
+ {doNotTranslate('real :')}
+ {realIndexByVirtualIndex}
+ </StyledDebugColumn>
+ <StyledDebugColumn width={100}>
+ {doNotTranslate('pos :')}
+ {position}
</StyledDebugColumn>
- <StyledDebugColumn width={100}>pos :{position}</StyledDebugColumn>
<StyledDebugColumn width={80}>
- px:
+ {doNotTranslate('px:')}
{pixelsFromTop}
</StyledDebugColumn>
<StyledDebugColumn width={150}>
<b>{labelIdentifier}</b>
</StyledDebugColumn>
<StyledDebugColumn width={300}>
- id:
+ {doNotTranslate('id:')}
{recordId}
</StyledDebugColumn>
<StyledDebugColumn width={100}>
- status :{isDefined(dataLoadingStatus) ? dataLoadingStatus : 'undefined'}
+ {doNotTranslate('status :')}
+ {isDefined(dataLoadingStatus)
+ ? dataLoadingStatus
+ : doNotTranslate('undefined')}
</StyledDebugColumn>
</StyledDebugRow>
);
- // oxlint-enable lingui/no-unlocalized-strings
};
diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableVirtualizedDebugHelper.tsx b/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableVirtualizedDebugHelper.tsx
index 342dcfcc3db..d3ce2ac1b98 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableVirtualizedDebugHelper.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/components/RecordTableVirtualizedDebugHelper.tsx
@@ -6,6 +6,7 @@ import { TABLE_VIRTUALIZATION_DEBUG_ACTIVATED } from '@/object-record/record-tab
import { lowDetailsActivatedComponentState } from '@/object-record/record-table/virtualization/states/lowDetailsActivatedComponentState';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { createPortal } from 'react-dom';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const RecordTableVirtualizedDebugHelper = () => {
const lowDetailsActivated = useAtomComponentStateValue(
@@ -16,8 +17,6 @@ export const RecordTableVirtualizedDebugHelper = () => {
return;
}
- // The overlay is a developer-only virtualization diagnostic.
- // oxlint-disable lingui/no-unlocalized-strings
return (
<>
{createPortal(
@@ -34,14 +33,15 @@ export const RecordTableVirtualizedDebugHelper = () => {
position: 'absolute',
}}
>
- <span>Virtualize debug helper</span>
+ <span>{doNotTranslate('Virtualize debug helper')}</span>
<span style={{ paddingLeft: 12 }}>
- - Low details activated : {lowDetailsActivated ? 'Yes' : 'No'}
+ {doNotTranslate('- Low details activated : ')}
+ {doNotTranslate(lowDetailsActivated ? 'Yes' : 'No')}
</span>
<span style={{ paddingLeft: 12 }}>
- - Rows / sec threshold to activate low details :
+ {doNotTranslate('- Rows / sec threshold to activate low details :')}
{SCROLL_SPEED_THRESHOLD_IN_ROWS_PER_SECOND_TO_ACTIVATE_LOW_DETAILS}
- and to deactivate :
+ {doNotTranslate('and to deactivate :')}
{
SCROLL_SPEED_THRESHOLD_IN_ROWS_PER_SECOND_TO_DEACTIVATE_LOW_DETAILS
}
@@ -51,5 +51,4 @@ export const RecordTableVirtualizedDebugHelper = () => {
)}
</>
);
- // oxlint-enable lingui/no-unlocalized-strings
};
diff --git a/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useGetShouldResetTableVirtualizationForUpdateInputs.ts b/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useGetShouldResetTableVirtualizationForUpdateInputs.ts
index 78a7aebf4de..29b008d180a 100644
--- a/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useGetShouldResetTableVirtualizationForUpdateInputs.ts
+++ b/packages/twenty-front/src/modules/object-record/record-table/virtualization/hooks/useGetShouldResetTableVirtualizationForUpdateInputs.ts
@@ -6,6 +6,7 @@ import { type ObjectRecordOperationUpdateInput } from '@/object-record/types/Obj
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { FieldMetadataType } from 'twenty-shared/types';
import { mapById } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useGetShouldResetTableVirtualizationForUpdateInputs = () => {
const { objectMetadataItem } = useRecordIndexContextOrThrow();
@@ -44,9 +45,7 @@ export const useGetShouldResetTableVirtualizationForUpdateInputs = () => {
fieldNamesForUpdateInput.includes(fieldMetadataItemToFilter.name) ||
(fieldMetadataItemToFilter.type === FieldMetadataType.RELATION &&
fieldNamesForUpdateInput.includes(
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `${fieldMetadataItemToFilter.name}Id`,
+ doNotTranslate(`${fieldMetadataItemToFilter.name}Id`),
)),
);
diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldDisplay.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldDisplay.tsx
index 0f4009255d0..f4a8eeb0c2d 100644
--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldDisplay.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldDisplay.tsx
@@ -7,6 +7,7 @@ import { RecordTitleFullNameFieldDisplay } from '@/object-record/record-title-ce
import { RecordTitleCellUuidFieldDisplay } from '@/object-record/record-title-cell/components/RecordTitleCellUuidFieldDisplay';
import { type RecordTitleCellContainerType } from '@/object-record/record-title-cell/types/RecordTitleCellContainerType';
import { useContext } from 'react';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const RecordTitleCellFieldDisplay = ({
containerType,
@@ -20,9 +21,11 @@ export const RecordTitleCellFieldDisplay = ({
!isFieldFullName(fieldDefinition) &&
!isFieldUuid(fieldDefinition)
) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Field definition is not a text, full name, or UUID field');
+ throw new Error(
+ doNotTranslate(
+ 'Field definition is not a text, full name, or UUID field',
+ ),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldInput.tsx
index 25f872c34a9..dce73766543 100644
--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleCellFieldInput.tsx
@@ -5,6 +5,7 @@ import { isFieldFullName } from '@/object-record/record-field/ui/types/guards/is
import { isFieldText } from '@/object-record/record-field/ui/types/guards/isFieldText';
import { RecordTitleCellTextFieldInput } from '@/object-record/record-title-cell/components/RecordTitleCellTextFieldInput';
import { RecordTitleFullNameFieldInput } from '@/object-record/record-title-cell/components/RecordTitleFullNameFieldInput';
+import { doNotTranslate } from 'twenty-shared/i18n';
type RecordTitleCellFieldInputProps = {
instanceId: string;
@@ -18,9 +19,9 @@ export const RecordTitleCellFieldInput = ({
const { fieldDefinition } = useContext(FieldContext);
if (!isFieldText(fieldDefinition) && !isFieldFullName(fieldDefinition)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('Field definition is not a text or full name field');
+ throw new Error(
+ doNotTranslate('Field definition is not a text or full name field'),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx
index eb843b0c744..f0ca4f4a77e 100644
--- a/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/components/RecordTitleDoubleTextInput.tsx
@@ -9,6 +9,7 @@ import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotke
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
import { splitFullName } from '~/utils/format/splitFullName';
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
@@ -174,9 +175,7 @@ export const RecordTitleDoubleTextInput = ({
event.preventDefault();
- // The clipboard format identifier must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const name = event.clipboardData.getData('Text');
+ const name = event.clipboardData.getData(doNotTranslate('Text'));
const splittedName = splitFullName(name);
diff --git a/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx b/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx
index 39bb1fb162e..ddfbbe3a77c 100644
--- a/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-title-cell/hooks/useRecordTitleCell.tsx
@@ -10,6 +10,7 @@ import { useAvailableComponentInstanceId } from '@/ui/utilities/state/component-
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type OpenTitleCellFunctionParams = {
recordId: string;
@@ -37,9 +38,9 @@ export const useRecordTitleCell = () => {
if (!isDefined(computedInstanceId)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Instance ID is not defined in closeRecordTitleCell this should not happen.',
+ doNotTranslate(
+ 'Instance ID is not defined in closeRecordTitleCell this should not happen.',
+ ),
);
}
store.set(
@@ -68,9 +69,9 @@ export const useRecordTitleCell = () => {
if (!isDefined(computedInstanceId)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Instance ID is not defined in openRecordTitleCell this should not happen.',
+ doNotTranslate(
+ 'Instance ID is not defined in openRecordTitleCell this should not happen.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/spreadsheet-import/utils/spreadsheetImportGetCompositeSubFieldKey.ts b/packages/twenty-front/src/modules/object-record/spreadsheet-import/utils/spreadsheetImportGetCompositeSubFieldKey.ts
index 9b9389ebfd9..3f0860c9d4e 100644
--- a/packages/twenty-front/src/modules/object-record/spreadsheet-import/utils/spreadsheetImportGetCompositeSubFieldKey.ts
+++ b/packages/twenty-front/src/modules/object-record/spreadsheet-import/utils/spreadsheetImportGetCompositeSubFieldKey.ts
@@ -1,6 +1,7 @@
import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
import { isCompositeFieldType } from '@/object-record/object-filter-dropdown/utils/isCompositeFieldType';
import { COMPOSITE_FIELD_SUB_FIELD_LABELS } from 'twenty-shared/constants';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getCompositeSubFieldKey = (
fieldMetadataItem: FieldMetadataItem,
@@ -8,9 +9,9 @@ export const getCompositeSubFieldKey = (
) => {
if (!isCompositeFieldType(fieldMetadataItem.type)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `getCompositeSubFieldKey can only be called for composite field types. Received: ${fieldMetadataItem.type}`,
+ doNotTranslate(
+ `getCompositeSubFieldKey can only be called for composite field types. Received: ${fieldMetadataItem.type}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/utils/computeNewEvenlySpacedPositions.ts b/packages/twenty-front/src/modules/object-record/utils/computeNewEvenlySpacedPositions.ts
index 67973fccef9..3cc8e0b405c 100644
--- a/packages/twenty-front/src/modules/object-record/utils/computeNewEvenlySpacedPositions.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/computeNewEvenlySpacedPositions.ts
@@ -1,3 +1,5 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export const computeNewEvenlySpacedPositions = ({
startingPosition,
endingPosition,
@@ -18,9 +20,9 @@ export const computeNewEvenlySpacedPositions = ({
if (positionGapSize < 0) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Cannot compute positions because starting position (${startingPosition}) is after ending position (${endingPosition})`,
+ doNotTranslate(
+ `Cannot compute positions because starting position (${startingPosition}) is after ending position (${endingPosition})`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/utils/computeNewPositionOfDraggedRecord.ts b/packages/twenty-front/src/modules/object-record/utils/computeNewPositionOfDraggedRecord.ts
index 3a0878c0cae..39a004c937c 100644
--- a/packages/twenty-front/src/modules/object-record/utils/computeNewPositionOfDraggedRecord.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/computeNewPositionOfDraggedRecord.ts
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { sortByProperty } from '~/utils/array/sortByProperty';
export type RecordWithPosition = {
@@ -22,9 +23,9 @@ export const computeNewPositionOfDraggedRecord = ({
);
if (!isDefined(targetItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error(`Cannot find item to move for id : ${idOfTargetItem}`);
+ throw new Error(
+ doNotTranslate(`Cannot find item to move for id : ${idOfTargetItem}`),
+ );
}
if (idOfItemToMove === idOfTargetItem) {
diff --git a/packages/twenty-front/src/modules/object-record/utils/computeNewPositionsOfDraggedRecords.ts b/packages/twenty-front/src/modules/object-record/utils/computeNewPositionsOfDraggedRecords.ts
index 25c0d54638c..bd15de5e0ea 100644
--- a/packages/twenty-front/src/modules/object-record/utils/computeNewPositionsOfDraggedRecords.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/computeNewPositionsOfDraggedRecords.ts
@@ -1,6 +1,7 @@
import { computeNewEvenlySpacedPositions } from '@/object-record/utils/computeNewEvenlySpacedPositions';
import { type RecordWithPosition } from '@/object-record/utils/computeNewPositionOfDraggedRecord';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const computeNewPositionsOfDraggedRecords = ({
arrayOfRecordsWithPosition,
@@ -22,9 +23,9 @@ export const computeNewPositionsOfDraggedRecords = ({
const targetItem = arrayOfRecordsWithPosition[indexOfTargetItem];
if (!isDefined(targetItem)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error(`Cannot find item to move for id : ${targetRecordId}`);
+ throw new Error(
+ doNotTranslate(`Cannot find item to move for id : ${targetRecordId}`),
+ );
}
const indexOfItemToMove = arrayOfRecordsWithPosition.findIndex(
diff --git a/packages/twenty-front/src/modules/object-record/utils/computeOptimisticRecordFromInput.ts b/packages/twenty-front/src/modules/object-record/utils/computeOptimisticRecordFromInput.ts
index efca14f8456..102f4c69a06 100644
--- a/packages/twenty-front/src/modules/object-record/utils/computeOptimisticRecordFromInput.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/computeOptimisticRecordFromInput.ts
@@ -21,6 +21,7 @@ import {
computeRelationGqlFieldJoinColumnName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
type ComputeOptimisticCacheRecordInputArgs = {
@@ -46,9 +47,9 @@ export const computeOptimisticRecordFromInput = ({
if (unknownRecordInputFields.length > 0) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Should never occur, encountered unknown fields ${unknownRecordInputFields.join(', ')} in objectMetadataItem ${objectMetadataItem.nameSingular}`,
+ doNotTranslate(
+ `Should never occur, encountered unknown fields ${unknownRecordInputFields.join(', ')} in objectMetadataItem ${objectMetadataItem.nameSingular}`,
+ ),
);
}
@@ -142,9 +143,9 @@ export const computeOptimisticRecordFromInput = ({
);
if (!isDefined(targetObjectMetataDataItem)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Should never occur, encountered invalid relation definition',
+ doNotTranslate(
+ 'Should never occur, encountered invalid relation definition',
+ ),
);
}
@@ -219,9 +220,9 @@ export const computeOptimisticRecordFromInput = ({
if (!isDefined(fieldMetadataItem.morphRelations)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Should never occur, encountered invalid relation definition',
+ doNotTranslate(
+ 'Should never occur, encountered invalid relation definition',
+ ),
);
}
@@ -234,9 +235,9 @@ export const computeOptimisticRecordFromInput = ({
if (!isDefined(fieldMetadataMorphRelation?.targetObjectMetadata)) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- 'Should never occur, encountered invalid relation definition',
+ doNotTranslate(
+ 'Should never occur, encountered invalid relation definition',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/object-record/utils/getAggregateQueryName.ts b/packages/twenty-front/src/modules/object-record/utils/getAggregateQueryName.ts
index ef07d332cd4..3843e6daea9 100644
--- a/packages/twenty-front/src/modules/object-record/utils/getAggregateQueryName.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/getAggregateQueryName.ts
@@ -1,13 +1,10 @@
import { capitalize, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getAggregateQueryName = (
objectMetadataNamePlural: string,
): string => {
if (!isDefined(objectMetadataNamePlural)) {
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- throw new Error('objectMetadataNamePlural is required');
+ throw new Error(doNotTranslate('objectMetadataNamePlural is required'));
}
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return `Aggregate${capitalize(objectMetadataNamePlural)}`;
+ return doNotTranslate(`Aggregate${capitalize(objectMetadataNamePlural)}`);
};
diff --git a/packages/twenty-front/src/modules/object-record/utils/getFindDuplicateRecordsQueryResponseField.ts b/packages/twenty-front/src/modules/object-record/utils/getFindDuplicateRecordsQueryResponseField.ts
index a9cf496e031..cba7d547a83 100644
--- a/packages/twenty-front/src/modules/object-record/utils/getFindDuplicateRecordsQueryResponseField.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/getFindDuplicateRecordsQueryResponseField.ts
@@ -1,5 +1,5 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export const getFindDuplicateRecordsQueryResponseField = (
objectNameSingular: string,
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
-) => `${objectNameSingular}Duplicates`;
+) => doNotTranslate(`${objectNameSingular}Duplicates`);
diff --git a/packages/twenty-front/src/modules/object-record/utils/getForeignKeyNameFromRelationFieldName.ts b/packages/twenty-front/src/modules/object-record/utils/getForeignKeyNameFromRelationFieldName.ts
index c43c7e8bdc1..7a936409932 100644
--- a/packages/twenty-front/src/modules/object-record/utils/getForeignKeyNameFromRelationFieldName.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/getForeignKeyNameFromRelationFieldName.ts
@@ -1,4 +1,4 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export const getForeignKeyNameFromRelationFieldName = (nameSingular: string) =>
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `${nameSingular}Id`;
+ doNotTranslate(`${nameSingular}Id`);
diff --git a/packages/twenty-front/src/modules/object-record/utils/prefillRecord.ts b/packages/twenty-front/src/modules/object-record/utils/prefillRecord.ts
index 7d862f03c2b..760f6448dc4 100644
--- a/packages/twenty-front/src/modules/object-record/utils/prefillRecord.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/prefillRecord.ts
@@ -10,6 +10,7 @@ import {
computeRelationGqlFieldJoinColumnName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
type PrefillRecordArgs = {
@@ -84,9 +85,9 @@ const throwIfInputRelationDataIsInconsistent = (
});
if (isDefined(inputValue) && !isDefined(input[relationIdFieldName])) {
throw new Error(
- // Error text is used for locale-independent issue grouping.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- `Inconsistent input: ${fieldMetadataItem.name} is specified but ${relationIdFieldName} is missing`,
+ doNotTranslate(
+ `Inconsistent input: ${fieldMetadataItem.name} is specified but ${relationIdFieldName} is missing`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts b/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts
index 17c536f099c..851c078ce8e 100644
--- a/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts
+++ b/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts
@@ -10,6 +10,7 @@ import {
computeRelationGqlFieldJoinColumnName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
export const sanitizeRecordInput = ({
@@ -48,9 +49,10 @@ export const sanitizeRecordInput = ({
targetObjectMetadataNamePlural:
morphRelation.targetObjectMetadata.namePlural,
});
- // Metadata and protocol identifiers must stay stable across locales.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- return computedFieldName === fieldName.replace('Id', '');
+ return (
+ computedFieldName ===
+ fieldName.replace(doNotTranslate('Id'), '')
+ );
});
});
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/OnboardingConstructionSite.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/OnboardingConstructionSite.tsx
index 73de585ed2d..7574d1615e2 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/OnboardingConstructionSite.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/OnboardingConstructionSite.tsx
@@ -14,6 +14,7 @@ import { getIsLastOnboardingStep } from '@/onboarding/utils/getIsLastOnboardingS
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { themeCssVariables, useThemeColorScheme } from 'twenty-ui/theme';
import { useMediaQuery } from 'twenty-ui/utilities';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledCanvas = styled.canvas`
animation: onboardingConstructionSiteIn 0.8s ease-out both;
@@ -54,8 +55,7 @@ export const OnboardingConstructionSite = () => {
);
const colorScheme = useThemeColorScheme();
const prefersReducedMotion = useMediaQuery(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS value or browser media query, not UI copy.
- '(prefers-reduced-motion: reduce)',
+ doNotTranslate('(prefers-reduced-motion: reduce)'),
);
if (!isClientConfigLoaded || !isCurrentUserLoaded) {
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/createOnboardingConstructionSiteRenderer.ts b/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/createOnboardingConstructionSiteRenderer.ts
index b86ffe34b68..29c831d85f1 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/createOnboardingConstructionSiteRenderer.ts
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/createOnboardingConstructionSiteRenderer.ts
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
buildOnboardingConstructionSiteScene,
@@ -160,10 +161,12 @@ export const createOnboardingConstructionSiteRenderer = ({
return null;
}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are WebGL extension identifiers.
- const parallelShaderCompile = gl.getExtension('KHR_parallel_shader_compile');
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are WebGL extension identifiers.
- const debugRendererInfo = gl.getExtension('WEBGL_debug_renderer_info');
+ const parallelShaderCompile = gl.getExtension(
+ doNotTranslate('KHR_parallel_shader_compile'),
+ );
+ const debugRendererInfo = gl.getExtension(
+ doNotTranslate('WEBGL_debug_renderer_info'),
+ );
const shouldReduceMotion =
prefersReducedMotion ||
(isDefined(debugRendererInfo) &&
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/onboardingConstructionSiteShaders.ts b/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/onboardingConstructionSiteShaders.ts
index 8bb128be0aa..1133564036b 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/onboardingConstructionSiteShaders.ts
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingConstructionSite/onboardingConstructionSiteShaders.ts
@@ -1,5 +1,6 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Shader source is executable GLSL.
-const SCENE_VERTEX_SHADER = `#version 300 es
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+const SCENE_VERTEX_SHADER = doNotTranslate(`#version 300 es
in vec3 position;
in vec3 normal;
in vec4 instanceColumn0;
@@ -22,9 +23,9 @@ const SCENE_VERTEX_SHADER = `#version 300 es
albedo = instanceAlbedo;
gl_Position = viewProjection * world;
}
-`;
+`);
-const SCENE_FRAGMENT_SHADER = `#version 300 es
+const SCENE_FRAGMENT_SHADER = doNotTranslate(`#version 300 es
precision highp float;
const float PI = 3.141592653589793;
@@ -112,17 +113,17 @@ const SCENE_FRAGMENT_SHADER = `#version 300 es
fragmentColor = vec4(clamp(radiance, 0.0, 1.0), 1.0);
}
-`;
+`);
-const FULL_SCREEN_VERTEX_SHADER = `#version 300 es
+const FULL_SCREEN_VERTEX_SHADER = doNotTranslate(`#version 300 es
const vec2 corners[3] = vec2[3](vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0));
void main() {
gl_Position = vec4(corners[gl_VertexID], 0.0, 1.0);
}
-`;
+`);
-const HALFTONE_FRAGMENT_SHADER = `#version 300 es
+const HALFTONE_FRAGMENT_SHADER = doNotTranslate(`#version 300 es
precision highp float;
uniform sampler2D sceneTexture;
@@ -196,7 +197,7 @@ const HALFTONE_FRAGMENT_SHADER = `#version 300 es
fragmentColor = vec4(dashColor * alpha, alpha);
}
-`;
+`);
export const ONBOARDING_CONSTRUCTION_SITE_SHADERS = {
sceneVertex: SCENE_VERTEX_SHADER,
diff --git a/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx b/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx
index 9d4515b9d09..f5549aac994 100644
--- a/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/OnboardingLayout.tsx
@@ -3,6 +3,7 @@ import { ONBOARDING_BACKGROUND_COMPONENT_MIN_VIEWPORT_WIDTH } from '@/onboarding
import { styled } from '@linaria/react';
import { type ReactNode } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
import { useMediaQuery } from 'twenty-ui/utilities';
@@ -39,8 +40,9 @@ export const OnboardingLayout = ({
backgroundComponent,
}: OnboardingLayoutProps) => {
const isBackgroundComponentVisible = useMediaQuery(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS value or browser media query, not UI copy.
- `(min-width: ${ONBOARDING_BACKGROUND_COMPONENT_MIN_VIEWPORT_WIDTH}px)`,
+ doNotTranslate(
+ `(min-width: ${ONBOARDING_BACKGROUND_COMPONENT_MIN_VIEWPORT_WIDTH}px)`,
+ ),
);
return (
diff --git a/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeHalftoneCanvasEffect.tsx b/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeHalftoneCanvasEffect.tsx
index bec717ab758..c29513d7902 100644
--- a/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeHalftoneCanvasEffect.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/WelcomeOverlay/WelcomeHalftoneCanvasEffect.tsx
@@ -1,5 +1,6 @@
import { type RefObject, useEffect, useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { createWelcomeHalftoneMainThreadController } from '@/onboarding/components/WelcomeOverlay/createWelcomeHalftoneMainThreadController';
import { createWelcomeHalftoneWorkerController } from '@/onboarding/components/WelcomeOverlay/createWelcomeHalftoneWorkerController';
@@ -28,8 +29,8 @@ export const WelcomeHalftoneCanvasEffect = ({
}
const prefersReducedMotion =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS value or browser media query, not UI copy.
- window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;
+ window.matchMedia?.(doNotTranslate('(prefers-reduced-motion: reduce)'))
+ .matches ?? false;
const canvasStyles = getComputedStyle(canvas);
const dotColor = canvasStyles
.getPropertyValue('--welcome-dot-color')
diff --git a/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBarReducedMotionEffect.tsx b/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBarReducedMotionEffect.tsx
index fe986faadc7..26e8deb8980 100644
--- a/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBarReducedMotionEffect.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/free-credits/OnboardingFreeCreditsProgressBarReducedMotionEffect.tsx
@@ -1,8 +1,8 @@
import { useEffect } from 'react';
import { useMediaQuery } from 'twenty-ui/utilities';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS value or browser media query, not UI copy.
-const REDUCED_MOTION_QUERY = '(prefers-reduced-motion: reduce)';
+const REDUCED_MOTION_QUERY = doNotTranslate('(prefers-reduced-motion: reduce)');
type OnboardingFreeCreditsProgressBarReducedMotionEffectProps = {
hasTrackGrown: boolean;
diff --git a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx
index f06de2bdb1f..0c3ec5480ab 100644
--- a/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx
+++ b/packages/twenty-front/src/modules/onboarding/components/import-contacts/OnboardingImportPreviewEmails.tsx
@@ -10,6 +10,7 @@ import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { isString } from '@sniptt/guards';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
const EVENT_CARD_WIDTH = 160;
@@ -204,8 +205,9 @@ const EventCard = ({
top: position.top,
left: position.left,
'--event-card-transform': `rotate(${position.rotate}deg)`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS value or browser media query, not UI copy.
- '--event-card-entry-transform': `translate(${position.entry.x}px, ${position.entry.y}px) rotate(${position.entry.rotate}deg) scale(${position.entry.scale})`,
+ '--event-card-entry-transform': doNotTranslate(
+ `translate(${position.entry.x}px, ${position.entry.y}px) rotate(${position.entry.rotate}deg) scale(${position.entry.scale})`,
+ ),
} as React.CSSProperties
}
>
diff --git a/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCalendarEvents.ts b/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCalendarEvents.ts
index bc2db77b765..ac074e582f0 100644
--- a/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCalendarEvents.ts
+++ b/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCalendarEvents.ts
@@ -1,4 +1,5 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Fixture meeting titles contain proper names.
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export type ImportContactsPreviewCalendarEvent = {
id: string;
title: string;
@@ -9,13 +10,13 @@ export type ImportContactsPreviewCalendarEvent = {
export const IMPORT_CONTACTS_PREVIEW_CALENDAR_EVENTS = [
{
id: 'tim-apple-anthropic',
- title: 'Tim Apple x Anthropic',
+ title: doNotTranslate('Tim Apple x Anthropic'),
time: '10:00am',
color: 'orange',
},
{
id: 'dario-amodei',
- title: 'Dario Amodei',
+ title: doNotTranslate('Dario Amodei'),
time: '3:00pm',
color: 'sky',
},
diff --git a/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCompanies.ts b/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCompanies.ts
index cdf4e493b88..fb1ebc7dd62 100644
--- a/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCompanies.ts
+++ b/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewCompanies.ts
@@ -1,15 +1,16 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Fixture company names are proper names.
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export type ImportContactsPreviewCompany = {
id: string;
name: string;
domainName: string;
};
-export const IMPORT_CONTACTS_PREVIEW_COMPANIES = [
+export const IMPORT_CONTACTS_PREVIEW_COMPANIES = doNotTranslate([
{ id: 'figma', name: 'Figma', domainName: 'figma.com' },
{ id: 'anthropic', name: 'Anthropic', domainName: 'anthropic.com' },
{ id: 'notion', name: 'Notion', domainName: 'notion.so' },
{ id: 'airbnb', name: 'Airbnb', domainName: 'airbnb.com' },
{ id: 'linkedin', name: 'LinkedIn', domainName: 'linkedin.com' },
{ id: 'slack', name: 'Slack', domainName: 'slack.com' },
-] satisfies ImportContactsPreviewCompany[];
+] satisfies ImportContactsPreviewCompany[]);
diff --git a/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewEmails.ts b/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewEmails.ts
index 48fe2aa20b6..64c588d0290 100644
--- a/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewEmails.ts
+++ b/packages/twenty-front/src/modules/onboarding/constants/ImportContactsPreviewEmails.ts
@@ -1,5 +1,6 @@
import { type MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/core/macro';
+import { doNotTranslate } from 'twenty-shared/i18n';
export type ImportContactsPreviewEmail = {
id: string;
@@ -13,8 +14,7 @@ export type ImportContactsPreviewEmail = {
export const IMPORT_CONTACTS_PREVIEW_EMAILS = [
{
id: 'acme',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Fixture sender is a proper name.
- sender: 'Acme Inc.',
+ sender: doNotTranslate('Acme Inc.'),
subject: msg`Insights: The latest in industrial equipment and tools`,
senderColor: 'secondary',
isSenderMedium: true,
@@ -22,28 +22,24 @@ export const IMPORT_CONTACTS_PREVIEW_EMAILS = [
},
{
id: 'dylan-field',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Fixture sender is a proper name.
- sender: 'Dylan Field',
- // oxlint-disable lingui/no-unlocalized-strings -- Placeholder Latin has no translated meaning.
- subject:
+ sender: doNotTranslate('Dylan Field'),
+ subject: doNotTranslate(
'Lorem ipsum dolor sit amet consectetur. Ac eget eu eget ullamcorper tellus sem scelerisque sit ante.',
- // oxlint-enable lingui/no-unlocalized-strings
+ ),
senderColor: 'primary',
isSenderMedium: false,
isSelected: false,
},
{
id: 'dario-amodei',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Fixture sender is a proper name.
- sender: 'Dario Amodei',
+ sender: doNotTranslate('Dario Amodei'),
senderColor: 'primary',
isSenderMedium: true,
isSelected: true,
},
{
id: 'ivan-zhao',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Fixture sender is a proper name.
- sender: 'Ivan Zhao',
+ sender: doNotTranslate('Ivan Zhao'),
subject: msg`Our latest Adventures and Destinations`,
senderColor: 'tertiary',
isSenderMedium: true,
@@ -51,8 +47,7 @@ export const IMPORT_CONTACTS_PREVIEW_EMAILS = [
},
{
id: 'brian-chesky',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Fixture sender is a proper name.
- sender: 'Brian Chesky',
+ sender: doNotTranslate('Brian Chesky'),
subject: msg`Insights: Industry trends and best practices`,
senderColor: 'tertiary',
isSenderMedium: true,
@@ -60,8 +55,7 @@ export const IMPORT_CONTACTS_PREVIEW_EMAILS = [
},
{
id: 'stewart-butterfield',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Fixture sender is a proper name.
- sender: 'Stewart Butterfield',
+ sender: doNotTranslate('Stewart Butterfield'),
subject: msg`Our Complete list of Recipe Ideas and Restaurant Reviews!`,
senderColor: 'secondary',
isSenderMedium: true,
diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx
index 078e92bb41c..177dd493c3f 100644
--- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx
+++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutRecordIdentifierBar.tsx
@@ -10,12 +10,14 @@ import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { type ReactNode } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconPinned } from 'twenty-ui/icon';
import { IconButton } from 'twenty-ui/components/input';
import { themeCssVariables } from 'twenty-ui/theme';
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This value is a CSS track expression.
-const SIDE_TRACK = `min(${PAGE_LAYOUT_LEFT_PANEL_CONTAINER_WIDTH}px, calc(100% / 3))`;
+const SIDE_TRACK = doNotTranslate(
+ `min(${PAGE_LAYOUT_LEFT_PANEL_CONTAINER_WIDTH}px, calc(100% / 3))`,
+);
// Equal side tracks center the tabs; their width ignores visible tabs so overflow can recover on resize.
const StyledBar = styled.div<{
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutWidget.ts b/packages/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutWidget.ts
index 13b2fe5f044..7d3467d325f 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutWidget.ts
@@ -15,6 +15,7 @@ import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/h
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 as uuidv4 } from 'uuid';
import {
PageLayoutTabLayoutMode,
@@ -72,8 +73,9 @@ export const useCreatePageLayoutWidget = ({
if (!isDefined(activeTabId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `A tab must be selected to create a new ${type} widget`,
+ doNotTranslate(
+ `A tab must be selected to create a new ${type} widget`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingFieldsWidgetViews.ts b/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingFieldsWidgetViews.ts
index 203f63475b6..7614f01e18a 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingFieldsWidgetViews.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingFieldsWidgetViews.ts
@@ -7,6 +7,7 @@ import { t } from '@lingui/core/macro';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { ViewType, WidgetType } from '~/generated-metadata/graphql';
export const useCreatePendingFieldsWidgetViews = () => {
@@ -82,8 +83,9 @@ export const useCreatePendingFieldsWidgetViews = () => {
if (result.status === 'failed') {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Failed to create view for FIELDS widget ${widget.id}`,
+ doNotTranslate(
+ `Failed to create view for FIELDS widget ${widget.id}`,
+ ),
);
}
}
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingRecordTableWidgetViews.ts b/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingRecordTableWidgetViews.ts
index 57913432963..6b528bf52f1 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingRecordTableWidgetViews.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/useCreatePendingRecordTableWidgetViews.ts
@@ -8,6 +8,7 @@ import { viewsSelector } from '@/views/states/selectors/viewsSelector';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCreatePendingRecordTableWidgetViews = () => {
const { performViewApiCreate, performViewApiDestroy } =
@@ -114,8 +115,9 @@ export const useCreatePendingRecordTableWidgetViews = () => {
if (result.status === 'failed') {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Failed to create view for RECORD_TABLE widget ${widget.id}`,
+ doNotTranslate(
+ `Failed to create view for RECORD_TABLE widget ${widget.id}`,
+ ),
);
}
}
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useCurrentPageLayoutOrThrow.ts b/packages/twenty-front/src/modules/page-layout/hooks/useCurrentPageLayoutOrThrow.ts
index d8875f800b8..5582bfe971a 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/useCurrentPageLayoutOrThrow.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/useCurrentPageLayoutOrThrow.ts
@@ -1,12 +1,12 @@
import { useCurrentPageLayout } from '@/page-layout/hooks/useCurrentPageLayout';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCurrentPageLayoutOrThrow = () => {
const { currentPageLayout } = useCurrentPageLayout();
if (!isDefined(currentPageLayout)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('No current page layout found');
+ throw new Error(doNotTranslate('No current page layout found'));
}
return { currentPageLayout };
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutTab.ts b/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutTab.ts
index 9ed399a2cd7..3d567317721 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutTab.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutTab.ts
@@ -19,6 +19,7 @@ import { useStore } from 'jotai';
import { useCallback } from 'react';
import { SidePanelPages } from 'twenty-shared/types';
import { appendCopySuffix, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 as uuidv4 } from 'uuid';
export const useDuplicatePageLayoutTab = ({
@@ -79,8 +80,7 @@ export const useDuplicatePageLayoutTab = ({
);
if (!isDefined(sourceTab)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Tab with id ${tabId} not found`);
+ throw new Error(doNotTranslate(`Tab with id ${tabId} not found`));
}
const newTabId = uuidv4();
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutWidget.ts b/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutWidget.ts
index 13027d04322..32554e0e06c 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/useDuplicatePageLayoutWidget.ts
@@ -14,6 +14,7 @@ import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSe
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { appendCopySuffix, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 as uuidv4 } from 'uuid';
export const useDuplicatePageLayoutWidget = (
@@ -61,8 +62,7 @@ export const useDuplicatePageLayoutWidget = (
.find((widget) => widget.id === widgetId);
if (!isDefined(sourceWidget)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Widget with id ${widgetId} not found`);
+ throw new Error(doNotTranslate(`Widget with id ${widgetId} not found`));
}
const sourceTab = pageLayoutDraft.tabs.find(
@@ -71,8 +71,9 @@ export const useDuplicatePageLayoutWidget = (
if (!isDefined(sourceTab)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Tab with id ${sourceWidget.pageLayoutTabId} not found`,
+ doNotTranslate(
+ `Tab with id ${sourceWidget.pageLayoutTabId} not found`,
+ ),
);
}
@@ -105,8 +106,9 @@ export const useDuplicatePageLayoutWidget = (
);
if (!isDefined(sourceLayout)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Layout for widget ${widgetId} not found`);
+ throw new Error(
+ doNotTranslate(`Layout for widget ${widgetId} not found`),
+ );
}
const maxY = currentTabDesktopLayouts.reduce(
diff --git a/packages/twenty-front/src/modules/page-layout/hooks/usePageLayoutTabWithVisibleWidgetsOrThrow.ts b/packages/twenty-front/src/modules/page-layout/hooks/usePageLayoutTabWithVisibleWidgetsOrThrow.ts
index f3f89d6f716..ad2ecc144e9 100644
--- a/packages/twenty-front/src/modules/page-layout/hooks/usePageLayoutTabWithVisibleWidgetsOrThrow.ts
+++ b/packages/twenty-front/src/modules/page-layout/hooks/usePageLayoutTabWithVisibleWidgetsOrThrow.ts
@@ -6,6 +6,7 @@ import { filterVisibleWidgets } from '@/page-layout/utils/filterVisibleWidgets';
import { sortWidgetsByVerticalListPosition } from '@/page-layout/utils/sortWidgetsByVerticalListPosition';
import { useMemo } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { PageLayoutTabLayoutMode } from '~/generated-metadata/graphql';
export const usePageLayoutTabWithVisibleWidgetsOrThrow = (
@@ -41,8 +42,7 @@ export const usePageLayoutTabWithVisibleWidgetsOrThrow = (
}, [isPageLayoutInEditMode, tab, widgetVisibilityContext]);
if (!isDefined(tabWithVisibleWidgets)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Tab not found');
+ throw new Error(doNotTranslate('Tab not found'));
}
return tabWithVisibleWidgets;
diff --git a/packages/twenty-front/src/modules/page-layout/utils/assertPageLayoutTabHasDefinedLayoutModeOrThrow.ts b/packages/twenty-front/src/modules/page-layout/utils/assertPageLayoutTabHasDefinedLayoutModeOrThrow.ts
index cc4942e4ba9..f955ed540cd 100644
--- a/packages/twenty-front/src/modules/page-layout/utils/assertPageLayoutTabHasDefinedLayoutModeOrThrow.ts
+++ b/packages/twenty-front/src/modules/page-layout/utils/assertPageLayoutTabHasDefinedLayoutModeOrThrow.ts
@@ -1,5 +1,6 @@
import { type PageLayoutTab } from '@/page-layout/types/PageLayoutTab';
import { isNonEmptyString } from '@sniptt/guards';
+import { doNotTranslate } from 'twenty-shared/i18n';
type AssertPageLayoutTabHasDefinedLayoutModeOrThrow = (
tab: PageLayoutTab | undefined,
@@ -10,7 +11,6 @@ type AssertPageLayoutTabHasDefinedLayoutModeOrThrow = (
export const assertPageLayoutTabHasDefinedLayoutModeOrThrow: AssertPageLayoutTabHasDefinedLayoutModeOrThrow =
(tab) => {
if (!isNonEmptyString(tab?.layoutMode)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Tab layout mode is not defined');
+ throw new Error(doNotTranslate('Tab layout mode is not defined'));
}
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx
index 78dd30ef586..be6f40804c8 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/components/CallRecordingTranscriptEntryList.tsx
@@ -14,6 +14,7 @@ import {
} from 'react';
import { type CallRecordingParsedTranscriptEntry } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
const StyledTranscriptContainer = styled.div`
@@ -40,17 +41,15 @@ const StyledEntryList = styled.ul<{ hasPlaybackControls: boolean }>`
: '0'};
`;
-const MANUAL_SCROLL_KEYS = [
+const MANUAL_SCROLL_KEYS = doNotTranslate([
'ArrowDown',
'ArrowUp',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- KeyboardEvent.key values must match browser key names.
'End',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- KeyboardEvent.key values must match browser key names.
'Home',
'PageDown',
'PageUp',
' ',
-];
+]);
type CallRecordingTranscriptEntryListProps = {
entries: CallRecordingParsedTranscriptEntry[];
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/utils/watchCallRecordingTranscriptFollowScroll.ts b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/utils/watchCallRecordingTranscriptFollowScroll.ts
index c181371b09b..3a4d764a505 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/utils/watchCallRecordingTranscriptFollowScroll.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/call-recording-transcript/utils/watchCallRecordingTranscriptFollowScroll.ts
@@ -1,6 +1,7 @@
import { CALL_RECORDING_TRANSCRIPT_CURRENT_SPOKEN_WORD_DATA_ATTRIBUTE } from '@/page-layout/widgets/call-recording-transcript/constants/CallRecordingTranscriptCurrentSpokenWordDataAttribute';
import { getCallRecordingTranscriptFollowScrollTop } from '@/page-layout/widgets/call-recording-transcript/utils/getCallRecordingTranscriptFollowScrollTop';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const FOLLOW_SCROLL_SYNC_EVENT_NAMES = [
'seeking',
@@ -63,8 +64,7 @@ export const watchCallRecordingTranscriptFollowScroll = ({
}
const prefersReducedMotion = window.matchMedia(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a browser media query.
- '(prefers-reduced-motion: reduce)',
+ doNotTranslate('(prefers-reduced-motion: reduce)'),
).matches;
scrollContainerElement.scrollTo({
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationEditAction.tsx b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationEditAction.tsx
index 5d12c3a59bb..ba04acf8941 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationEditAction.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/components/FieldWidgetRelationEditAction.tsx
@@ -21,6 +21,7 @@ import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/use
import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconPencil, IconPlus } from 'twenty-ui/icon';
import { IconButton } from 'twenty-ui/components/input';
import { RelationType } from '~/generated-metadata/graphql';
@@ -49,8 +50,7 @@ export const FieldWidgetRelationEditAction = ({
if (!objectMetadataItem) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Object metadata item not found',
+ doNotTranslate('Object metadata item not found'),
'OBJECT_METADATA_ITEM_NOT_FOUND',
);
}
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useFieldWidgetRelationRecordsTotalCount.ts b/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useFieldWidgetRelationRecordsTotalCount.ts
index e0d93b4a111..282a93be6e9 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useFieldWidgetRelationRecordsTotalCount.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useFieldWidgetRelationRecordsTotalCount.ts
@@ -11,6 +11,7 @@ import {
computeMorphRelationGqlFieldName,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { RelationType } from '~/generated-metadata/graphql';
type UseFieldWidgetRelationRecordsTotalCountParams = {
@@ -71,8 +72,7 @@ export const useFieldWidgetRelationRecordsTotalCount = ({
const filter = isToManyObjects
? ({
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This suffix forms a GraphQL field identifier.
- [`${gqlFieldName}Id`]: {
+ [doNotTranslate(`${gqlFieldName}Id`)]: {
in: [recordId],
},
} satisfies RecordGqlOperationFilter)
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useOpenFieldWidgetFieldInputEditMode.ts b/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useOpenFieldWidgetFieldInputEditMode.ts
index a7d51c9548b..8fe5667b80e 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useOpenFieldWidgetFieldInputEditMode.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/hooks/useOpenFieldWidgetFieldInputEditMode.ts
@@ -20,6 +20,7 @@ import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentTyp
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useOpenFieldWidgetFieldInputEditMode = () => {
const { objectMetadataItems } = useObjectMetadataItems();
@@ -93,8 +94,9 @@ export const useOpenFieldWidgetFieldInputEditMode = () => {
if (isFieldMorphRelationOneToMany(fieldDefinition)) {
if (!isFieldMorphRelation(fieldDefinition)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Field is not a morph relation one to many');
+ throw new Error(
+ doNotTranslate('Field is not a morph relation one to many'),
+ );
}
openMorphRelationOneToManyFieldInput({
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/field/utils/assertFieldWidgetOrThrow.ts b/packages/twenty-front/src/modules/page-layout/widgets/field/utils/assertFieldWidgetOrThrow.ts
index 2656151da3c..892c4a927e1 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/field/utils/assertFieldWidgetOrThrow.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/field/utils/assertFieldWidgetOrThrow.ts
@@ -1,6 +1,7 @@
import { type FieldConfiguration } from '@/page-layout/types/FieldConfiguration';
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { WidgetConfigurationType } from '~/generated-metadata/graphql';
type AssertFieldWidgetOrThrow = (
@@ -14,16 +15,16 @@ export const assertFieldWidgetOrThrow: AssertFieldWidgetOrThrow = (
) => {
assertIsDefinedOrThrow(
widget.configuration,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget configuration is required'),
+ new Error(doNotTranslate('Widget configuration is required')),
);
if (
widget.configuration.configurationType !== WidgetConfigurationType.FIELD
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Expected FieldConfiguration but got ${widget.configuration.__typename}`,
+ doNotTranslate(
+ `Expected FieldConfiguration but got ${widget.configuration.__typename}`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts
index d145af9f4aa..d2525d4cb98 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts
@@ -1,4 +1,5 @@
import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const findAnchorBarInSlice = ({
bars,
@@ -8,8 +9,7 @@ export const findAnchorBarInSlice = ({
isVerticalLayout: boolean;
}): BarPosition => {
if (bars.length === 0) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Cannot find anchor bar in empty slice');
+ throw new Error(doNotTranslate('Cannot find anchor bar in empty slice'));
}
return bars.reduce((anchor, bar) => {
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer.tsx
index 7bccc6d4546..835346c248e 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer.tsx
@@ -9,6 +9,7 @@ import {
} from '@nivo/line';
import { animated } from '@react-spring/web';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type CustomLinesLayerProps = {
series: readonly ComputedSeries<LineSeries>[];
@@ -47,8 +48,7 @@ const AnimatedLinePath = ({
strokeWidth={lineWidth}
opacity={isDimmed ? LEGEND_HIGHLIGHT_DIMMED_OPACITY : 1}
style={{
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This value is a CSS transition.
- transition: 'opacity 0.15s ease-in-out',
+ transition: doNotTranslate('opacity 0.15s ease-in-out'),
}}
/>
);
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath.tsx
index 0904b2b0677..6f3d28605bf 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath.tsx
@@ -4,6 +4,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { useAnimatedPath } from '@nivo/core';
import { animated } from '@react-spring/web';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type LineAnimatedAreaPathProps = {
id: string;
@@ -33,8 +34,7 @@ export const LineAnimatedAreaPath = ({
strokeWidth={0}
opacity={isDimmed ? LEGEND_HIGHLIGHT_DIMMED_OPACITY : 1}
style={{
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This value is a CSS transition.
- transition: 'opacity 0.15s ease-in-out',
+ transition: doNotTranslate('opacity 0.15s ease-in-out'),
}}
/>
);
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx
index e2bcecf554c..e4ebd3f1263 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx
@@ -6,6 +6,7 @@ import { useArcsTransition } from '@nivo/arcs';
import { type MouseEventHandler, type PieCustomLayerProps } from '@nivo/pie';
import { animated } from '@react-spring/web';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type CustomArcsLayerProps = Pick<
PieCustomLayerProps<PieChartDataItemWithColor>,
@@ -74,8 +75,7 @@ export const CustomArcsLayer = ({
fill={datum.color}
opacity={isDimmed ? LEGEND_HIGHLIGHT_DIMMED_OPACITY : 1}
style={{
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This value is a CSS transition.
- transition: 'opacity 0.15s ease-in-out',
+ transition: doNotTranslate('opacity 0.15s ease-in-out'),
}}
/>
</g>
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx
index 33e0f564f60..136b4fa1be0 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx
@@ -28,6 +28,7 @@ import {
useRef,
} from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
import { type PieChartConfiguration } from '~/generated-metadata/graphql';
@@ -188,10 +189,7 @@ export const GraphWidgetPieChart = ({
<GraphWidgetChartContainer
ref={containerRef}
$isClickable={!hasNoData && isDefined(onSliceClick)}
- $cursorSelector={
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This value is a CSS selector for pie segments.
- 'svg g path'
- }
+ $cursorSelector={doNotTranslate('svg g path')}
onMouseLeave={handleSliceLeave}
>
<StyledPieChartWrapper preventHover={hasNoData}>
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetQueryCommon.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetQueryCommon.ts
index a546dc1831e..336d399823f 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetQueryCommon.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetQueryCommon.ts
@@ -8,6 +8,7 @@ import {
computeRecordGqlOperationFilter,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type AggregateChartConfiguration,
type BarChartConfiguration,
@@ -38,8 +39,7 @@ export const useGraphWidgetQueryCommon = ({
});
if (!isDefined(aggregateField)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Aggregate field not found');
+ throw new Error(doNotTranslate('Aggregate field not found'));
}
const { filterValueDependencies } = useFilterValueDependencies();
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertAggregateChartWidget.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertAggregateChartWidget.ts
index 302b7c61885..fbca4694637 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertAggregateChartWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertAggregateChartWidget.ts
@@ -1,6 +1,7 @@
import { isWidgetConfigurationOfType } from '@/side-panel/pages/page-layout/utils/isWidgetConfigurationOfType';
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type AggregateChartConfiguration } from '~/generated-metadata/graphql';
type AssertAggregateChartWidgetOrThrow = (
@@ -14,8 +15,7 @@ export const assertAggregateChartWidgetOrThrow: AssertAggregateChartWidgetOrThro
(widget: PageLayoutWidget) => {
assertIsDefinedOrThrow(
widget.objectMetadataId,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget objectMetadataId is required'),
+ new Error(doNotTranslate('Widget objectMetadataId is required')),
);
if (
@@ -25,8 +25,9 @@ export const assertAggregateChartWidgetOrThrow: AssertAggregateChartWidgetOrThro
)
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Expected AggregateChartConfiguration but got ${widget.configuration?.__typename}`,
+ doNotTranslate(
+ `Expected AggregateChartConfiguration but got ${widget.configuration?.__typename}`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertBarChartWidget.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertBarChartWidget.ts
index 734a8cffe7d..ec8d710594f 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertBarChartWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertBarChartWidget.ts
@@ -1,6 +1,7 @@
import { isWidgetConfigurationOfType } from '@/side-panel/pages/page-layout/utils/isWidgetConfigurationOfType';
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type BarChartConfiguration } from '~/generated-metadata/graphql';
type AssertBarChartWidgetOrThrow = (
@@ -15,16 +16,16 @@ export const assertBarChartWidgetOrThrow: AssertBarChartWidgetOrThrow = (
) => {
assertIsDefinedOrThrow(
widget.objectMetadataId,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget objectMetadataId is required'),
+ new Error(doNotTranslate('Widget objectMetadataId is required')),
);
if (
!isWidgetConfigurationOfType(widget.configuration, 'BarChartConfiguration')
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Expected BarChartConfiguration but got ${widget.configuration?.__typename}`,
+ doNotTranslate(
+ `Expected BarChartConfiguration but got ${widget.configuration?.__typename}`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertLineChartWidget.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertLineChartWidget.ts
index 5437758d05a..a18fc2f2c30 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertLineChartWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertLineChartWidget.ts
@@ -1,5 +1,6 @@
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type LineChartConfiguration } from '~/generated-metadata/graphql';
type AssertLineChartWidgetOrThrow = (
@@ -14,14 +15,14 @@ export const assertLineChartWidgetOrThrow: AssertLineChartWidgetOrThrow = (
) => {
assertIsDefinedOrThrow(
widget.objectMetadataId,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget objectMetadataId is required'),
+ new Error(doNotTranslate('Widget objectMetadataId is required')),
);
if (widget.configuration?.__typename !== 'LineChartConfiguration') {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Expected LineChartConfiguration but got ${widget.configuration?.__typename}`,
+ doNotTranslate(
+ `Expected LineChartConfiguration but got ${widget.configuration?.__typename}`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertPieChartWidget.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertPieChartWidget.ts
index a34a1f44bd6..7adcf58f754 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertPieChartWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/assertPieChartWidget.ts
@@ -1,6 +1,7 @@
import { isWidgetConfigurationOfType } from '@/side-panel/pages/page-layout/utils/isWidgetConfigurationOfType';
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type PieChartConfiguration } from '~/generated-metadata/graphql';
type AssertPieChartWidgetOrThrow = (
@@ -15,16 +16,16 @@ export const assertPieChartWidgetOrThrow: AssertPieChartWidgetOrThrow = (
) => {
assertIsDefinedOrThrow(
widget.objectMetadataId,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget objectMetadataId is required'),
+ new Error(doNotTranslate('Widget objectMetadataId is required')),
);
if (
!isWidgetConfigurationOfType(widget.configuration, 'PieChartConfiguration')
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Expected PieChartConfiguration but got ${widget.configuration?.__typename}`,
+ doNotTranslate(
+ `Expected PieChartConfiguration but got ${widget.configuration?.__typename}`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildFilterFromChartBucket.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildFilterFromChartBucket.ts
index 4d185f7377e..9e3cf435bfe 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildFilterFromChartBucket.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildFilterFromChartBucket.ts
@@ -18,6 +18,7 @@ import {
isFieldMetadataDateKind,
parseToPlainDateOrThrow,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type ChartFilter = {
fieldName: string;
@@ -76,15 +77,17 @@ export const buildFilterFromChartBucket = ({
if (shouldAssumeDayRangeFilter) {
if (!isNonEmptyString(timezone)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Timezone should be defined for date granularity group by day`,
+ doNotTranslate(
+ `Timezone should be defined for date granularity group by day`,
+ ),
);
}
if (!isDefined(firstDayOfTheWeek)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `First day of the week should be defined for date granularity group by day`,
+ doNotTranslate(
+ `First day of the week should be defined for date granularity group by day`,
+ ),
);
}
@@ -104,15 +107,17 @@ export const buildFilterFromChartBucket = ({
if (isTimeRangeDateGranularity(dateGranularity)) {
if (!isNonEmptyString(timezone)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Timezone should be defined for date granularity group by`,
+ doNotTranslate(
+ `Timezone should be defined for date granularity group by`,
+ ),
);
}
if (!isDefined(firstDayOfTheWeek)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `First day of the week should be defined for date granularity group by`,
+ doNotTranslate(
+ `First day of the week should be defined for date granularity group by`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildGroupByFieldObject.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildGroupByFieldObject.ts
index a81ca448d53..a9db65a4c38 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildGroupByFieldObject.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/buildGroupByFieldObject.ts
@@ -15,6 +15,7 @@ import {
isDefined,
isFieldMetadataDateKind,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const GRAPH_DEFAULT_DATE_GRANULARITY = ObjectRecordGroupByDateGranularity.DAY;
@@ -46,8 +47,7 @@ export const buildGroupByFieldObject = ({
if (isRelation) {
if (!isDefined(subFieldName)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This suffix forms a GraphQL field identifier.
- return { [`${field.name}Id`]: true };
+ return { [doNotTranslate(`${field.name}Id`)]: true };
}
const parts = subFieldName.split('.');
@@ -67,8 +67,9 @@ export const buildGroupByFieldObject = ({
if (shouldHaveTimeZone) {
if (timeZoneIsNotProvided) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Date order by should have a time zone.`);
+ throw new Error(
+ doNotTranslate(`Date order by should have a time zone.`),
+ );
} else {
return {
[field.name]: {
@@ -110,8 +111,9 @@ export const buildGroupByFieldObject = ({
if (isComposite) {
if (!isDefined(subFieldName)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Composite field ${field.name} requires a subfield to be specified`,
+ doNotTranslate(
+ `Composite field ${field.name} requires a subfield to be specified`,
+ ),
);
}
@@ -137,8 +139,9 @@ export const buildGroupByFieldObject = ({
if (shouldHaveTimeZone) {
if (timeZoneIsNotProvided) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Date order by should have a time zone.`);
+ throw new Error(
+ doNotTranslate(`Date order by should have a time zone.`),
+ );
} else {
result.timeZone = timeZone;
}
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/calculateGraphLabelStyles.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/calculateGraphLabelStyles.ts
index 9d806fc04bc..368343ea3d3 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/calculateGraphLabelStyles.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/calculateGraphLabelStyles.ts
@@ -1,4 +1,5 @@
import { type GraphLabelData } from '@/page-layout/widgets/graph/types/GraphLabelData';
+import { doNotTranslate } from 'twenty-shared/i18n';
type GraphLabelStyles = {
x: number;
@@ -21,8 +22,7 @@ export const calculateGraphLabelStyles = (
? -1
: 1;
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG translateX and translateY require these axis identifiers.
- const axis = isVerticalLayout ? 'Y' : 'X';
+ const axis = doNotTranslate(isVerticalLayout ? 'Y' : 'X');
const transformOffset = `translate${axis}(${offsetSign * offset}px)`;
const textAnchor = isVerticalLayout
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getColorScheme.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getColorScheme.ts
index 044c56396d3..b9b06528e79 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getColorScheme.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getColorScheme.ts
@@ -5,6 +5,7 @@ import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphCo
import { generateGroupColor } from '@/page-layout/widgets/graph/utils/generateGroupColor';
import { getColorSchemeByIndex } from '@/page-layout/widgets/graph/utils/getColorSchemeByIndex';
import { assertIsDefinedOrThrow, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getColorScheme = ({
registry,
@@ -23,8 +24,9 @@ export const getColorScheme = ({
assertIsDefinedOrThrow(
alphabeticalRank,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error(`Missing alphabetical rank for color key "${colorKey}"`),
+ new Error(
+ doNotTranslate(`Missing alphabetical rank for color key "${colorKey}"`),
+ ),
);
const normalizedColorName = isDefined(colorName)
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/hooks/useCurrentWidget.ts b/packages/twenty-front/src/modules/page-layout/widgets/hooks/useCurrentWidget.ts
index 6b56c91238e..ceea9947dc1 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/hooks/useCurrentWidget.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/hooks/useCurrentWidget.ts
@@ -1,12 +1,15 @@
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { useCurrentWidgetOrNull } from '@/page-layout/widgets/hooks/useCurrentWidgetOrNull';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCurrentWidget = (): PageLayoutWidget => {
const widget = useCurrentWidgetOrNull();
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- assertIsDefinedOrThrow(widget, new Error('Current widget is not defined'));
+ assertIsDefinedOrThrow(
+ widget,
+ new Error(doNotTranslate('Current widget is not defined')),
+ );
return widget;
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx b/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx
index 2ed3d5c3479..88a79fdff86 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/iframe/components/IframeWidget.tsx
@@ -5,6 +5,7 @@ import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSke
import { styled } from '@linaria/react';
import { useState } from 'react';
import { getSafeUrl, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { themeCssVariables } from 'twenty-ui/theme';
const StyledContainer = styled.div<{ $isEditMode: boolean }>`
@@ -61,8 +62,9 @@ export const IframeWidget = ({ widget }: IframeWidgetProps) => {
const configuration = widget.configuration;
if (!isDefined(configuration) || !('url' in configuration)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Invalid configuration for widget ${widget.id}`);
+ throw new Error(
+ doNotTranslate(`Invalid configuration for widget ${widget.id}`),
+ );
}
const url = configuration.url;
@@ -106,10 +108,9 @@ export const IframeWidget = ({ widget }: IframeWidgetProps) => {
title={title}
onLoad={handleIframeLoad}
onError={handleIframeError}
- sandbox={
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Browser sandbox permissions must use these exact tokens.
- 'allow-scripts allow-forms allow-popups allow-same-origin'
- }
+ sandbox={doNotTranslate(
+ 'allow-scripts allow-forms allow-popups allow-same-origin',
+ )}
allow="encrypted-media"
allowFullScreen
/>
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx
index 4d0c0267fa0..7045a2cc189 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx
+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx
@@ -2,6 +2,7 @@ import { styled } from '@linaria/react';
import { type BlockNoteColor } from '@/page-layout/widgets/standalone-rich-text/types/BlockNoteColor';
import { themeCssVariables, useTheme } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledColorIcon = styled.div<{
textColorValue: string;
backgroundColorValue: string;
@@ -72,10 +73,7 @@ export const DashboardColorIcon = ({
: 'transparent'
}
>
- {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The color swatch uses A as a sample glyph.
- 'A'
- }
+ {doNotTranslate('A')}
</StyledColorIcon>
);
};
diff --git a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/utils/getDashboardSlashMenu.ts b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/utils/getDashboardSlashMenu.ts
index 727b0ed5a1b..6f2a40b732b 100644
--- a/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/utils/getDashboardSlashMenu.ts
+++ b/packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/utils/getDashboardSlashMenu.ts
@@ -20,6 +20,7 @@ import {
IconTable,
IconTextSize,
} from 'twenty-ui/icon';
+import { doNotTranslate } from 'twenty-shared/i18n';
const Icons: Record<string, IconComponent> = {
'Heading 1': IconH1,
@@ -41,8 +42,12 @@ const Icons: Record<string, IconComponent> = {
Emoji: IconMoodSmile,
};
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- BlockNote item titles are upstream identifiers used to filter the menu.
-const EXCLUDED_BLOCK_TYPES = ['Image', 'Video', 'Audio', 'File'];
+const EXCLUDED_BLOCK_TYPES = doNotTranslate([
+ 'Image',
+ 'Video',
+ 'Audio',
+ 'File',
+]);
export const getDashboardSlashMenu = (
editor: typeof DASHBOARD_BLOCK_SCHEMA.BlockNoteEditor,
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/apollo/hooks/useApolloAdminClient.ts b/packages/twenty-front/src/modules/settings/admin-panel/apollo/hooks/useApolloAdminClient.ts
index f98cc6ada09..e172b316b70 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/apollo/hooks/useApolloAdminClient.ts
+++ b/packages/twenty-front/src/modules/settings/admin-panel/apollo/hooks/useApolloAdminClient.ts
@@ -2,6 +2,7 @@ import { useApolloClient } from '@apollo/client/react';
import { useContext } from 'react';
import { ApolloAdminClientContext } from '@/settings/admin-panel/apollo/contexts/ApolloAdminClientContext';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useApolloAdminClient = () => {
const apolloAdminClient = useContext(ApolloAdminClientContext);
@@ -12,8 +13,7 @@ export const useApolloAdminClient = () => {
}
if (!apolloAdminClient) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('ApolloAdminClient not found');
+ throw new Error(doNotTranslate('ApolloAdminClient not found'));
}
return apolloAdminClient;
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx b/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx
index 6dcfbc0b981..666a978f6d9 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/apps/components/SettingsAdminApps.tsx
@@ -17,6 +17,7 @@ import { isString } from '@sniptt/guards';
import { useState } from 'react';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { SearchInput } from 'twenty-ui/components/input';
import { Section } from 'twenty-ui/components/layout';
@@ -62,14 +63,18 @@ const SOURCE_TYPE_FILTER_OPTIONS: {
sourceType: ApplicationRegistrationSourceType;
label: string | MessageDescriptor;
}[] = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- NPM is the package ecosystem's name.
- { sourceType: ApplicationRegistrationSourceType.NPM, label: 'NPM' },
+ {
+ sourceType: ApplicationRegistrationSourceType.NPM,
+ label: doNotTranslate('NPM'),
+ },
{
sourceType: ApplicationRegistrationSourceType.TARBALL,
label: msg`Tarball`,
},
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- OAuth is a protocol name.
- { sourceType: ApplicationRegistrationSourceType.OAUTH_ONLY, label: 'OAuth' },
+ {
+ sourceType: ApplicationRegistrationSourceType.OAUTH_ONLY,
+ label: doNotTranslate('OAuth'),
+ },
{ sourceType: ApplicationRegistrationSourceType.LOCAL, label: msg`Local` },
];
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
index 83ba9845fe4..74b152df0f7 100644
--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/ConfigVariableDatabaseInput.tsx
@@ -9,6 +9,7 @@ import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { type ConfigVariableValue } from 'twenty-shared/types';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { Dropdown } from 'twenty-ui/components/navigation';
import { CodeEditor } from 'twenty-ui/components/code-editor';
import { themeCssVariables } from 'twenty-ui/theme';
@@ -56,10 +57,8 @@ export const ConfigVariableDatabaseInput = ({
: [];
const booleanOptions = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Show the exact configuration literal.
- { value: 'true', label: 'true' },
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Show the exact configuration literal.
- { value: 'false', label: 'false' },
+ { value: 'true', label: doNotTranslate('true') },
+ { value: 'false', label: doNotTranslate('false') },
];
const isValueSelected = (optionValue: string) => {
@@ -241,7 +240,9 @@ export const ConfigVariableDatabaseInput = ({
);
default:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new CustomError(`Unsupported type: ${type}`, 'UNSUPPORTED_TYPE');
+ throw new CustomError(
+ doNotTranslate(`Unsupported type: ${type}`),
+ 'UNSUPPORTED_TYPE',
+ );
}
};
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts
index 0240868fed5..32cf81ad1d8 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useBaseLicensedPriceByPlanKeyAndInterval.ts
@@ -4,6 +4,7 @@ import {
} from '~/generated-metadata/graphql';
import { useBaseProductByPlanKey } from '@/settings/billing/hooks/useBaseProductByPlanKey';
import { findSellablePriceForIntervalOrThrow } from '@/settings/billing/utils/findSellablePriceForIntervalOrThrow';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useBaseLicensedPriceByPlanKeyAndInterval = () => {
const { getBaseProductByPlanKey } = useBaseProductByPlanKey();
@@ -14,8 +15,8 @@ export const useBaseLicensedPriceByPlanKeyAndInterval = () => {
) => {
const baseProduct = getBaseProductByPlanKey(planKey);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- if (!baseProduct.prices) throw new Error('Product prices is undefined.');
+ if (!baseProduct.prices)
+ throw new Error(doNotTranslate('Product prices is undefined.'));
return findSellablePriceForIntervalOrThrow(baseProduct.prices, interval);
};
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/useBillingSubscriptionChangeWording.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useBillingSubscriptionChangeWording.ts
index 59944cf20c0..809106ae7a7 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/useBillingSubscriptionChangeWording.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useBillingSubscriptionChangeWording.ts
@@ -18,6 +18,7 @@ import {
assertUnreachable,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type BillingPlanKey,
SubscriptionInterval,
@@ -98,16 +99,13 @@ export const useBillingSubscriptionChangeWording = () => {
return 'AFTER_TRIAL';
}
- // ChargeTiming is a stable internal discriminant, not display text.
- // oxlint-disable lingui/no-unlocalized-strings
return isBillingSubscriptionChangeImmediate({
change,
currentPlan,
subscriptionStatus,
})
- ? 'NOW'
+ ? doNotTranslate('NOW')
: 'SCHEDULED';
- // oxlint-enable lingui/no-unlocalized-strings
};
const getSwitchPlanLeadSentence = (
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.ts
index e917f577707..ea184cfddee 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useBillingWording.ts
@@ -9,6 +9,7 @@ import {
capitalize,
isDefined,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
import { useLingui } from '@lingui/react/macro';
import { beautifyExactDate } from '~/utils/date-utils';
@@ -44,8 +45,9 @@ export const useBillingWording = () => {
const getBeautifiedRenewDate = () => {
assertIsDefinedOrThrow(
currentBillingSubscription.currentPeriodEnd,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- new Error(`No renew date defined for current subscription.`),
+ new Error(
+ doNotTranslate(`No renew date defined for current subscription.`),
+ ),
);
return beautifyExactDate(
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentPlan.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentPlan.ts
index de24cc9f5d2..d2d226b3daf 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentPlan.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useCurrentPlan.ts
@@ -1,4 +1,5 @@
import { assertIsDefinedOrThrow, findOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { usePlans } from './usePlans';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
import { getSubscriptionPlanKey } from '@/settings/billing/utils/getSubscriptionPlanKey';
@@ -18,8 +19,7 @@ export const useCurrentPlan = () => {
const currentPlan = findOrThrow(
listPlans(),
(plan) => plan.planKey === currentPlanKey,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- new Error('Current plan not found'),
+ new Error(doNotTranslate('Current plan not found')),
);
return { currentPlan };
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/useGetResourceCreditUsage.ts b/packages/twenty-front/src/modules/settings/billing/hooks/useGetResourceCreditUsage.ts
index fd3ac7b5fa4..8a115afeddd 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/useGetResourceCreditUsage.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/useGetResourceCreditUsage.ts
@@ -1,5 +1,6 @@
import { useQuery } from '@apollo/client/react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
BillingProductKey,
GetResourceCreditUsageDocument,
@@ -18,8 +19,7 @@ export const useGetResourceCreditUsage = () => {
const getResourceCreditUsage = () => {
if (!data) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('getResourceCreditUsage was not loaded');
+ throw new Error(doNotTranslate('getResourceCreditUsage was not loaded'));
}
const usage = data.getResourceCreditUsage.find(
@@ -28,8 +28,7 @@ export const useGetResourceCreditUsage = () => {
);
if (!isDefined(usage)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('RESOURCE_CREDIT usage not found');
+ throw new Error(doNotTranslate('RESOURCE_CREDIT usage not found'));
}
return usage;
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPlanKey.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPlanKey.ts
index 7089ce052b2..244954576a1 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPlanKey.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/usePlanByPlanKey.ts
@@ -1,5 +1,6 @@
import { type BillingPlanKey } from '~/generated-metadata/graphql';
import { findOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { usePlans } from './usePlans';
export const usePlanByPlanKey = () => {
@@ -9,8 +10,7 @@ export const usePlanByPlanKey = () => {
findOrThrow(
listPlans(),
(plan) => plan.planKey === planKey,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- new Error(`Plan ${planKey} not found`),
+ new Error(doNotTranslate(`Plan ${planKey} not found`)),
);
return { getPlanByPlanKey };
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/usePlans.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePlans.ts
index 005f93e1d19..8e753234c17 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/usePlans.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/usePlans.ts
@@ -1,6 +1,7 @@
import { useQuery } from '@apollo/client/react';
import { ListPlansDocument } from '~/generated-metadata/graphql';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type UsePlansOptions = {
skip?: boolean;
@@ -14,8 +15,7 @@ export const usePlans = (options?: UsePlansOptions) => {
const isPlansLoaded = isDefined(data?.listPlans);
const listPlans = () => {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- if (!data) throw new Error('plans is undefined');
+ if (!data) throw new Error(doNotTranslate('plans is undefined'));
return data.listPlans;
};
diff --git a/packages/twenty-front/src/modules/settings/billing/hooks/usePriceAndBillingUsageByPriceId.ts b/packages/twenty-front/src/modules/settings/billing/hooks/usePriceAndBillingUsageByPriceId.ts
index 093edece30e..a462a5ca033 100644
--- a/packages/twenty-front/src/modules/settings/billing/hooks/usePriceAndBillingUsageByPriceId.ts
+++ b/packages/twenty-front/src/modules/settings/billing/hooks/usePriceAndBillingUsageByPriceId.ts
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type BillingPriceLicensed,
type BillingPriceMetered,
@@ -37,8 +38,7 @@ export const usePriceAndBillingUsageByPriceId = () => {
if (isDefined(metered))
return { price: metered, billingUsage: BillingUsageType.METERED };
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Price not found');
+ throw new Error(doNotTranslate('Price not found'));
};
return { getPriceAndBillingUsageByPriceId };
diff --git a/packages/twenty-front/src/modules/settings/billing/utils/findSellableBaseProductOrThrow.ts b/packages/twenty-front/src/modules/settings/billing/utils/findSellableBaseProductOrThrow.ts
index 81e5d625649..6b1d4ccc686 100644
--- a/packages/twenty-front/src/modules/settings/billing/utils/findSellableBaseProductOrThrow.ts
+++ b/packages/twenty-front/src/modules/settings/billing/utils/findSellableBaseProductOrThrow.ts
@@ -1,6 +1,7 @@
import { BillingProductKey } from '~/generated-metadata/graphql';
import { isSellableBillingProduct } from '@/settings/billing/utils/isSellableBillingProduct';
+import { doNotTranslate } from 'twenty-shared/i18n';
type SellableBaseProductCandidate = {
metadata: { productKey: BillingProductKey; isLegacy?: string | null };
@@ -20,8 +21,9 @@ export const findSellableBaseProductOrThrow = <
if (sellableBaseProducts.length !== 1) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- `Expected a single sellable base product, found ${sellableBaseProducts.length}`,
+ doNotTranslate(
+ `Expected a single sellable base product, found ${sellableBaseProducts.length}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/settings/billing/utils/findSellablePriceForIntervalOrThrow.ts b/packages/twenty-front/src/modules/settings/billing/utils/findSellablePriceForIntervalOrThrow.ts
index be9d64bf703..0d16dceb390 100644
--- a/packages/twenty-front/src/modules/settings/billing/utils/findSellablePriceForIntervalOrThrow.ts
+++ b/packages/twenty-front/src/modules/settings/billing/utils/findSellablePriceForIntervalOrThrow.ts
@@ -1,6 +1,7 @@
import { type SubscriptionInterval } from '~/generated-metadata/graphql';
import { isSellableBillingPrice } from '@/settings/billing/utils/isSellableBillingPrice';
+import { doNotTranslate } from 'twenty-shared/i18n';
type SellablePriceCandidate = {
recurringInterval: SubscriptionInterval;
@@ -22,10 +23,11 @@ export const findSellablePriceForIntervalOrThrow = <
if (sellablePrices.length !== 1) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- `Expected a single sellable ${interval} price, found ${sellablePrices.length}: ${sellablePrices
- .map((price) => price.stripePriceId)
- .join(', ')}`,
+ doNotTranslate(
+ `Expected a single sellable ${interval} price, found ${sellablePrices.length}: ${sellablePrices
+ .map((price) => price.stripePriceId)
+ .join(', ')}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/settings/billing/utils/getComparedBillingPlanKeysOrThrow.ts b/packages/twenty-front/src/modules/settings/billing/utils/getComparedBillingPlanKeysOrThrow.ts
index 3819b2a74a4..0da8c596665 100644
--- a/packages/twenty-front/src/modules/settings/billing/utils/getComparedBillingPlanKeysOrThrow.ts
+++ b/packages/twenty-front/src/modules/settings/billing/utils/getComparedBillingPlanKeysOrThrow.ts
@@ -1,5 +1,6 @@
import { type SettingsBillingComparedPlanKeys } from '@/settings/billing/types/SettingsBillingPlanComparison';
import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type BillingPlan } from '~/generated-metadata/graphql';
export const getComparedBillingPlanKeysOrThrow = (
@@ -14,8 +15,9 @@ export const getComparedBillingPlanKeysOrThrow = (
!isDefined(secondPlanKey) ||
isNonEmptyArray(otherPlanKeys)
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('The plan comparison expects exactly two plans on sale');
+ throw new Error(
+ doNotTranslate('The plan comparison expects exactly two plans on sale'),
+ );
}
return [firstPlanKey, secondPlanKey];
diff --git a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsCompositeFieldTypeConfigs.ts b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsCompositeFieldTypeConfigs.ts
index 173a7ac3b06..8538aeeac84 100644
--- a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsCompositeFieldTypeConfigs.ts
+++ b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsCompositeFieldTypeConfigs.ts
@@ -29,6 +29,7 @@ import {
IllustrationIconUser,
} from 'twenty-ui/icon';
import { FieldMetadataType } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
//TODO : isIncludedInUniqueConstraint refactor - https://github.com/twentyhq/core-team-issues/issues/1097
@@ -50,8 +51,6 @@ type SettingsCompositeFieldTypeConfigArray = Record<
SettingsCompositeFieldTypeConfig<any>
>;
-// Example records are fixed samples; visible field labels are MessageDescriptors.
-// oxlint-disable lingui/no-unlocalized-strings
export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
[FieldMetadataType.CURRENCY]: {
label: msg({ message: `Currency`, context: 'Field type' }),
@@ -80,7 +79,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
amountMicros: 2000000000,
currencyCode: CurrencyCode.USD,
@@ -93,7 +92,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
amountMicros: 100000000,
currencyCode: CurrencyCode.AED,
},
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldCurrencyValue>,
[FieldMetadataType.EMAILS]: {
@@ -123,7 +122,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
primaryEmail: '[email protected]',
additionalEmails: [
@@ -140,7 +139,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
primaryEmail: '[email protected]',
additionalEmails: ['[email protected]'],
},
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldEmailsValue>,
[FieldMetadataType.LINKS]: {
@@ -181,7 +180,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
primaryLinkUrl: 'twenty.com',
primaryLinkLabel: '',
@@ -197,7 +196,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
primaryLinkLabel: '',
secondaryLinks: [],
},
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldLinksValue>,
[FieldMetadataType.PHONES]: {
@@ -249,7 +248,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
primaryPhoneCallingCode: '+33',
primaryPhoneCountryCode: 'FR',
@@ -273,7 +272,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
primaryPhoneNumber: '123456789',
additionalPhones: [],
},
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldPhonesValue>,
[FieldMetadataType.FULL_NAME]: {
@@ -303,11 +302,11 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{ firstName: 'John', lastName: 'Doe' },
{ firstName: 'Jane', lastName: 'Doe' },
{ firstName: 'John', lastName: 'Smith' },
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldFullNameValue>,
[FieldMetadataType.ADDRESS]: {
@@ -403,7 +402,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
addressStreet1: '456 Oak Street',
addressStreet2: '',
@@ -434,7 +433,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
addressLat: 40.7128,
addressLng: -74.006,
},
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsCompositeFieldTypeConfig<FieldAddressValue>,
[FieldMetadataType.ACTOR]: {
@@ -485,7 +484,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
source: 'IMPORT',
name: 'name',
@@ -504,7 +503,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
workspaceMemberId: 'id',
context: {},
},
- ],
+ ]),
} as const satisfies SettingsCompositeFieldTypeConfig<FieldActorValue>,
[FieldMetadataType.RICH_TEXT]: {
label: msg({ message: `Rich Text`, context: 'Field type' }),
@@ -534,7 +533,7 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
isIncludedInUniqueConstraint: false,
},
],
- exampleValues: [
+ exampleValues: doNotTranslate([
{
blocknote: '[{"type":"heading","content":"Hello"}]',
markdown: '# Hello',
@@ -547,7 +546,6 @@ export const SETTINGS_COMPOSITE_FIELD_TYPE_CONFIGS = {
blocknote: '[{"type":"heading","content":"Hello Again"}]',
markdown: '# Hello Again',
},
- ],
+ ]),
} as const satisfies SettingsCompositeFieldTypeConfig<FieldRichTextValue>,
} as const satisfies SettingsCompositeFieldTypeConfigArray;
-// oxlint-enable lingui/no-unlocalized-strings
diff --git a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsFieldTypeCategories.ts b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsFieldTypeCategories.ts
index db32257602e..603974c94ae 100644
--- a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsFieldTypeCategories.ts
+++ b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsFieldTypeCategories.ts
@@ -1,10 +1,5 @@
import { type SettingsFieldTypeCategoryType } from '@/settings/data-model/types/SettingsFieldTypeCategoryType';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// These values are stable category keys; the selector renders their translated labels.
-// oxlint-disable lingui/no-unlocalized-strings
-export const SETTINGS_FIELD_TYPE_CATEGORIES: SettingsFieldTypeCategoryType[] = [
- 'Basic',
- 'Relation',
- 'Advanced',
-];
-// oxlint-enable lingui/no-unlocalized-strings
+export const SETTINGS_FIELD_TYPE_CATEGORIES: SettingsFieldTypeCategoryType[] =
+ doNotTranslate(['Basic', 'Relation', 'Advanced']);
diff --git a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts
index 77bee955f9a..0c6756feff4 100644
--- a/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts
+++ b/packages/twenty-front/src/modules/settings/data-model/constants/SettingsNonCompositeFieldTypeConfigs.ts
@@ -35,6 +35,7 @@ import {
type IconComponent,
} from 'twenty-ui/icon';
import { FieldMetadataType } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
DEFAULT_DATE_VALUE.setFullYear(DEFAULT_DATE_VALUE.getFullYear() + 2);
@@ -51,60 +52,58 @@ type SettingsNonCompositeFieldTypeConfigArray = Record<
>;
// TODO: can we derive this from backend definitions ?
-// Example records are fixed samples; visible field labels are MessageDescriptors.
-// oxlint-disable lingui/no-unlocalized-strings
export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFieldTypeConfigArray =
{
[FieldMetadataType.UUID]: {
label: msg({ message: `Unique ID`, context: 'Field type' }),
Icon: IllustrationIconUid,
- exampleValues: [
+ exampleValues: doNotTranslate([
'00000000-0000-4000-8000-000000000000',
'00000000-0000-4000-8000-000000000001',
'00000000-0000-4000-8000-000000000003',
- ],
+ ]),
category: 'Advanced',
} as const satisfies SettingsFieldTypeConfig<FieldUUidValue>,
[FieldMetadataType.TEXT]: {
label: msg({ message: `Text`, context: 'Field type' }),
Icon: IllustrationIconText,
- exampleValues: [
+ exampleValues: doNotTranslate([
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum magna enim, dapibus non enim in, lacinia faucibus nunc. Sed interdum ante sed felis facilisis, eget ultricies neque molestie. Mauris auctor, justo eu volutpat cursus, libero erat tempus nulla, non sodales lorem lacus a est.',
'Vestibulum magna enim, dapibus non enim in, lacinia faucibus nunc. Sed interdum ante sed felis facilisis, eget ultricies neque molestie. Mauris auctor, justo eu volutpat cursus, libero erat tempus nulla, non sodales lorem lacus a est.',
'Sed interdum ante sed felis facilisis, eget ultricies neque molestie. Mauris auctor, justo eu volutpat cursus, libero erat tempus nulla, non sodales lorem lacus a est.',
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldTextValue>,
[FieldMetadataType.NUMBER]: {
label: msg({ message: `Number`, context: 'Field type' }),
Icon: IllustrationIconNumbers,
- exampleValues: [2000, 3000, 4000],
+ exampleValues: doNotTranslate([2000, 3000, 4000]),
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldNumberValue>,
[FieldMetadataType.BOOLEAN]: {
label: msg({ message: `True/False`, context: 'Field type' }),
Icon: IllustrationIconToggle,
- exampleValues: [true, false, true],
+ exampleValues: doNotTranslate([true, false, true]),
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldBooleanValue>,
[FieldMetadataType.DATE_TIME]: {
label: msg({ message: `Date and Time`, context: 'Field type' }),
Icon: IllustrationIconCalendarTime,
- exampleValues: [
+ exampleValues: doNotTranslate([
DEFAULT_DATE_VALUE.toISOString(),
'2025-06-10T12:01:00.000Z',
'2018-07-14T12:02:00.000Z',
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldDateTimeValue>,
[FieldMetadataType.DATE]: {
label: msg({ message: `Date`, context: 'Field type' }),
Icon: IllustrationIconCalendarEvent,
- exampleValues: [
+ exampleValues: doNotTranslate([
DEFAULT_DATE_VALUE.toISOString(),
'2025-06-10T00:00:00.000Z',
'2018-07-14T00:00:00.000Z',
- ],
+ ]),
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldDateValue>,
[FieldMetadataType.SELECT]: {
@@ -130,26 +129,30 @@ export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFiel
[FieldMetadataType.RATING]: {
label: msg({ message: `Rating`, context: 'Field type' }),
Icon: IllustrationIconStar,
- exampleValues: ['RATING_3', 'RATING_4', 'RATING_5'],
+ exampleValues: doNotTranslate(['RATING_3', 'RATING_4', 'RATING_5']),
category: 'Basic',
} as const satisfies SettingsFieldTypeConfig<FieldRatingValue>,
[FieldMetadataType.RAW_JSON]: {
label: msg({ message: `JSON`, context: 'Field type' }),
Icon: IllustrationIconJson,
- exampleValues: [{ key: 'value1' }, { key: 'value2', key2: 'value2' }, {}],
+ exampleValues: doNotTranslate([
+ { key: 'value1' },
+ { key: 'value2', key2: 'value2' },
+ {},
+ ]),
category: 'Advanced',
} as const satisfies SettingsFieldTypeConfig<FieldJsonValue>,
[FieldMetadataType.ARRAY]: {
label: msg({ message: `Array`, context: 'Field type' }),
Icon: IllustrationIconArray,
category: 'Advanced',
- exampleValues: [['value1', 'value2'], ['value3'], []],
+ exampleValues: doNotTranslate([['value1', 'value2'], ['value3'], []]),
} as const satisfies SettingsFieldTypeConfig<FieldArrayValue>,
[FieldMetadataType.FILES]: {
label: msg({ message: `Files`, context: 'Field type' }),
Icon: IllustrationIconFile,
category: 'Basic',
- exampleValues: [
+ exampleValues: doNotTranslate([
[
{
fileId: 'file-1',
@@ -170,7 +173,6 @@ export const SETTINGS_NON_COMPOSITE_FIELD_TYPE_CONFIGS: SettingsNonCompositeFiel
},
],
[],
- ],
+ ]),
} as const satisfies SettingsFieldTypeConfig<FieldFilesValue[]>,
};
-// oxlint-enable lingui/no-unlocalized-strings
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationFormCard.tsx
index 3ba7a4977a4..facecfc47bc 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationFormCard.tsx
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationFormCard.tsx
@@ -14,6 +14,7 @@ import { SettingsDataModelRelationFieldPreviewSubWidget } from '@/settings/data-
import { useLingui } from '@lingui/react/macro';
import { useIsMobile } from 'twenty-ui/utilities';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';
import { type SettingsDataModelFieldEditFormValues } from '@/settings/data-model/types/SettingsDataModelFieldEditFormValues';
@@ -42,8 +43,7 @@ export const SettingsDataModelFieldRelationFormCard = ({
);
if (!sourceObjectMetadataItem) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Object not found.');
+ throw new Error(doNotTranslate('Object not found.'));
}
const relationObjectMetadataIds: string[] = watch(
diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/hooks/useRelationSettingsFormInitialTargetObjectMetadatas.ts b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/hooks/useRelationSettingsFormInitialTargetObjectMetadatas.ts
index cb94ed87728..304061baf72 100644
--- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/hooks/useRelationSettingsFormInitialTargetObjectMetadatas.ts
+++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/morph-relation/hooks/useRelationSettingsFormInitialTargetObjectMetadatas.ts
@@ -5,6 +5,7 @@ import { isAdvancedRelationTargetObjectMetadata } from '@/object-metadata/utils/
import { isObjectMetadataEligibleAsRelationTarget } from '@/object-metadata/utils/isObjectMetadataEligibleAsRelationTarget';
import { fieldMetadataItemHasMorphRelations } from '@/settings/data-model/fields/forms/morph-relation/utils/fieldMetadataItemHasMorphRelations';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useRelationSettingsFormInitialTargetObjectMetadatas = ({
sourceObjectMetadataId,
@@ -60,8 +61,9 @@ export const useRelationSettingsFormInitialTargetObjectMetadatas = ({
const firstInitialObjectCandidate = availableItems[0];
if (!isDefined(firstInitialObjectCandidate)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- 'Relation Form initialization error: invariant violated – no valid object available for relation (this should never happen).',
+ doNotTranslate(
+ 'Relation Form initialization error: invariant violated – no valid object available for relation (this should never happen).',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingsDomainRecords.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsDomainRecords.tsx
index 1a4b46a3b04..04c1e6ebf96 100644
--- a/packages/twenty-front/src/modules/settings/domains/components/SettingsDomainRecords.tsx
+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsDomainRecords.tsx
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
import { SettingsDnsRecordsTable } from '@/settings/components/SettingsDnsRecordsTable';
import { t } from '@lingui/core/macro';
@@ -17,13 +18,16 @@ export const SettingsDomainRecords = ({
}) => {
const currentWorkspace = useAtomStateValue(currentWorkspaceState);
- // These names are only used in developer errors and keep their fingerprints stable.
- // oxlint-disable lingui/no-unlocalized-strings
const rowsDefinitions = [
- { name: 'Domain Setup', validationType: 'redirection' as const },
- { name: 'Secure Connection', validationType: 'ssl' as const },
+ {
+ name: doNotTranslate('Domain Setup'),
+ validationType: 'redirection' as const,
+ },
+ {
+ name: doNotTranslate('Secure Connection'),
+ validationType: 'ssl' as const,
+ },
];
- // oxlint-enable lingui/no-unlocalized-strings
const defaultValues: { status: string; statusColor: ThemeColor } =
currentWorkspace?.customDomain
@@ -44,8 +48,7 @@ export const SettingsDomainRecords = ({
);
if (!record) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error(`Record ${row.name} not found`);
+ throw new Error(doNotTranslate(`Record ${row.name} not found`));
}
return {
diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx
index 3d469f8538d..d181731c5fd 100644
--- a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx
+++ b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogResultsTable.tsx
@@ -83,7 +83,6 @@ const buildGridTemplateColumns = (
const isLastColumn = index === columns.length - 1;
const width = widths[col.id] ?? col.defaultWidth;
- // oxlint-disable-next-line lingui/no-unlocalized-strings
return isLastColumn ? `minmax(${width}px, 1fr)` : `${width}px`;
})
.join(' ');
diff --git a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionCodeEditor.tsx b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionCodeEditor.tsx
index 97dc2f1e43e..9244c87d472 100644
--- a/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionCodeEditor.tsx
+++ b/packages/twenty-front/src/modules/settings/logic-functions/components/SettingsLogicFunctionCodeEditor.tsx
@@ -8,6 +8,7 @@ import { AutoTypings } from 'monaco-editor-auto-typings';
import { useState } from 'react';
import { useParams } from 'react-router-dom';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
CodeEditor,
type CodeEditorProps,
@@ -84,12 +85,9 @@ export const SettingsLogicFunctionCodeEditor = ({
if (isDefined(applicationVariables)) {
const envTypeDefinitions = Object.keys(applicationVariables)
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- .map((key) => `${key}: string;`)
+ .map((key) => doNotTranslate(`${key}: string;`))
.join('\n');
- // This is TypeScript syntax injected into the editor, not prose.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const applicationVariableDefinition = `
+ const applicationVariableDefinition = doNotTranslate(`
declare namespace NodeJS {
interface ProcessEnv {
${envTypeDefinitions}
@@ -99,7 +97,7 @@ export const SettingsLogicFunctionCodeEditor = ({
declare const process: {
env: NodeJS.ProcessEnv;
};
- `;
+ `);
monaco.languages.typescript.typescriptDefaults.setExtraLibs([
{
diff --git a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx
index 44ffe286833..8b3754f9f9c 100644
--- a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx
+++ b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx
@@ -11,6 +11,7 @@ import { useUpdateWorkspaceMemberSettings } from '@/workspace-member/hooks/useUp
import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
import { themeCssVariables } from 'twenty-ui/theme';
import { logError } from '~/utils/logError';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledComboInputContainer = styled.div`
display: flex;
@@ -42,8 +43,7 @@ export const NameFields = ({ autoSave = true }: NameFieldsProps) => {
const debouncedUpdate = useDebouncedCallback(async () => {
try {
if (!currentWorkspaceMember?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
if (autoSave) {
diff --git a/packages/twenty-front/src/modules/settings/profile/devices/utils/parseUserAgentDescription.ts b/packages/twenty-front/src/modules/settings/profile/devices/utils/parseUserAgentDescription.ts
index dd0acccd2c8..957b13b1eeb 100644
--- a/packages/twenty-front/src/modules/settings/profile/devices/utils/parseUserAgentDescription.ts
+++ b/packages/twenty-front/src/modules/settings/profile/devices/utils/parseUserAgentDescription.ts
@@ -1,7 +1,5 @@
import { isNonEmptyString } from '@sniptt/guards';
-
-// Browser and operating system names are vendor names extracted from user agents.
-// oxlint-disable lingui/no-unlocalized-strings
+import { doNotTranslate } from 'twenty-shared/i18n';
type UserAgentMatcher = {
label: string;
@@ -9,23 +7,23 @@ type UserAgentMatcher = {
};
// Order matters: Edge and Opera user agents contain "Chrome", and Chrome's contains "Safari"
-const BROWSER_MATCHERS: UserAgentMatcher[] = [
+const BROWSER_MATCHERS: UserAgentMatcher[] = doNotTranslate([
{ label: 'Edge', pattern: /Edg(e|A|iOS)?\// },
{ label: 'Opera', pattern: /(OPR|Opera)\// },
{ label: 'Samsung Internet', pattern: /SamsungBrowser\// },
{ label: 'Firefox', pattern: /(Firefox|FxiOS)\// },
{ label: 'Chrome', pattern: /(Chrome|CriOS)\// },
{ label: 'Safari', pattern: /Safari\// },
-];
+]);
-const OPERATING_SYSTEM_MATCHERS: UserAgentMatcher[] = [
+const OPERATING_SYSTEM_MATCHERS: UserAgentMatcher[] = doNotTranslate([
{ label: 'Android', pattern: /Android/ },
{ label: 'iOS', pattern: /(iPhone|iPad|iPod)/ },
{ label: 'Windows', pattern: /Windows/ },
{ label: 'macOS', pattern: /Mac OS X|Macintosh/ },
{ label: 'Chrome OS', pattern: /CrOS/ },
{ label: 'Linux', pattern: /Linux/ },
-];
+]);
export const parseUserAgentDescription = (
userAgent: string | null | undefined,
@@ -42,4 +40,3 @@ export const parseUserAgentDescription = (
)?.label,
};
};
-// oxlint-enable lingui/no-unlocalized-strings
diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx
index 4f6a8717454..84a881219a9 100644
--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx
+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx
@@ -28,6 +28,7 @@ import { type PartialWorkspaceMember } from '@/settings/roles/types/RoleWithPart
import { ROLE_ASSIGNMENT_CONFIRMATION_MODAL_ID } from '@/settings/roles/role-assignment/constants/RoleAssignmentConfirmationModalId';
import { ROLE_TARGET_CONFIG } from '@/settings/roles/role-assignment/constants/RoleTargetConfig';
import { buildRoleMaps } from '@/settings/roles/role-assignment/utils/buildRoleMaps';
+import { doNotTranslate } from 'twenty-shared/i18n';
type SettingsRoleAssignmentProps = {
roleId: string;
@@ -124,8 +125,7 @@ export const SettingsRoleAssignment = ({
);
if (!member) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Workspace member not found');
+ throw new Error(doNotTranslate('Workspace member not found'));
}
updateWorkspaceMemberRoleDraftState({
@@ -145,8 +145,7 @@ export const SettingsRoleAssignment = ({
);
if (!agent) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Agent not found');
+ throw new Error(doNotTranslate('Agent not found'));
}
updateAgentRoleDraftState({
@@ -160,8 +159,7 @@ export const SettingsRoleAssignment = ({
);
if (!apiKeyData) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('API key not found');
+ throw new Error(doNotTranslate('API key not found'));
}
updateApiKeyRoleDraftState({
diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/hooks/useRecordLevelPermissionFilterActions.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/hooks/useRecordLevelPermissionFilterActions.ts
index 148573246b5..aa592d37d3c 100644
--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/hooks/useRecordLevelPermissionFilterActions.ts
+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/hooks/useRecordLevelPermissionFilterActions.ts
@@ -6,6 +6,7 @@ import {
CoreObjectNameSingular,
} from 'twenty-shared/types';
import { getFilterTypeFromFieldType, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import { availableFieldMetadataItemsForFilterFamilySelector } from '@/object-metadata/states/availableFieldMetadataItemsForFilterFamilySelector';
@@ -118,8 +119,7 @@ export const useRecordLevelPermissionFilterActions = ({
const defaultFieldMetadataItemForRLS = getDefaultFieldMetadataItemForRLS();
if (!isDefined(defaultFieldMetadataItemForRLS)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Missing default filter definition');
+ throw new Error(doNotTranslate('Missing default filter definition'));
}
const { newRecordFilter } = createEmptyRecordFilterFromFieldMetadataItem(
@@ -136,8 +136,9 @@ export const useRecordLevelPermissionFilterActions = ({
const defaultFieldMetadataItemForRLS = getDefaultFieldMetadataItemForRLS();
if (!isDefined(defaultFieldMetadataItemForRLS)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Missing default field metadata item for filter');
+ throw new Error(
+ doNotTranslate('Missing default field metadata item for filter'),
+ );
}
const filterType = getFilterTypeFromFieldType(
diff --git a/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx b/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx
index 4fc6bea52f5..97d2ab95389 100644
--- a/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/security/components/TwoFactorAuthenticationSwitch.tsx
@@ -8,6 +8,7 @@ import { t } from '@lingui/core/macro';
import { useToast } from 'twenty-ui/components/feedback';
import { IconLifebuoy } from 'twenty-ui/icon';
import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const TwoFactorAuthenticationSwitch = () => {
const { enqueueToast } = useToast();
@@ -19,8 +20,7 @@ export const TwoFactorAuthenticationSwitch = () => {
const handleChange = async () => {
if (!currentWorkspace?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
const newEnforceValue = !currentWorkspace.isTwoFactorAuthenticationEnforced;
diff --git a/packages/twenty-front/src/modules/settings/security/hooks/useCreateSsoIdentityProvider.ts b/packages/twenty-front/src/modules/settings/security/hooks/useCreateSsoIdentityProvider.ts
index a2b8dc0fd97..33cb9cbb15c 100644
--- a/packages/twenty-front/src/modules/settings/security/hooks/useCreateSsoIdentityProvider.ts
+++ b/packages/twenty-front/src/modules/settings/security/hooks/useCreateSsoIdentityProvider.ts
@@ -9,6 +9,7 @@ import {
CreateOidcIdentityProviderDocument,
CreateSamlIdentityProviderDocument,
} from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCreateSsoIdentityProvider = () => {
const [createOidcIdentityProviderMutation] = useMutation(
@@ -56,8 +57,7 @@ export const useCreateSsoIdentityProvider = () => {
},
});
} else {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Invalid IdpType');
+ throw new Error(doNotTranslate('Invalid IdpType'));
}
};
diff --git a/packages/twenty-front/src/modules/settings/translations/hooks/useMetadataTranslations.ts b/packages/twenty-front/src/modules/settings/translations/hooks/useMetadataTranslations.ts
index 48ba9f14449..048855e65a0 100644
--- a/packages/twenty-front/src/modules/settings/translations/hooks/useMetadataTranslations.ts
+++ b/packages/twenty-front/src/modules/settings/translations/hooks/useMetadataTranslations.ts
@@ -3,6 +3,7 @@ import { useUpdateOneFieldMetadataItem } from '@/object-metadata/hooks/useUpdate
import { useUpdateOneObjectMetadataItem } from '@/object-metadata/hooks/useUpdateOneObjectMetadataItem';
import { type MetadataTranslationRowValue } from '@/settings/translations/types/MetadataTranslationRowValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type MetadataTranslationsInput,
type MetadataTranslationsQuery,
@@ -48,8 +49,9 @@ export const useMetadataTranslations = (
} else {
if (!isDefined(row.objectMetadataId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- 'Cannot save a field translation without its objectMetadataId',
+ doNotTranslate(
+ 'Cannot save a field translation without its objectMetadataId',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationSetupForSettingsEffect.tsx b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationSetupForSettingsEffect.tsx
index 71d28a0d3d0..38ba2855c18 100644
--- a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationSetupForSettingsEffect.tsx
+++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationSetupForSettingsEffect.tsx
@@ -7,6 +7,7 @@ import { useMutation } from '@apollo/client/react';
import { useLingui } from '@lingui/react/macro';
import { useEffect } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { InitiateOtpProvisioningForAuthenticatedUserDocument } from '~/generated-metadata/graphql';
@@ -35,8 +36,9 @@ export const TwoFactorAuthenticationSetupForSettingsEffect = () => {
!initiateOTPProvisioningResult.data
?.initiateOTPProvisioningForAuthenticatedUser.uri
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('No URI returned from OTP provisioning');
+ throw new Error(
+ doNotTranslate('No URI returned from OTP provisioning'),
+ );
}
setQrCode(
diff --git a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx
index feea0442c93..d2bad25f69c 100644
--- a/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx
+++ b/packages/twenty-front/src/modules/settings/two-factor-authentication/components/TwoFactorAuthenticationVerificationCodeSlot.tsx
@@ -1,6 +1,7 @@
import { styled } from '@linaria/react';
import { type SlotProps } from 'input-otp';
import { themeCssVariables } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledSlot = styled.div<{ isActive: boolean }>`
align-items: center;
@@ -78,9 +79,9 @@ export const TwoFactorAuthenticationVerificationCodeSlot = ({
{char ? (
<StyledInputChar>{char}</StyledInputChar>
) : (
- // The fallback is a visual slot glyph rather than copy.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- <StyledPlaceholderChar>{placeholderChar ?? 'X'}</StyledPlaceholderChar>
+ <StyledPlaceholderChar>
+ {placeholderChar ?? doNotTranslate('X')}
+ </StyledPlaceholderChar>
)}
{hasFakeCaret && (
<StyledCaretContainer>
diff --git a/packages/twenty-front/src/modules/settings/workspace/components/ClickTrackingSwitch.tsx b/packages/twenty-front/src/modules/settings/workspace/components/ClickTrackingSwitch.tsx
index 773298e1005..fc1e87f634c 100644
--- a/packages/twenty-front/src/modules/settings/workspace/components/ClickTrackingSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/workspace/components/ClickTrackingSwitch.tsx
@@ -8,6 +8,7 @@ import { IconClick } from 'twenty-ui/icon';
import { useToast } from 'twenty-ui/components/feedback';
import { Card } from 'twenty-ui/primitives/surfaces';
import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ClickTrackingSwitch = () => {
const { enqueueToast } = useToast();
@@ -19,8 +20,7 @@ export const ClickTrackingSwitch = () => {
const handleChange = async () => {
if (!currentWorkspace?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
const isCampaignClickTrackingEnabled =
diff --git a/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx b/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx
index a0421943857..99ff6172a5a 100644
--- a/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/workspace/components/ImpersonationSwitch.tsx
@@ -10,6 +10,7 @@ import { Card } from 'twenty-ui/primitives/surfaces';
import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';
import { useToast } from 'twenty-ui/components/feedback';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ImpersonationSwitch = () => {
const { enqueueToast } = useToast();
@@ -23,8 +24,7 @@ export const ImpersonationSwitch = () => {
const handleChange = async (value: boolean) => {
try {
if (!currentWorkspace?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
await updateWorkspace({
variables: {
diff --git a/packages/twenty-front/src/modules/settings/workspace/components/OpenTrackingSwitch.tsx b/packages/twenty-front/src/modules/settings/workspace/components/OpenTrackingSwitch.tsx
index d07f1a66c6e..c91c3683965 100644
--- a/packages/twenty-front/src/modules/settings/workspace/components/OpenTrackingSwitch.tsx
+++ b/packages/twenty-front/src/modules/settings/workspace/components/OpenTrackingSwitch.tsx
@@ -8,6 +8,7 @@ import { IconEye } from 'twenty-ui/icon';
import { useToast } from 'twenty-ui/components';
import { Card } from 'twenty-ui/primitives/surfaces';
import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const OpenTrackingSwitch = () => {
const { enqueueToast } = useToast();
@@ -19,8 +20,7 @@ export const OpenTrackingSwitch = () => {
const handleChange = async () => {
if (!currentWorkspace?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
const isCampaignOpenTrackingEnabled =
diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelSubPageRouter.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelSubPageRouter.tsx
index c5ba50572ad..6645ffef221 100644
--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelSubPageRouter.tsx
+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelSubPageRouter.tsx
@@ -4,6 +4,7 @@ import { SidePanelSubPageNavigationHeader } from '@/side-panel/pages/common/comp
import { styled } from '@linaria/react';
import React, { type ReactNode } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledSubPageContainer = styled.div`
display: flex;
@@ -31,10 +32,9 @@ export const SidePanelSubPageRouter = ({
if (!isDefined(subPageComponent)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Missing side panel sub-page config for "${currentSidePanelSubPage.subPage}". ` +
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Please add it to SIDE_PANEL_SUB_PAGES_CONFIG.',
+ doNotTranslate(
+ `Missing side panel sub-page config for "${currentSidePanelSubPage.subPage}". `,
+ ) + doNotTranslate('Please add it to SIDE_PANEL_SUB_PAGES_CONFIG.'),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/hooks/useOpenRecordInSidePanel.ts b/packages/twenty-front/src/modules/side-panel/hooks/useOpenRecordInSidePanel.ts
index cecaad8dc9f..239d8c66174 100644
--- a/packages/twenty-front/src/modules/side-panel/hooks/useOpenRecordInSidePanel.ts
+++ b/packages/twenty-front/src/modules/side-panel/hooks/useOpenRecordInSidePanel.ts
@@ -13,6 +13,7 @@ import { t } from '@lingui/core/macro';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { getAppPath, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIsMobile } from 'twenty-ui/utilities';
import { useNavigateApp } from '~/hooks/useNavigateApp';
@@ -124,8 +125,9 @@ export const useOpenRecordInSidePanel = () => {
if (!objectMetadataItem) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `No object metadata item found for object name ${objectNameSingular}`,
+ doNotTranslate(
+ `No object metadata item found for object name ${objectNameSingular}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelHistory.ts b/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelHistory.ts
index cbe92343ea4..7b6d0b02356 100644
--- a/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelHistory.ts
+++ b/packages/twenty-front/src/modules/side-panel/hooks/useSidePanelHistory.ts
@@ -11,6 +11,7 @@ import { activeTabIdComponentState } from '@/ui/layout/tab-list/states/activeTab
import { isNonEmptyArray } from '@sniptt/guards';
import { useStore } from 'jotai';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSidePanelHistory = () => {
const store = useStore();
@@ -157,8 +158,9 @@ export const useSidePanelHistory = () => {
if (!isDefined(newNavigationStackItem)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `No side panel navigation stack item found for index ${pageIndex}`,
+ doNotTranslate(
+ `No side panel navigation stack item found for index ${pageIndex}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelChartFilterSubPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelChartFilterSubPage.tsx
index a26121a89f8..d58c3d83dc7 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelChartFilterSubPage.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/SidePanelChartFilterSubPage.tsx
@@ -7,6 +7,7 @@ import { isChartWidget } from '@/side-panel/pages/page-layout/utils/isChartWidge
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const SidePanelChartFilterSubPage = () => {
const { pageLayoutId } = usePageLayoutSidePanelTarget();
@@ -41,8 +42,9 @@ export const SidePanelChartFilterSubPage = () => {
if (!isDefined(objectMetadataItem)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Object metadata item not found for id ${widgetInEditMode.objectMetadataId}`,
+ doNotTranslate(
+ `Object metadata item not found for id ${widgetInEditMode.objectMetadataId}`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx
index fce858c6ebb..afc1c59af95 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx
@@ -22,6 +22,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
import { t } from '@lingui/core/macro';
import { useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconChevronLeft } from 'twenty-ui/icon';
import { filterBySearchQuery } from '~/utils/filterBySearchQuery';
@@ -53,8 +54,7 @@ export const ChartAggregateOperationSelectionDropdownContent = ({
);
if (!isBarOrLineChart && !isAggregateChart && !isPieChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const sourceObjectMetadataItem = objectMetadataItems.find(
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAxisNameSelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAxisNameSelectionDropdownContent.tsx
index 6a5739d5175..ebad395ea39 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAxisNameSelectionDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAxisNameSelectionDropdownContent.tsx
@@ -13,6 +13,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { ListItemButton } from 'twenty-ui/components/navigation';
import { AxisNameDisplay } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ChartAxisNameSelectionDropdownContent = () => {
const { pageLayoutId } = usePageLayoutSidePanelTarget();
@@ -25,8 +26,7 @@ export const ChartAxisNameSelectionDropdownContent = () => {
isWidgetConfigurationOfType(configuration, 'LineChartConfiguration');
if (!isBarOrLineChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const currentAxisNameDisplay = configuration.axisNameDisplay;
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorSelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorSelectionDropdownContent.tsx
index decf4af6b39..8873a698189 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorSelectionDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartColorSelectionDropdownContent.tsx
@@ -17,6 +17,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/use
import { t } from '@lingui/core/macro';
import { useState } from 'react';
import { capitalize, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type ThemeColor, MAIN_COLOR_NAMES } from 'twenty-ui/theme';
import { filterBySearchQuery } from '~/utils/filterBySearchQuery';
@@ -55,8 +56,7 @@ export const ChartColorSelectionDropdownContent = () => {
'IframeConfiguration',
)
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const configuration = widgetInEditMode.configuration as ChartConfiguration;
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartDateGranularitySelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartDateGranularitySelectionDropdownContent.tsx
index fa3397590d0..310b3d9270f 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartDateGranularitySelectionDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartDateGranularitySelectionDropdownContent.tsx
@@ -15,6 +15,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { ObjectRecordGroupByDateGranularity } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { ListItemButton } from 'twenty-ui/components/navigation';
import {
type FieldsConfiguration,
@@ -80,8 +81,7 @@ export const ChartDateGranularitySelectionDropdownContent = ({
const configuration = widgetInEditMode?.configuration;
if (!isChartConfiguration(configuration)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const isPieChart = isWidgetConfigurationOfType(
@@ -93,13 +93,11 @@ export const ChartDateGranularitySelectionDropdownContent = ({
isWidgetConfigurationOfType(configuration, 'LineChartConfiguration');
if (!isDefined(axis) && !isPieChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
if (isDefined(axis) && !isBarOrLineChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const currentDateGranularity = getCurrentDateGranularity({
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartFieldSelectionForAggregateOperationDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartFieldSelectionForAggregateOperationDropdownContent.tsx
index f0a30414bdb..072f74a5610 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartFieldSelectionForAggregateOperationDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartFieldSelectionForAggregateOperationDropdownContent.tsx
@@ -20,6 +20,7 @@ import { useState } from 'react';
import { useIcons } from 'twenty-ui/icon';
import { ListItemButton } from 'twenty-ui/components/navigation';
import { filterBySearchQuery } from '~/utils/filterBySearchQuery';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ChartFieldSelectionForAggregateOperationDropdownContent = () => {
const [isSubMenuOpen, setIsSubMenuOpen] = useState(false);
@@ -44,8 +45,7 @@ export const ChartFieldSelectionForAggregateOperationDropdownContent = () => {
);
if (!isBarOrLineChart && !isAggregateChart && !isPieChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const currentFieldMetadataId = configuration.aggregateFieldMetadataId;
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartNumberFormatSelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartNumberFormatSelectionDropdownContent.tsx
index ee23eed45d4..675cf9054fe 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartNumberFormatSelectionDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartNumberFormatSelectionDropdownContent.tsx
@@ -14,6 +14,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { ListItemButton } from 'twenty-ui/components/navigation';
import { ChartNumberFormat } from '~/generated-metadata/graphql';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const ChartNumberFormatSelectionDropdownContent = () => {
const { pageLayoutId } = usePageLayoutSidePanelTarget();
@@ -28,8 +29,7 @@ export const ChartNumberFormatSelectionDropdownContent = () => {
isWidgetConfigurationOfType(configuration, 'PieChartConfiguration');
if (!isChartWithNumberFormat) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
const currentNumberFormat =
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortByGroupByFieldDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortByGroupByFieldDropdownContent.tsx
index 1d1d736f7d0..fb32705a331 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortByGroupByFieldDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortByGroupByFieldDropdownContent.tsx
@@ -23,6 +23,7 @@ import { selectedItemIdComponentState } from '@/ui/layout/selectable-list/states
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { ListItemButton } from 'twenty-ui/components/navigation';
import {
GraphOrderBy,
@@ -45,13 +46,11 @@ export const ChartSortByGroupByFieldDropdownContent = () => {
isWidgetConfigurationOfType(configuration, 'LineChartConfiguration');
if (!isBarOrLineChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
if (!isDefined(widgetInEditMode?.objectMetadataId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('No data source in chart');
+ throw new Error(doNotTranslate('No data source in chart'));
}
const dropdownId = useAvailableComponentInstanceIdOrThrow(
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortBySelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortBySelectionDropdownContent.tsx
index f9f28e6e738..e0050fe10e5 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortBySelectionDropdownContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartSortBySelectionDropdownContent.tsx
@@ -24,6 +24,7 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/com
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { type CompositeFieldSubFieldName } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { ListItemButton } from 'twenty-ui/components/navigation';
import {
type BarChartConfiguration,
@@ -65,13 +66,11 @@ export const ChartSortBySelectionDropdownContent = () => {
);
if (!isBarChart && !isLineChart && !isPieChart) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Invalid configuration type');
+ throw new Error(doNotTranslate('Invalid configuration type'));
}
if (!isDefined(widgetInEditMode?.objectMetadataId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('No data source in chart');
+ throw new Error(doNotTranslate('No data source in chart'));
}
const { getXSortOptionLabel } = useGraphXSortOptionLabels({
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceDesktop.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceDesktop.ts
index 2acdff885f6..86bea7f0c44 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceDesktop.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceDesktop.ts
@@ -1,2 +1,3 @@
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- The expression is parsed by the layout formula engine.
-export const EXPRESSION_DEVICE_DESKTOP = 'device == "DESKTOP"';
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+export const EXPRESSION_DEVICE_DESKTOP = doNotTranslate('device == "DESKTOP"');
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceMobile.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceMobile.ts
index 1038c69cab1..a426dd93c6c 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceMobile.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/constants/ExpressionDeviceMobile.ts
@@ -1,2 +1,3 @@
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- The expression is parsed by the layout formula engine.
-export const EXPRESSION_DEVICE_MOBILE = 'device == "MOBILE"';
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+export const EXPRESSION_DEVICE_MOBILE = doNotTranslate('device == "MOBILE"');
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useNavigatePageLayoutSidePanel.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useNavigatePageLayoutSidePanel.ts
index f5c302dad21..5c53579dd50 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useNavigatePageLayoutSidePanel.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useNavigatePageLayoutSidePanel.ts
@@ -5,6 +5,7 @@ import { getPageLayoutIcon } from '@/side-panel/pages/page-layout/utils/getPageL
import { getPageLayoutPageTitle } from '@/side-panel/pages/page-layout/utils/getPageLayoutPageTitle';
import { useCallback, useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type IconComponent } from 'twenty-ui/icon';
type NavigatePageLayoutSidePanelProps = {
@@ -34,8 +35,9 @@ export const useNavigatePageLayoutSidePanel = () => {
}: NavigatePageLayoutSidePanelProps) => {
if (!isDefined(pageLayoutSidePanelTarget)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Cannot open a page layout side panel page outside of a page layout with a target record',
+ doNotTranslate(
+ 'Cannot open a page layout side panel page outside of a page layout with a target record',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/usePageLayoutSidePanelTarget.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/usePageLayoutSidePanelTarget.ts
index e8f7cf4e384..98735c668c8 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/usePageLayoutSidePanelTarget.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/usePageLayoutSidePanelTarget.ts
@@ -1,5 +1,6 @@
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { PageLayoutSidePanelTargetContext } from '@/side-panel/pages/page-layout/contexts/PageLayoutSidePanelTargetContext';
@@ -10,8 +11,9 @@ export const usePageLayoutSidePanelTarget = () => {
if (!isDefined(pageLayoutSidePanelTarget)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'usePageLayoutSidePanelTarget must be used within a page layout side panel page',
+ doNotTranslate(
+ 'usePageLayoutSidePanelTarget must be used within a page layout side panel page',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useUpdateGraphTypeConfig.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useUpdateGraphTypeConfig.ts
index f09d1b499c0..28ac0ea1097 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useUpdateGraphTypeConfig.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/hooks/useUpdateGraphTypeConfig.ts
@@ -19,6 +19,7 @@ import { useAtomComponentStateCallbackState } from '@/ui/utilities/state/jotai/h
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { BarChartLayout } from '~/generated-metadata/graphql';
export const useGetConfigToUpdateAfterGraphTypeChange = ({
@@ -54,8 +55,7 @@ export const useGetConfigToUpdateAfterGraphTypeChange = ({
const currentlyEditingWidgetId = store.get(currentlyEditingWidgetIdState);
if (!isDefined(currentlyEditingWidgetId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('No widget is currently being edited');
+ throw new Error(doNotTranslate('No widget is currently being edited'));
}
const draftPageLayout = store.get(pageLayoutDraftState);
@@ -68,15 +68,17 @@ export const useGetConfigToUpdateAfterGraphTypeChange = ({
!isDefined(widgetInDraft) ||
!isDefined(widgetInDraft.configuration)
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Widget configuration not found in draft state');
+ throw new Error(
+ doNotTranslate('Widget configuration not found in draft state'),
+ );
}
const currentConfiguration = widgetInDraft.configuration;
if (!isWidgetConfigurationOfTypeGraph(currentConfiguration)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Widget configuration is not a chart configuration');
+ throw new Error(
+ doNotTranslate('Widget configuration is not a chart configuration'),
+ );
}
const newConfigurationType = getConfigurationTypeFromGraphType(graphType);
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/assertChartWidgetOrThrow.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/assertChartWidgetOrThrow.ts
index 36f97a517e9..6c34f44e839 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/assertChartWidgetOrThrow.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/assertChartWidgetOrThrow.ts
@@ -2,6 +2,7 @@ import { type ChartConfiguration } from '@/side-panel/pages/page-layout/types/Ch
import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';
import { isNonEmptyString } from '@sniptt/guards';
import { assertIsDefinedOrThrow } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type AssertChartWidgetOrThrow = (
widget: PageLayoutWidget,
@@ -22,14 +23,12 @@ export const assertChartWidgetOrThrow: AssertChartWidgetOrThrow = (
) => {
assertIsDefinedOrThrow(
widget.objectMetadataId,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget objectMetadataId is required'),
+ new Error(doNotTranslate('Widget objectMetadataId is required')),
);
assertIsDefinedOrThrow(
widget.configuration,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- new Error('Widget configuration is required'),
+ new Error(doNotTranslate('Widget configuration is required')),
);
if (
@@ -39,8 +38,9 @@ export const assertChartWidgetOrThrow: AssertChartWidgetOrThrow = (
)
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Expected chart configuration but got ${widget.configuration.__typename}`,
+ doNotTranslate(
+ `Expected chart configuration but got ${widget.configuration.__typename}`,
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/resolveWidgetTypeSelectTargetTabId.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/resolveWidgetTypeSelectTargetTabId.ts
index fc6cd42a9a7..fc79362f2ba 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/resolveWidgetTypeSelectTargetTabId.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/resolveWidgetTypeSelectTargetTabId.ts
@@ -1,5 +1,6 @@
import { type PageLayoutTab } from '@/page-layout/types/PageLayoutTab';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const resolveWidgetTypeSelectTargetTabId = ({
pageLayoutEditingWidgetId,
@@ -17,8 +18,9 @@ export const resolveWidgetTypeSelectTargetTabId = ({
if (!isDefined(editingWidgetTab)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Cannot find tab containing editing widget ${pageLayoutEditingWidgetId}`,
+ doNotTranslate(
+ `Cannot find tab containing editing widget ${pageLayoutEditingWidgetId}`,
+ ),
);
}
@@ -27,8 +29,9 @@ export const resolveWidgetTypeSelectTargetTabId = ({
if (!isDefined(widgetCreationTargetTabId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'widgetCreationTargetTabId must be set when navigating to widget type select without an editing widget',
+ doNotTranslate(
+ 'widgetCreationTargetTabId must be set when navigating to widget type select without an editing widget',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelMergeRecordPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelMergeRecordPage.tsx
index 51965d6fea7..88bf1ae8045 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelMergeRecordPage.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelMergeRecordPage.tsx
@@ -6,6 +6,7 @@ import { RecordComponentInstanceContextsWrapper } from '@/object-record/componen
import { MergeRecordsContainer } from '@/object-record/record-merge/components/MergeRecordsContainer';
import { useComponentInstanceStateContext } from '@/ui/utilities/state/component-state/hooks/useComponentInstanceStateContext';
import { styled } from '@linaria/react';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledSidePanelRecord = styled.div`
height: 100%;
@@ -21,8 +22,9 @@ export const SidePanelMergeRecordPage = () => {
);
if (!sidePanelPageInstanceId) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Command menu page instance id is not defined');
+ throw new Error(
+ doNotTranslate('Command menu page instance id is not defined'),
+ );
}
return (
diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelUpdateMultipleRecords.tsx b/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelUpdateMultipleRecords.tsx
index f539b1f34cc..4bcdbc60e0b 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelUpdateMultipleRecords.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/record-page/components/SidePanelUpdateMultipleRecords.tsx
@@ -4,6 +4,7 @@ import { useContextStoreObjectMetadataItemOrThrow } from '@/context-store/hooks/
import { UpdateMultipleRecordsContainer } from '@/object-record/record-update-multiple/components/UpdateMultipleRecordsContainer';
import { useComponentInstanceStateContext } from '@/ui/utilities/state/component-state/hooks/useComponentInstanceStateContext';
import { styled } from '@linaria/react';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledSidePanelRecord = styled.div`
height: 100%;
@@ -15,8 +16,9 @@ export const SidePanelUpdateMultipleRecords = () => {
)?.instanceId;
if (!sidePanelPageInstanceId) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Command menu page instance id is not defined');
+ throw new Error(
+ doNotTranslate('Command menu page instance id is not defined'),
+ );
}
const { objectMetadataItem } = useContextStoreObjectMetadataItemOrThrow(
diff --git a/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx b/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx
index 423e7b22ca6..196f8821370 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/send-campaign/components/SendCampaignForm.tsx
@@ -8,6 +8,7 @@ import {
MessageCampaignStatus,
} from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { SegmentedControl } from 'twenty-ui/components/input';
import { IconClock, IconSend } from 'twenty-ui/icon';
import { Button, Field } from 'twenty-ui/primitives/input';
@@ -63,8 +64,7 @@ export const SendCampaignForm = ({ campaign }: SendCampaignFormProps) => {
const { unsubscribeTopics } = useUnsubscribeTopics();
const [deliveryTiming, setDeliveryTiming] = useState<CampaignDeliveryTiming>(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Delivery timing values are API enum tokens.
- isAlreadyScheduled ? 'LATER' : 'NOW',
+ isAlreadyScheduled ? 'LATER' : doNotTranslate('NOW'),
);
const [scheduledAt, setScheduledAt] = useState<string | null>(
campaign.scheduledAt,
@@ -198,8 +198,7 @@ export const SendCampaignForm = ({ campaign }: SendCampaignFormProps) => {
value={deliveryTiming}
onValueChange={handleDeliveryTimingChange}
options={[
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Delivery timing values are API enum tokens.
- { value: 'NOW', label: t`Send now` },
+ { value: doNotTranslate('NOW'), label: t`Send now` },
{ value: 'LATER', label: t`Send later` },
]}
/>
diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/hooks/useSidePanelWorkflowIdOrThrow.ts b/packages/twenty-front/src/modules/side-panel/pages/workflow/hooks/useSidePanelWorkflowIdOrThrow.ts
index f90ef1a3a68..35ed3387c5b 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/hooks/useSidePanelWorkflowIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/hooks/useSidePanelWorkflowIdOrThrow.ts
@@ -1,14 +1,18 @@
import { sidePanelWorkflowIdComponentState } from '@/side-panel/pages/workflow/states/sidePanelWorkflowIdComponentState';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSidePanelWorkflowIdOrThrow = () => {
const sidePanelWorkflowId = useAtomComponentStateValue(
sidePanelWorkflowIdComponentState,
);
if (!isDefined(sidePanelWorkflowId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Expected sidePanelWorkflowIdComponentState to be defined');
+ throw new Error(
+ doNotTranslate(
+ 'Expected sidePanelWorkflowIdComponentState to be defined',
+ ),
+ );
}
return sidePanelWorkflowId;
diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/create/components/SidePanelWorkflowCreateStepContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/create/components/SidePanelWorkflowCreateStepContent.tsx
index e82c21abcae..13195c933c1 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/create/components/SidePanelWorkflowCreateStepContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/create/components/SidePanelWorkflowCreateStepContent.tsx
@@ -21,6 +21,7 @@ import { prepareIfElseStepWithNewBranch } from '@/workflow/workflow-steps/workfl
import { getActionIcon } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIcon';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIcons } from 'twenty-ui/icon';
export const SidePanelWorkflowCreateStepContent = () => {
@@ -60,8 +61,9 @@ export const SidePanelWorkflowCreateStepContent = () => {
const handleCreateStep = async (selection: WorkflowActionSelection) => {
if (!isDefined(workflowVisualizerWorkflowId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Workflow ID must be configured for the edge when creating a step',
+ doNotTranslate(
+ 'Workflow ID must be configured for the edge when creating a step',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/edit/components/SidePanelWorkflowEditStepTypeContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/edit/components/SidePanelWorkflowEditStepTypeContent.tsx
index 4f0c6cf286a..0467117c722 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/edit/components/SidePanelWorkflowEditStepTypeContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/edit/components/SidePanelWorkflowEditStepTypeContent.tsx
@@ -18,6 +18,7 @@ import { useUpdateStep } from '@/workflow/workflow-steps/hooks/useUpdateStep';
import { getActionIcon } from '@/workflow/workflow-steps/workflow-actions/utils/getActionIcon';
import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIcons } from 'twenty-ui/icon';
export const SidePanelWorkflowEditStepTypeContent = () => {
@@ -41,8 +42,9 @@ export const SidePanelWorkflowEditStepTypeContent = () => {
const handleUpdateStepType = async (selection: WorkflowActionSelection) => {
if (!isDefined(workflowVisualizerWorkflowId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Workflow ID must be configured for the edge when creating a step',
+ doNotTranslate(
+ 'Workflow ID must be configured for the edge when creating a step',
+ ),
);
}
@@ -51,8 +53,7 @@ export const SidePanelWorkflowEditStepTypeContent = () => {
);
if (!isDefined(existingStep)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Step not found');
+ throw new Error(doNotTranslate('Step not found'));
}
const stepUpdate = {
diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx
index 2cb3d7537b5..7cf3f9221bd 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx
+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/components/SidePanelWorkflowRunViewStepContent.tsx
@@ -29,6 +29,7 @@ import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { isNull } from '@sniptt/guards';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
IconLogin2,
IconLogout,
@@ -64,8 +65,9 @@ export const SidePanelWorkflowRunViewStepContent = () => {
);
if (isNull(sidePanelPageComponentInstance)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'SidePanelPageComponentInstanceContext is not defined. This component should be used within SidePanelPageComponentInstanceContext.',
+ doNotTranslate(
+ 'SidePanelPageComponentInstanceContext is not defined. This component should be used within SidePanelPageComponentInstanceContext.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/hooks/useSidePanelWorkflowRunIdOrThrow.ts b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/hooks/useSidePanelWorkflowRunIdOrThrow.ts
index 9b2df27aa4e..6317dda252d 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/hooks/useSidePanelWorkflowRunIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view-run/hooks/useSidePanelWorkflowRunIdOrThrow.ts
@@ -1,6 +1,7 @@
import { sidePanelWorkflowRunIdComponentState } from '@/side-panel/pages/workflow/states/sidePanelWorkflowRunIdComponentState';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSidePanelWorkflowRunIdOrThrow = () => {
const sidePanelWorkflowRunId = useAtomComponentStateValue(
@@ -8,8 +9,9 @@ export const useSidePanelWorkflowRunIdOrThrow = () => {
);
if (!isDefined(sidePanelWorkflowRunId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Expected the sidePanelWorkflowRunIdComponentState to be defined.',
+ doNotTranslate(
+ 'Expected the sidePanelWorkflowRunIdComponentState to be defined.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view/hooks/useSidePanelWorkflowVersionIdOrThrow.ts b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view/hooks/useSidePanelWorkflowVersionIdOrThrow.ts
index 22df2384480..dc7fb6deca2 100644
--- a/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view/hooks/useSidePanelWorkflowVersionIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/side-panel/pages/workflow/step/view/hooks/useSidePanelWorkflowVersionIdOrThrow.ts
@@ -1,6 +1,7 @@
import { sidePanelWorkflowVersionIdComponentState } from '@/side-panel/pages/workflow/states/sidePanelWorkflowVersionIdComponentState';
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSidePanelWorkflowVersionIdOrThrow = () => {
const sidePanelWorkflowVersionId = useAtomComponentStateValue(
@@ -8,8 +9,9 @@ export const useSidePanelWorkflowVersionIdOrThrow = () => {
);
if (!isDefined(sidePanelWorkflowVersionId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Expected sidePanelWorkflowVersionIdComponentState to be defined',
+ doNotTranslate(
+ 'Expected sidePanelWorkflowVersionIdComponentState to be defined',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/constants/BackgroundMockCompanies.ts b/packages/twenty-front/src/modules/sign-in-background-mock/constants/BackgroundMockCompanies.ts
index acf03402e02..8dbecdefee4 100644
--- a/packages/twenty-front/src/modules/sign-in-background-mock/constants/BackgroundMockCompanies.ts
+++ b/packages/twenty-front/src/modules/sign-in-background-mock/constants/BackgroundMockCompanies.ts
@@ -1,4 +1,5 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Sample CRM records use proper names and addresses.
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export type BackgroundMockCompany = {
id: string;
name: string;
@@ -9,7 +10,7 @@ export type BackgroundMockCompany = {
address: string;
};
-export const BACKGROUND_MOCK_COMPANIES = [
+export const BACKGROUND_MOCK_COMPANIES = doNotTranslate([
{
id: 'google',
name: 'Google',
@@ -199,4 +200,4 @@ export const BACKGROUND_MOCK_COMPANIES = [
employees: 14593,
address: 'San Francisco',
},
-] satisfies BackgroundMockCompany[];
+] satisfies BackgroundMockCompany[]);
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx
index a97f1647f4f..17ec66a8e8b 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx
@@ -1,6 +1,7 @@
import { createContext } from 'react';
import { type SpreadsheetImportDialogOptions } from '@/spreadsheet-import/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const RsiContext = createContext({} as any);
@@ -14,8 +15,9 @@ export const ReactSpreadsheetImportContextProvider = ({
values,
}: ReactSpreadsheetImportContextProviderProps) => {
if (!isDefined(values.spreadsheetImportFields)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing configuration is a developer diagnostic.
- throw new Error('Fields must be provided to spreadsheet-import');
+ throw new Error(
+ doNotTranslate('Fields must be provided to spreadsheet-import'),
+ );
}
return <RsiContext.Provider value={values}>{children}</RsiContext.Provider>;
diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx
index 17bab006e0a..c86e09ef391 100644
--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx
+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/SpreadsheetImportStepper.tsx
@@ -11,6 +11,7 @@ import { SelectHeaderStep } from './SelectHeaderStep/SelectHeaderStep';
import { SelectSheetStep } from './SelectSheetStep/SelectSheetStep';
import { UploadStep } from './UploadStep/UploadStep';
import { ValidationStep } from './ValidationStep/ValidationStep';
+import { doNotTranslate } from 'twenty-shared/i18n';
type SpreadsheetImportStepperProps = {
nextStep: () => void;
@@ -98,8 +99,7 @@ export const SpreadsheetImportStepper = ({
);
case SpreadsheetImportStepType.validateData:
if (!uploadedFile) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This unreachable step state is an internal diagnostic.
- throw new Error('File not found');
+ throw new Error(doNotTranslate('File not found'));
}
return (
<ValidationStep
diff --git a/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx b/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx
index cdbf4be870b..e0610311424 100644
--- a/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx
+++ b/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx
@@ -15,6 +15,7 @@ import { isNonEmptyString } from '@sniptt/guards';
import { useStore } from 'jotai';
import { useCallback, useEffect, useMemo } from 'react';
import { compareArraysOfObjectsByProperty } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useDebouncedCallback } from 'use-debounce';
import {
type AddQuerySubscriptionInput,
@@ -52,10 +53,11 @@ export const SSEQuerySubscribeEffect = () => {
) {
captureException(
new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a stable event-stream diagnostic reported to Sentry.
- `Unhandled error for event stream: ${
- error instanceof Error ? error.message : String(error)
- }`,
+ doNotTranslate(
+ `Unhandled error for event stream: ${
+ error instanceof Error ? error.message : String(error)
+ }`,
+ ),
{ cause: error },
),
);
diff --git a/packages/twenty-front/src/modules/sse-db-event/hooks/useListenToEventsForQuery.ts b/packages/twenty-front/src/modules/sse-db-event/hooks/useListenToEventsForQuery.ts
index 0e6b8420bb3..3d4bae8a18a 100644
--- a/packages/twenty-front/src/modules/sse-db-event/hooks/useListenToEventsForQuery.ts
+++ b/packages/twenty-front/src/modules/sse-db-event/hooks/useListenToEventsForQuery.ts
@@ -9,6 +9,7 @@ import {
type RecordGqlOperationSignature,
} from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useDebouncedCallback } from 'use-debounce';
export const useListenToEventsForQuery = ({
@@ -45,10 +46,14 @@ export const useListenToEventsForQuery = ({
const captureResyncError = (error: unknown) => {
captureException(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a stable event-stream diagnostic reported to Sentry.
- new Error(`Failed to resync "${queryId}" after SSE reconnection`, {
- cause: error,
- }),
+ new Error(
+ doNotTranslate(
+ `Failed to resync "${queryId}" after SSE reconnection`,
+ ),
+ {
+ cause: error,
+ },
+ ),
);
};
diff --git a/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerEventStreamCreation.ts b/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerEventStreamCreation.ts
index 1723b30d867..29860c14203 100644
--- a/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerEventStreamCreation.ts
+++ b/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerEventStreamCreation.ts
@@ -23,6 +23,7 @@ import { print, type ExecutionResult } from 'graphql';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import { type EventSubscription } from '~/generated-metadata/graphql';
import { getGraphqlErrorExtensionsFromError } from '~/utils/get-graphql-error-extensions-from-error.util';
@@ -118,8 +119,9 @@ export const useTriggerEventStreamCreation = () => {
) {
captureException(
new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a stable event-stream diagnostic reported to Sentry.
- `SSE subscription error: ${value.errors[0]?.message}`,
+ doNotTranslate(
+ `SSE subscription error: ${value.errors[0]?.message}`,
+ ),
),
);
}
@@ -158,8 +160,7 @@ export const useTriggerEventStreamCreation = () => {
);
} catch (error) {
const errorProcessingSSEMessage = new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a stable event-stream diagnostic reported to Sentry.
- 'Error while processing SSE message',
+ doNotTranslate('Error while processing SSE message'),
{ cause: error instanceof Error ? error : undefined },
);
diff --git a/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerOptimisticEffectFromSseUpdateEvents.ts b/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerOptimisticEffectFromSseUpdateEvents.ts
index 7070a36b5d4..f3cd6b45118 100644
--- a/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerOptimisticEffectFromSseUpdateEvents.ts
+++ b/packages/twenty-front/src/modules/sse-db-event/hooks/useTriggerOptimisticEffectFromSseUpdateEvents.ts
@@ -16,6 +16,7 @@ import { captureMessage } from '@sentry/react';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
DatabaseEventAction,
type ObjectRecordEvent,
@@ -64,8 +65,9 @@ export const useTriggerOptimisticEffectFromSseUpdateEvents = () => {
if (unknownRecordInputFields.length > 0) {
captureMessage(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a stable event-stream diagnostic reported to Sentry.
- `SSE update event for ${objectMetadataItem.nameSingular} carried fields unknown to this tab's metadata: ${unknownRecordInputFields.join(', ')}`,
+ doNotTranslate(
+ `SSE update event for ${objectMetadataItem.nameSingular} carried fields unknown to this tab's metadata: ${unknownRecordInputFields.join(', ')}`,
+ ),
'warning',
);
}
diff --git a/packages/twenty-front/src/modules/ui/field/display/components/DateDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/DateDisplay.tsx
index e46c3e5b360..1d1fd790eb9 100644
--- a/packages/twenty-front/src/modules/ui/field/display/components/DateDisplay.tsx
+++ b/packages/twenty-front/src/modules/ui/field/display/components/DateDisplay.tsx
@@ -5,6 +5,7 @@ import { UserContext } from '@/users/contexts/UserContext';
import { useContext } from 'react';
import { dateLocaleState } from '@/localization/states/dateLocaleState';
import { formatDateString } from '@/object-record/record-field/ui/utils/formatDateString';
+import { doNotTranslate } from 'twenty-shared/i18n';
type DateDisplayProps = {
value: string | null | undefined;
@@ -16,8 +17,7 @@ export const DateDisplay = ({ value, dateFieldSettings }: DateDisplayProps) => {
const formattedDate = formatDateString({
value,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- UTC is the fixed storage timezone identifier.
- timeZone: 'UTC', // Needed because we have db-stored date (yyyy-mm-dd) is converted to UTC dateTime by TypeORM
+ timeZone: doNotTranslate('UTC'), // Needed because we have db-stored date (yyyy-mm-dd) is converted to UTC dateTime by TypeORM
dateFormat,
dateFieldSettings,
localeCatalog: dateLocale.localeCatalog,
diff --git a/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/socialLinkProviders.ts b/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/socialLinkProviders.ts
index b8d6d2524bf..453c1a571a9 100644
--- a/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/socialLinkProviders.ts
+++ b/packages/twenty-front/src/modules/ui/field/display/components/SocialLink/socialLinkProviders.ts
@@ -1,4 +1,5 @@
import { LinkType } from '@/ui/field/display/components/SocialLink/LinkType';
+import { doNotTranslate } from 'twenty-shared/i18n';
export type SocialLinkProvider = {
type: LinkType;
@@ -34,8 +35,7 @@ export const SOCIAL_LINK_PROVIDERS: SocialLinkProvider[] = [
'intent',
],
handlePrefix: '@',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Brand names are proper nouns that remain unchanged across locales.
- fallbackLabel: 'Twitter',
+ fallbackLabel: doNotTranslate('Twitter'),
},
{
type: LinkType.Facebook,
@@ -43,8 +43,7 @@ export const SOCIAL_LINK_PROVIDERS: SocialLinkProvider[] = [
handlePattern: /(?:https?:\/\/)?(?:www\.)?facebook\.com\/([^/?#]+)/,
reservedPaths: [],
handlePrefix: '',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Brand names are proper nouns that remain unchanged across locales.
- fallbackLabel: 'Facebook',
+ fallbackLabel: doNotTranslate('Facebook'),
},
{
type: LinkType.Instagram,
@@ -61,8 +60,7 @@ export const SOCIAL_LINK_PROVIDERS: SocialLinkProvider[] = [
'about',
],
handlePrefix: '@',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Brand names are proper nouns that remain unchanged across locales.
- fallbackLabel: 'Instagram',
+ fallbackLabel: doNotTranslate('Instagram'),
},
{
type: LinkType.TikTok,
@@ -78,7 +76,6 @@ export const SOCIAL_LINK_PROVIDERS: SocialLinkProvider[] = [
handlePattern: /(?:https?:\/\/)?(?:www\.)?bsky\.app\/profile\/([^/?#]+)/,
reservedPaths: [],
handlePrefix: '',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Brand names are proper nouns that remain unchanged across locales.
- fallbackLabel: 'Bluesky',
+ fallbackLabel: doNotTranslate('Bluesky'),
},
];
diff --git a/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx
index efa28a6afa4..a38c6537490 100644
--- a/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx
+++ b/packages/twenty-front/src/modules/ui/field/input/components/DoubleTextInput.tsx
@@ -13,6 +13,7 @@ import { FieldInputContainer } from '@/ui/field/input/components/FieldInputConta
import { useHotkeysOnFocusedElement } from '@/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement';
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { splitFullName } from '~/utils/format/splitFullName';
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
import { StyledTextInput } from './TextInput';
@@ -177,8 +178,7 @@ export const DoubleTextInput = ({
event.preventDefault();
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a clipboard data format identifier.
- const name = event.clipboardData.getData('Text');
+ const name = event.clipboardData.getData(doNotTranslate('Text'));
const splittedName = splitFullName(name);
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx
index 94b812fe571..6f773b24430 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DatePicker.tsx
@@ -27,6 +27,7 @@ import {
turnPlainDateToShiftedDateInSystemTimeZone,
type RelativeDateFilter,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconCalendarX } from 'twenty-ui/icon';
import { Text } from 'twenty-ui/primitives/typography';
import { useTheme, themeCssVariables } from 'twenty-ui/theme';
@@ -258,8 +259,7 @@ export const DatePicker = ({
instanceId={instanceId}
direction={relativeDate?.direction ?? 'PAST'}
amount={relativeDate?.amount}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a relative-date enum value stored in filters.
- unit={relativeDate?.unit ?? 'DAY'}
+ unit={relativeDate?.unit ?? doNotTranslate('DAY')}
onChange={onRelativeDateChange}
calendarMonthDate={monthDate}
onPreviousMonth={decreaseMonth}
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx
index 942abb23f44..79975c4a454 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePicker.tsx
@@ -5,6 +5,7 @@ import {
isSubDayRelativeDateFilterUnit,
type RelativeDateFilter,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { DateTimePickerHeader } from '@/ui/input/components/internal/date/components/DateTimePickerHeader';
import { RelativeDatePickerHeader } from '@/ui/input/components/internal/date/components/RelativeDatePickerHeader';
@@ -208,8 +209,7 @@ export const DateTimePicker = ({
onClose?.(zonedDateTime);
};
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a relative-date enum value stored in filters.
- const relativeUnit = relativeDate?.unit ?? 'DAY';
+ const relativeUnit = relativeDate?.unit ?? doNotTranslate('DAY');
const relativeRangeStart = isRelative ? relativeDate?.start : undefined;
const relativeRangeEnd = isRelative ? relativeDate?.end : undefined;
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx
index e02cb1121b9..564f302a595 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/components/DateTimePickerHeader.tsx
@@ -18,6 +18,7 @@ import { t } from '@lingui/core/macro';
import { type Temporal } from 'temporal-polyfill';
import { SOURCE_LOCALE } from 'twenty-shared/translations';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { LightIconButton } from 'twenty-ui/components/input';
import { Dropdown } from 'twenty-ui/components/navigation';
import { Field, Input, InputGroup } from 'twenty-ui/primitives/input';
@@ -159,8 +160,7 @@ export const DateTimePickerHeader = ({
<Input
type="text"
ref={timeInputRef}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a time or date input mask token, not natural-language text.
- placeholder={isHour12 ? 'HH:mm AA' : 'HH:mm'}
+ placeholder={doNotTranslate(isHour12 ? 'HH:mm AA' : 'HH:mm')}
aria-label={t`Time`}
/>
</InputGroup>
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/constants/RelativeDateUnits.ts b/packages/twenty-front/src/modules/ui/input/components/internal/date/constants/RelativeDateUnits.ts
index 5cb5c1e3805..c36d8f10957 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/constants/RelativeDateUnits.ts
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/constants/RelativeDateUnits.ts
@@ -1,8 +1,8 @@
import { type RelativeDateFilterUnit } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const RELATIVE_DATE_UNITS: RelativeDateFilterUnit[] = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a relative-date enum value stored in filters.
- 'DAY',
+ doNotTranslate('DAY'),
'WEEK',
'MONTH',
'QUARTER',
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/hooks/useTimeInput.ts b/packages/twenty-front/src/modules/ui/input/components/internal/date/hooks/useTimeInput.ts
index 0c3f0b19cb2..393b74ebaff 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/hooks/useTimeInput.ts
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/hooks/useTimeInput.ts
@@ -1,5 +1,6 @@
import { TimeFormat } from '@/localization/constants/TimeFormat';
import { useCallback } from 'react';
+import { doNotTranslate } from 'twenty-shared/i18n';
type TimeValue = {
hour: number;
@@ -23,8 +24,7 @@ export const useTimeInput = (timeFormat: TimeFormat): UseTimeInputReturn => {
const mm = minute.toString().padStart(2, '0');
if (isHour12) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a time or date input mask token, not natural-language text.
- const amPm = hour >= 12 ? 'PM' : 'AM';
+ const amPm = doNotTranslate(hour >= 12 ? 'PM' : 'AM');
return `${hh}:${mm} ${amPm}`;
}
return `${hh}:${mm}`;
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getDateMask.ts b/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getDateMask.ts
index b3775af6136..0e9d60cf800 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getDateMask.ts
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getDateMask.ts
@@ -1,12 +1,12 @@
import { DateFormat } from '@/localization/constants/DateFormat';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getDateMask = (dateFormat: DateFormat): string => {
switch (dateFormat) {
case DateFormat.DAY_FIRST:
return 'd`/m`/Y`';
case DateFormat.YEAR_FIRST:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a time or date input mask token, not natural-language text.
- return 'Y`-m`-d`';
+ return doNotTranslate('Y`-m`-d`');
case DateFormat.MONTH_FIRST:
default:
return 'm`/d`/Y`';
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeBlocks.ts b/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeBlocks.ts
index e648097b8d6..fb2ffe48269 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeBlocks.ts
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeBlocks.ts
@@ -1,5 +1,6 @@
import { TimeFormat } from '@/localization/constants/TimeFormat';
import { IMask } from 'react-imask';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getTimeBlocks = (timeFormat: TimeFormat) => {
const isHour12 = timeFormat === TimeFormat.HOUR_12;
@@ -19,8 +20,7 @@ export const getTimeBlocks = (timeFormat: TimeFormat) => {
},
aa: {
mask: IMask.MaskedEnum,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a time or date input mask token, not natural-language text.
- enum: ['AM', 'PM'],
+ enum: doNotTranslate(['AM', 'PM']),
prepareChar: (str: string) => str.toUpperCase(),
},
};
diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeMask.ts b/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeMask.ts
index c6bf0d5d0d4..37d1c1761dd 100644
--- a/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeMask.ts
+++ b/packages/twenty-front/src/modules/ui/input/components/internal/date/utils/getTimeMask.ts
@@ -1,6 +1,8 @@
import { TimeFormat } from '@/localization/constants/TimeFormat';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getTimeMask = (timeFormat: TimeFormat): string => {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a time or date input mask token, not natural-language text.
- return timeFormat === TimeFormat.HOUR_12 ? 'HH`:mm` `aa' : 'HH`:mm`';
+ return doNotTranslate(
+ timeFormat === TimeFormat.HOUR_12 ? 'HH`:mm` `aa' : 'HH`:mm`',
+ );
};
diff --git a/packages/twenty-front/src/modules/ui/layout/contexts/useTargetRecord.ts b/packages/twenty-front/src/modules/ui/layout/contexts/useTargetRecord.ts
index 3e7051736fa..99f1a6f9d23 100644
--- a/packages/twenty-front/src/modules/ui/layout/contexts/useTargetRecord.ts
+++ b/packages/twenty-front/src/modules/ui/layout/contexts/useTargetRecord.ts
@@ -1,12 +1,14 @@
import { useLayoutRenderingContext } from '@/ui/layout/contexts/LayoutRenderingContext';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useTargetRecord = () => {
const { targetRecordIdentifier } = useLayoutRenderingContext();
if (!targetRecordIdentifier) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- 'useTargetRecord must be used within a record page context (targetRecordIdentifier is required)',
+ doNotTranslate(
+ 'useTargetRecord must be used within a record page context (targetRecordIdentifier is required)',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/layout/dialog/components/DialogInstance.tsx b/packages/twenty-front/src/modules/ui/layout/dialog/components/DialogInstance.tsx
index a41c1ab2782..85891c0b7fb 100644
--- a/packages/twenty-front/src/modules/ui/layout/dialog/components/DialogInstance.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/dialog/components/DialogInstance.tsx
@@ -1,6 +1,7 @@
import { useContext, type ReactNode } from 'react';
import { useStore } from 'jotai';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { Dialog, type DialogPopupProps } from 'twenty-ui/primitives/surfaces';
import { RootStackingContextZIndices } from '@/ui/layout/constants/RootStackingContextZIndices';
@@ -26,16 +27,16 @@ type DialogInstanceProps = {
renderInDocumentBody?: boolean;
};
-const PROPAGATED_KEYS = new Set([
- 'ArrowUp',
- 'ArrowDown',
- 'ArrowLeft',
- 'ArrowRight',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
- 'Home',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
- 'End',
-]);
+const PROPAGATED_KEYS = new Set(
+ doNotTranslate([
+ 'ArrowUp',
+ 'ArrowDown',
+ 'ArrowLeft',
+ 'ArrowRight',
+ 'Home',
+ 'End',
+ ]),
+);
export const DialogInstance = ({
dialogId,
diff --git a/packages/twenty-front/src/modules/ui/layout/draggable-list/components/DraggableItem.tsx b/packages/twenty-front/src/modules/ui/layout/draggable-list/components/DraggableItem.tsx
index 74599a7666c..920e7845601 100644
--- a/packages/twenty-front/src/modules/ui/layout/draggable-list/components/DraggableItem.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/draggable-list/components/DraggableItem.tsx
@@ -2,6 +2,7 @@ import { useDragDropMonitor } from '@dnd-kit/react';
import { isFunction } from '@sniptt/guards';
import { Fragment, type JSX, useContext, useEffect, useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { closestCenter } from '@dnd-kit/collision';
import { DraggableListGroupContext } from '@/ui/layout/draggable-list/contexts/DraggableListGroupContext';
@@ -56,8 +57,9 @@ export const DraggableItem = ({
}, [draggableListGroupContext, draggableId, index]);
if (!isDefined(draggableListGroupContext)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- throw new Error('DraggableItem must be rendered inside a DraggableList');
+ throw new Error(
+ doNotTranslate('DraggableItem must be rendered inside a DraggableList'),
+ );
}
const { group } = draggableListGroupContext;
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useCloseDropdown.ts b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useCloseDropdown.ts
index 84d1dfdeb3b..9f1f813ec15 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useCloseDropdown.ts
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useCloseDropdown.ts
@@ -9,6 +9,7 @@ import { useRemoveFocusItemFromFocusStackById } from '@/ui/utilities/focus/hooks
import { useAvailableComponentInstanceId } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceId';
import { useStore } from 'jotai';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useCloseDropdown = () => {
const { removeFocusItemFromFocusStackById } =
@@ -26,8 +27,9 @@ export const useCloseDropdown = () => {
dropdownComponentInstanceIdFromContext;
if (!isDefined(dropdownComponentInstanceId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- throw new Error('Dropdown component instance ID is not defined');
+ throw new Error(
+ doNotTranslate('Dropdown component instance ID is not defined'),
+ );
}
const isDropdownOpen = store.get(
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts
index 46c29bd3e05..ceb3b1ee8ae 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useOpenDropdown.ts
@@ -10,6 +10,7 @@ import { type GlobalHotkeysConfig } from '@/ui/utilities/hotkey/types/GlobalHotk
import { useAvailableComponentInstanceId } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceId';
import { useStore } from 'jotai';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type OpenDropdownArgs = {
dropdownComponentInstanceIdFromProps?: string;
@@ -33,8 +34,9 @@ export const useOpenDropdown = () => {
dropdownComponentInstanceIdFromContext;
if (!isDefined(dropdownComponentInstanceId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- throw new Error('Dropdown component instance ID is not defined');
+ throw new Error(
+ doNotTranslate('Dropdown component instance ID is not defined'),
+ );
}
setActiveDropdownFocusIdAndMemorizePrevious(dropdownComponentInstanceId);
diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useToggleDropdown.ts b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useToggleDropdown.ts
index 0f2c10bd6d8..ca87a28a6f5 100644
--- a/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useToggleDropdown.ts
+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/hooks/useToggleDropdown.ts
@@ -8,6 +8,7 @@ import { type GlobalHotkeysConfig } from '@/ui/utilities/hotkey/types/GlobalHotk
import { useAvailableComponentInstanceId } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceId';
import { useStore } from 'jotai';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type ToggleDropdownArgs = {
dropdownComponentInstanceIdFromProps?: string;
@@ -30,8 +31,9 @@ export const useToggleDropdown = () => {
dropdownComponentInstanceIdFromContext;
if (!isDefined(dropdownComponentInstanceId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- throw new Error('Dropdown component instance ID is not defined');
+ throw new Error(
+ doNotTranslate('Dropdown component instance ID is not defined'),
+ );
}
const isDropdownOpen = store.get(
diff --git a/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/internal/useSyncSelectableListItems.ts b/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/internal/useSyncSelectableListItems.ts
index fc9420d2610..27d42232a81 100644
--- a/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/internal/useSyncSelectableListItems.ts
+++ b/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/internal/useSyncSelectableListItems.ts
@@ -1,6 +1,7 @@
import { useStore } from 'jotai';
import { useEffect } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList';
import { selectableItemIdsComponentState } from '@/ui/layout/selectable-list/states/selectableItemIdsComponentState';
@@ -35,8 +36,9 @@ export const useSyncSelectableListItems = ({
useEffect(() => {
if (!selectableItemIdArray && !selectableItemIdMatrix) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- 'Either selectableItemIdArray or selectableItemIdsMatrix must be provided',
+ doNotTranslate(
+ 'Either selectableItemIdArray or selectableItemIdsMatrix must be provided',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/useSelectableListNativeItemRef.ts b/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/useSelectableListNativeItemRef.ts
index baa623d406d..1fb8f197efc 100644
--- a/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/useSelectableListNativeItemRef.ts
+++ b/packages/twenty-front/src/modules/ui/layout/selectable-list/hooks/useSelectableListNativeItemRef.ts
@@ -1,5 +1,6 @@
import { useCallback, useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { SelectableListNativeItemRefsContext } from '@/ui/layout/selectable-list/states/contexts/SelectableListNativeItemRefsContext';
@@ -7,8 +8,9 @@ export const useSelectableListNativeItemRef = (itemId: string) => {
const nativeItemRefs = useContext(SelectableListNativeItemRefsContext);
if (!isDefined(nativeItemRefs)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- throw new Error('SelectableList native item refs are not available');
+ throw new Error(
+ doNotTranslate('SelectableList native item refs are not available'),
+ );
}
return useCallback(
diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/styles/ScrollableTabRowCSS.ts b/packages/twenty-front/src/modules/ui/layout/tab-list/styles/ScrollableTabRowCSS.ts
index 0fe2abe52ad..e0deae5cee0 100644
--- a/packages/twenty-front/src/modules/ui/layout/tab-list/styles/ScrollableTabRowCSS.ts
+++ b/packages/twenty-front/src/modules/ui/layout/tab-list/styles/ScrollableTabRowCSS.ts
@@ -1,6 +1,7 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
// A width breakpoint also matches narrow desktop windows, where a mouse cannot swipe, so only coarse pointers lose the scrollbar
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This template is CSS layout syntax.
-export const SCROLLABLE_TAB_ROW_CSS = `
+export const SCROLLABLE_TAB_ROW_CSS = doNotTranslate(`
overflow-y: hidden;
@media (pointer: coarse) {
@@ -10,4 +11,4 @@ export const SCROLLABLE_TAB_ROW_CSS = `
display: none;
}
}
-`;
+`);
diff --git a/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx b/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx
index 369411d339d..0798766f363 100644
--- a/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx
+++ b/packages/twenty-front/src/modules/ui/suggestion/components/SuggestionMenu.tsx
@@ -23,6 +23,7 @@ import { SuggestionItemPreviewTooltip } from '@/ui/suggestion/components/Suggest
import type { SuggestionMenuProps } from '@/ui/suggestion/types/SuggestionMenuProps';
import { getSuggestionMenuItemAnchorId } from '@/ui/suggestion/utils/getSuggestionMenuItemAnchorId';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIsMobile } from 'twenty-ui/utilities';
type SuggestionMenuInnerProps<TItem> = SuggestionMenuProps<TItem>;
@@ -104,8 +105,7 @@ const SuggestionMenuInner = <TItem,>(
return true;
}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
- const navigationKeys = ['ArrowUp', 'ArrowDown', 'Enter'];
+ const navigationKeys = ['ArrowUp', 'ArrowDown', doNotTranslate('Enter')];
if (navigationKeys.includes(event.key)) {
switch (event.key) {
case 'ArrowUp': {
diff --git a/packages/twenty-front/src/modules/ui/theme/constants/MonospaceFontFamily.ts b/packages/twenty-front/src/modules/ui/theme/constants/MonospaceFontFamily.ts
index a4de4d4213e..daf061dba49 100644
--- a/packages/twenty-front/src/modules/ui/theme/constants/MonospaceFontFamily.ts
+++ b/packages/twenty-front/src/modules/ui/theme/constants/MonospaceFontFamily.ts
@@ -1,2 +1,5 @@
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a CSS font-family stack.
-export const MONOSPACE_FONT_FAMILY = `'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace`;
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+export const MONOSPACE_FONT_FAMILY = doNotTranslate(
+ `'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace`,
+);
diff --git a/packages/twenty-front/src/modules/ui/theme/hooks/useSystemColorScheme.ts b/packages/twenty-front/src/modules/ui/theme/hooks/useSystemColorScheme.ts
index 9ce22d24a2e..7430b633d15 100644
--- a/packages/twenty-front/src/modules/ui/theme/hooks/useSystemColorScheme.ts
+++ b/packages/twenty-front/src/modules/ui/theme/hooks/useSystemColorScheme.ts
@@ -1,6 +1,8 @@
import { useMediaQuery } from 'twenty-ui/utilities';
import { type ColorScheme } from '@/ui/theme/types/ColorScheme';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSystemColorScheme = (): ColorScheme =>
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The media query and color-scheme values are API identifiers.
- useMediaQuery('(prefers-color-scheme: dark)') ? 'Dark' : 'Light';
+ useMediaQuery(doNotTranslate('(prefers-color-scheme: dark)'))
+ ? doNotTranslate('Dark')
+ : doNotTranslate('Light');
diff --git a/packages/twenty-front/src/modules/ui/theme/states/persistedColorSchemeState.ts b/packages/twenty-front/src/modules/ui/theme/states/persistedColorSchemeState.ts
index 84aec044e26..f60d3ab2fcb 100644
--- a/packages/twenty-front/src/modules/ui/theme/states/persistedColorSchemeState.ts
+++ b/packages/twenty-front/src/modules/ui/theme/states/persistedColorSchemeState.ts
@@ -1,9 +1,9 @@
import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
import { type ColorScheme } from '@/ui/theme/types/ColorScheme';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const persistedColorSchemeState = createAtomState<ColorScheme>({
key: 'persistedColorSchemeState',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted appearance preference identifier.
- defaultValue: 'System',
+ defaultValue: doNotTranslate('System'),
useLocalStorage: true,
});
diff --git a/packages/twenty-front/src/modules/ui/theme/states/persistedUiScaleStepState.ts b/packages/twenty-front/src/modules/ui/theme/states/persistedUiScaleStepState.ts
index 3ecfe0341b2..5066966f16b 100644
--- a/packages/twenty-front/src/modules/ui/theme/states/persistedUiScaleStepState.ts
+++ b/packages/twenty-front/src/modules/ui/theme/states/persistedUiScaleStepState.ts
@@ -1,11 +1,11 @@
import { UI_SCALE_MULTIPLIERS } from '@/ui/theme/constants/UiScaleMultipliers';
import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';
import { type UiScale } from '@/ui/theme/types/UiScale';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const persistedUiScaleStepState = createAtomState<UiScale>({
key: 'persistedUiScaleStepState',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted appearance preference identifier.
- defaultValue: 'Default',
+ defaultValue: doNotTranslate('Default'),
useLocalStorage: true,
validateInitFn: (step) => Object.hasOwn(UI_SCALE_MULTIPLIERS, step),
});
diff --git a/packages/twenty-front/src/modules/ui/utilities/hotkey/utils/isNonTextWritingKey.ts b/packages/twenty-front/src/modules/ui/utilities/hotkey/utils/isNonTextWritingKey.ts
index 7b16bb9b9e7..c73f9072ba1 100644
--- a/packages/twenty-front/src/modules/ui/utilities/hotkey/utils/isNonTextWritingKey.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/hotkey/utils/isNonTextWritingKey.ts
@@ -1,20 +1,16 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
export const isNonTextWritingKey = (key: string) => {
- const nonTextWritingKeys = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
+ const nonTextWritingKeys = doNotTranslate([
'Enter',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Tab',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Shift',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Escape',
'ArrowUp',
'ArrowDown',
'ArrowLeft',
'ArrowRight',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Delete',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Backspace',
'F1',
'F2',
@@ -28,25 +24,17 @@ export const isNonTextWritingKey = (key: string) => {
'F10',
'F11',
'F12',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Meta',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Alt',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Control',
'CapsLock',
'NumLock',
'ScrollLock',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Pause',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Insert',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Home',
'PageUp',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'Delete',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values must match KeyboardEvent.key identifiers.
'End',
'PageDown',
'ContextMenu',
@@ -65,7 +53,7 @@ export const isNonTextWritingKey = (key: string) => {
'MediaTrackPrevious',
'MediaStop',
'MediaPlayPause',
- ];
+ ]);
return nonTextWritingKeys.includes(key);
};
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow.ts b/packages/twenty-front/src/modules/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow.ts
index 8f252509e6f..7f93eb699ca 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow.ts
@@ -1,6 +1,7 @@
import { useComponentInstanceStateContext } from '@/ui/utilities/state/component-state/hooks/useComponentInstanceStateContext';
import { type ComponentInstanceStateContext } from '@/ui/utilities/state/component-state/types/ComponentInstanceStateContext';
import { isNonEmptyString } from '@sniptt/guards';
+import { doNotTranslate } from 'twenty-shared/i18n';
// Callers make the id unique where they create it; it is never rewritten here, since some state is deliberately
// shared across surfaces and ids are looked up verbatim as DOM anchors
@@ -23,7 +24,8 @@ export const useAvailableComponentInstanceIdOrThrow = <
}
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- 'Instance id is not provided and cannot be found in context.',
+ doNotTranslate(
+ 'Instance id is not provided and cannot be found in context.',
+ ),
);
};
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorCallbackState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorCallbackState.ts
index 18090594582..5cf91d16f1f 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorCallbackState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorCallbackState.ts
@@ -3,6 +3,7 @@ import { useCallback } from 'react';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentFamilySelector } from '@/ui/utilities/state/jotai/types/ComponentFamilySelector';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentFamilySelectorCallbackState = <
StateType,
@@ -21,8 +22,9 @@ export const useAtomComponentFamilySelectorCallbackState = <
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentFamilySelector.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentFamilySelector.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue.ts
index 610dd8b1522..d717e12a186 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue.ts
@@ -3,6 +3,7 @@ import { useAtomValue } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentFamilySelector } from '@/ui/utilities/state/jotai/types/ComponentFamilySelector';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentFamilySelectorValue = <StateType, FamilyKey>(
componentFamilySelector: ComponentFamilySelector<StateType, FamilyKey>,
@@ -15,8 +16,9 @@ export const useAtomComponentFamilySelectorValue = <StateType, FamilyKey>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentFamilySelector.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentFamilySelector.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState.ts
index 36223c34d6a..b457aa1cf02 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState.ts
@@ -3,6 +3,7 @@ import { useAtom } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentFamilyState } from '@/ui/utilities/state/jotai/types/ComponentFamilyState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentFamilyState = <StateType, FamilyKey>(
componentState: ComponentFamilyState<StateType, FamilyKey>,
@@ -18,8 +19,9 @@ export const useAtomComponentFamilyState = <StateType, FamilyKey>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState.ts
index 00a473e2317..47956246f54 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateCallbackState.ts
@@ -3,6 +3,7 @@ import { useCallback } from 'react';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentFamilyState } from '@/ui/utilities/state/jotai/types/ComponentFamilyState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentFamilyStateCallbackState = <StateType, FamilyKey>(
componentFamilyState: ComponentFamilyState<StateType, FamilyKey>,
@@ -16,8 +17,9 @@ export const useAtomComponentFamilyStateCallbackState = <StateType, FamilyKey>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentFamilyState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentFamilyState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue.ts
index 97f7ef8406b..c7171f99677 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentFamilyStateValue.ts
@@ -3,6 +3,7 @@ import { useAtomValue } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentFamilyState } from '@/ui/utilities/state/jotai/types/ComponentFamilyState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentFamilyStateValue = <StateType, FamilyKey>(
componentState: ComponentFamilyState<StateType, FamilyKey>,
@@ -15,8 +16,9 @@ export const useAtomComponentFamilyStateValue = <StateType, FamilyKey>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorCallbackState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorCallbackState.ts
index 121c29b127f..0db22339285 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorCallbackState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorCallbackState.ts
@@ -3,6 +3,7 @@ import { useMemo } from 'react';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentSelector } from '@/ui/utilities/state/jotai/types/ComponentSelector';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentSelectorCallbackState = <StateType>(
componentSelector: ComponentSelector<StateType>,
@@ -14,8 +15,9 @@ export const useAtomComponentSelectorCallbackState = <StateType>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentSelector.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentSelector.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue.ts
index 72b7abfd08d..8583c10516d 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue.ts
@@ -3,6 +3,7 @@ import { useAtomValue } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentSelector } from '@/ui/utilities/state/jotai/types/ComponentSelector';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentSelectorValue = <StateType>(
componentSelector: ComponentSelector<StateType>,
@@ -14,8 +15,9 @@ export const useAtomComponentSelectorValue = <StateType>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentSelector.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentSelector.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentState.ts
index acd0b7b3615..7237e53e920 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentState.ts
@@ -3,6 +3,7 @@ import { useAtom } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentState } from '@/ui/utilities/state/jotai/types/ComponentState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentState = <StateType>(
componentState: ComponentState<StateType>,
@@ -17,8 +18,9 @@ export const useAtomComponentState = <StateType>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState.ts
index d27d5f0504d..c5f95f3a5c0 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateCallbackState.ts
@@ -3,6 +3,7 @@ import { useMemo } from 'react';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentState } from '@/ui/utilities/state/jotai/types/ComponentState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentStateCallbackState = <StateType>(
componentState: ComponentState<StateType>,
@@ -14,8 +15,9 @@ export const useAtomComponentStateCallbackState = <StateType>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateValue.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateValue.ts
index 5503e6aa12b..a6cabf8c37e 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateValue.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useAtomComponentStateValue.ts
@@ -3,6 +3,7 @@ import { useAtomValue } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentState } from '@/ui/utilities/state/jotai/types/ComponentState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useAtomComponentStateValue = <StateType>(
componentState: ComponentState<StateType>,
@@ -14,8 +15,9 @@ export const useAtomComponentStateValue = <StateType>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentFamilyState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentFamilyState.ts
index c930f08c5a8..6df54346c42 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentFamilyState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentFamilyState.ts
@@ -3,6 +3,7 @@ import { useSetAtom } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentFamilyState } from '@/ui/utilities/state/jotai/types/ComponentFamilyState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSetAtomComponentFamilyState = <ValueType, FamilyKey>(
componentState: ComponentFamilyState<ValueType, FamilyKey>,
@@ -15,8 +16,9 @@ export const useSetAtomComponentFamilyState = <ValueType, FamilyKey>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentState.ts b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentState.ts
index 30611178a6d..028906e4eaa 100644
--- a/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentState.ts
+++ b/packages/twenty-front/src/modules/ui/utilities/state/jotai/hooks/useSetAtomComponentState.ts
@@ -3,6 +3,7 @@ import { useSetAtom } from 'jotai';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
import { globalComponentInstanceContextMap } from '@/ui/utilities/state/component-state/utils/globalComponentInstanceContextMap';
import { type ComponentState } from '@/ui/utilities/state/jotai/types/ComponentState';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useSetAtomComponentState = <ValueType>(
componentState: ComponentState<ValueType>,
@@ -14,8 +15,9 @@ export const useSetAtomComponentState = <ValueType>(
if (!componentInstanceContext) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This missing component state is a developer invariant diagnostic.
- `Instance context for key "${componentState.key}" is not defined`,
+ doNotTranslate(
+ `Instance context for key "${componentState.key}" is not defined`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/validation-rules/constants/ValidationRuleKeywords.ts b/packages/twenty-front/src/modules/validation-rules/constants/ValidationRuleKeywords.ts
index f5badda4932..6d5a8cf263b 100644
--- a/packages/twenty-front/src/modules/validation-rules/constants/ValidationRuleKeywords.ts
+++ b/packages/twenty-front/src/modules/validation-rules/constants/ValidationRuleKeywords.ts
@@ -1,27 +1,27 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Keywords show validation expression syntax.
import { msg } from '@lingui/core/macro';
import { type ValidationRuleSyntaxDefinition } from '@/validation-rules/types/ValidationRuleSyntaxDefinition';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const VALIDATION_RULE_KEYWORDS: ValidationRuleSyntaxDefinition[] = [
{
name: 'and',
- signature: 'a and b',
+ signature: doNotTranslate('a and b'),
description: msg`True when both sides are true.`,
},
{
name: 'or',
- signature: 'a or b',
+ signature: doNotTranslate('a or b'),
description: msg`True when at least one side is true.`,
},
{
name: 'not',
- signature: 'not a',
+ signature: doNotTranslate('not a'),
description: msg`Turns true into false and false into true.`,
},
{
name: 'in',
- signature: 'value in [a, b]',
+ signature: doNotTranslate('value in [a, b]'),
description: msg`True when the value is one of the listed values.`,
},
{
diff --git a/packages/twenty-front/src/modules/validation-rules/utils/computeValidationRuleHelperItemExamples.ts b/packages/twenty-front/src/modules/validation-rules/utils/computeValidationRuleHelperItemExamples.ts
index f166311a9d0..5c51a49d888 100644
--- a/packages/twenty-front/src/modules/validation-rules/utils/computeValidationRuleHelperItemExamples.ts
+++ b/packages/twenty-front/src/modules/validation-rules/utils/computeValidationRuleHelperItemExamples.ts
@@ -1,6 +1,6 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Examples are executable validation expressions.
import { FieldMetadataType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type ValidationRuleEditorField } from '@/validation-rules/types/ValidationRuleEditorField';
import { type ValidationRuleHelperItem } from '@/validation-rules/types/ValidationRuleHelperItem';
@@ -33,34 +33,39 @@ const computeFieldExamples = ({
const [firstOption, secondOption] = selectOptionValues;
if (TEXT_TYPES.includes(type)) {
- return [`isNonEmptyString(${path})`, `${path} != "N/A"`];
+ return [`isNonEmptyString(${path})`, doNotTranslate(`${path} != "N/A"`)];
}
if (NUMBER_TYPES.includes(type)) {
- return [`${path} > 0`, `not isDefined(${path}) or ${path} <= 1000`];
+ return [
+ `${path} > 0`,
+ doNotTranslate(`not isDefined(${path}) or ${path} <= 1000`),
+ ];
}
if (DATE_TYPES.includes(type)) {
- return [`${path} >= now`, `isDefined(${path})`];
+ return [doNotTranslate(`${path} >= now`), `isDefined(${path})`];
}
if (type === FieldMetadataType.BOOLEAN) {
- return [`${path} == true`];
+ return [doNotTranslate(`${path} == true`)];
}
if (type === FieldMetadataType.SELECT && isDefined(firstOption)) {
return [
`${path} == ${quote(firstOption)}`,
- `${path} in [${[firstOption, secondOption].filter(isDefined).map(quote).join(', ')}]`,
+ doNotTranslate(
+ `${path} in [${[firstOption, secondOption].filter(isDefined).map(quote).join(', ')}]`,
+ ),
];
}
if (LIST_TYPES.includes(type)) {
return [
...(isDefined(firstOption)
- ? [`includes(${path}, ${quote(firstOption)})`]
+ ? [doNotTranslate(`includes(${path}, ${quote(firstOption)})`)]
: []),
- `arrayLength(${path}) > 0`,
+ doNotTranslate(`arrayLength(${path}) > 0`),
];
}
@@ -75,7 +80,11 @@ const computeFieldExamples = ({
return [
`isDefined(${path})`,
...(isDefined(member)
- ? [`not isDefined(${path}) or isDefined(${member.path})`]
+ ? [
+ doNotTranslate(
+ `not isDefined(${path}) or isDefined(${member.path})`,
+ ),
+ ]
: []),
];
}
@@ -89,7 +98,7 @@ const computeFieldExamples = ({
);
return [
- `not isEmpty(${path})`,
+ doNotTranslate(`not isEmpty(${path})`),
...(isDefined(member) ? [`isNonEmptyString(${member.path})`] : []),
];
}
@@ -121,7 +130,9 @@ const computeFunctionExamples = ({
findField(rootFields, (candidate) => candidate.hasMembers) ??
findField(rootFields, () => true);
- return isDefined(field) ? [`not isEmpty(${field.path})`] : [];
+ return isDefined(field)
+ ? [doNotTranslate(`not isEmpty(${field.path})`)]
+ : [];
}
case 'isNonEmptyString': {
const field = findFieldOfTypes(fields, TEXT_TYPES);
@@ -140,17 +151,23 @@ const computeFunctionExamples = ({
return [
...(isDefined(listField) && isDefined(firstOption)
- ? [`includes(${listField.path}, ${quote(firstOption)})`]
+ ? [
+ doNotTranslate(
+ `includes(${listField.path}, ${quote(firstOption)})`,
+ ),
+ ]
: []),
...(isDefined(textField)
- ? [`not includes(${textField.path}, "test")`]
+ ? [doNotTranslate(`not includes(${textField.path}, "test")`)]
: []),
];
}
case 'arrayLength': {
const field = findFieldOfTypes(rootFields, LIST_TYPES);
- return isDefined(field) ? [`arrayLength(${field.path}) > 0`] : [];
+ return isDefined(field)
+ ? [doNotTranslate(`arrayLength(${field.path}) > 0`)]
+ : [];
}
default:
return [];
@@ -174,11 +191,15 @@ const computeKeywordExamples = ({
case 'or':
return isDefined(firstField) && isDefined(secondField)
? [
- `isDefined(${firstField.path}) ${name} isDefined(${secondField.path})`,
+ doNotTranslate(
+ `isDefined(${firstField.path}) ${name} isDefined(${secondField.path})`,
+ ),
]
: [];
case 'not':
- return isDefined(firstField) ? [`not isEmpty(${firstField.path})`] : [];
+ return isDefined(firstField)
+ ? [doNotTranslate(`not isEmpty(${firstField.path})`)]
+ : [];
case 'in': {
const field = findField(
rootFields,
@@ -189,14 +210,16 @@ const computeKeywordExamples = ({
return isDefined(field)
? [
- `${field.path} in [${field.selectOptionValues.slice(0, 2).map(quote).join(', ')}]`,
+ doNotTranslate(
+ `${field.path} in [${field.selectOptionValues.slice(0, 2).map(quote).join(', ')}]`,
+ ),
]
: [];
}
case 'now': {
const field = findFieldOfTypes(rootFields, DATE_TYPES);
- return isDefined(field) ? [`${field.path} >= now`] : [];
+ return isDefined(field) ? [doNotTranslate(`${field.path} >= now`)] : [];
}
case 'true':
case 'false': {
diff --git a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx
index d4d4a204a50..f2b4171704d 100644
--- a/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx
+++ b/packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx
@@ -26,6 +26,7 @@ import { useLingui } from '@lingui/react/macro';
import { flushSync } from 'react-dom';
import { RecordFilterGroupLogicalOperator } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { IconFilter } from 'twenty-ui/icon';
import { Badge } from 'twenty-ui/primitives/data-display';
import { themeCssVariables } from 'twenty-ui/theme';
@@ -72,8 +73,9 @@ export const ViewBarFilterDropdownAdvancedFilterButton = () => {
const objectMetadataId = currentView?.objectMetadataId;
if (!objectMetadataId) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Object metadata id is missing from current view');
+ throw new Error(
+ doNotTranslate('Object metadata id is missing from current view'),
+ );
}
const { objectMetadataItem } = useObjectMetadataItemById({
@@ -99,8 +101,7 @@ export const ViewBarFilterDropdownAdvancedFilterButton = () => {
const handleClick = () => {
if (!isDefined(currentView)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Missing current view id');
+ throw new Error(doNotTranslate('Missing current view id'));
}
const alreadyHasAdvancedFilterGroup = currentRecordFilterGroups.length > 0;
@@ -114,8 +115,7 @@ export const ViewBarFilterDropdownAdvancedFilterButton = () => {
) ?? availableFieldMetadataItemsForFilter[0];
if (!isDefined(defaultFieldMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Missing default filter definition');
+ throw new Error(doNotTranslate('Missing default filter definition'));
}
flushSync(() => {
diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewApiPersist.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewApiPersist.ts
index edf4b9beea5..abe6683262a 100644
--- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewApiPersist.ts
+++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewApiPersist.ts
@@ -11,6 +11,7 @@ import { useMutation } from '@apollo/client/react';
import { useStore } from 'jotai';
import { CrudOperationType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import {
CreateViewDocument,
@@ -62,8 +63,7 @@ export const usePerformViewApiPersist = () => {
const newView = mutationResult.data?.createView;
if (!isDefined(newView)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Failed to create view');
+ throw new Error(doNotTranslate('Failed to create view'));
}
const {
diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterGroupApiPersist.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterGroupApiPersist.ts
index df5ddb73956..24b047e6fa2 100644
--- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterGroupApiPersist.ts
+++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterGroupApiPersist.ts
@@ -8,6 +8,7 @@ import { type ViewFilterGroup } from '@/views/types/ViewFilterGroup';
import { useMutation } from '@apollo/client/react';
import { CrudOperationType } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
CreateViewFilterGroupDocument,
DestroyViewFilterGroupDocument,
@@ -46,8 +47,7 @@ export const usePerformViewFilterGroupApiPersist = () => {
});
if (!isDefined(result.data)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Failed to create view filter group');
+ throw new Error(doNotTranslate('Failed to create view filter group'));
}
return { newRecord: result.data.createViewFilterGroup };
diff --git a/packages/twenty-front/src/modules/views/hooks/useComputeRecordRelationFilterDisplayValue.tsx b/packages/twenty-front/src/modules/views/hooks/useComputeRecordRelationFilterDisplayValue.tsx
index 77bd9f72844..668af8ccece 100644
--- a/packages/twenty-front/src/modules/views/hooks/useComputeRecordRelationFilterDisplayValue.tsx
+++ b/packages/twenty-front/src/modules/views/hooks/useComputeRecordRelationFilterDisplayValue.tsx
@@ -16,6 +16,7 @@ import {
isNonEmptyArray,
jsonRelationFilterValueSchema,
} from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type UseComputeRecordRelationFilterDisplayValueParams = {
recordFilter: RecordFilter;
@@ -28,8 +29,9 @@ export const useComputeRecordRelationFilterDisplayValue = ({
const { objectMetadataItems } = useObjectMetadataItems();
if (!isDefined(recordFilter.fieldMetadataId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('recordFilter.fieldMetadataId is not defined');
+ throw new Error(
+ doNotTranslate('recordFilter.fieldMetadataId is not defined'),
+ );
}
// Nested relation filters resolve records from the leaf relation's target object, direct filters from the source.
diff --git a/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts b/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts
index 7bd6ab380b9..7805594713f 100644
--- a/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts
+++ b/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts
@@ -21,6 +21,7 @@ import { mapRecordSortToViewSort } from '@/views/utils/mapRecordSortToViewSort';
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import { ViewCalendarLayout } from '~/generated-metadata/graphql';
@@ -161,8 +162,7 @@ export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {
const newViewId = result.response.data?.createView.id;
if (!isDefined(newViewId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Failed to create view');
+ throw new Error(doNotTranslate('Failed to create view'));
}
const fieldResult = await performViewFieldApiCreate({
diff --git a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts
index 5783194675e..a7f56d0e2e6 100644
--- a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts
+++ b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts
@@ -8,6 +8,7 @@ import { useCanPersistViewChanges } from '@/views/hooks/useCanPersistViewChanges
import { useGetViewFromState } from '@/views/hooks/useGetViewFromState';
import { type ViewGroup } from '@/views/types/ViewGroup';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
export const useSaveCurrentViewGroups = () => {
@@ -146,8 +147,9 @@ export const useSaveCurrentViewGroups = () => {
.filter(isDefined);
if (!isDefined(view.mainGroupByFieldMetadataId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('mainGroupByFieldMetadataId is required');
+ throw new Error(
+ doNotTranslate('mainGroupByFieldMetadataId is required'),
+ );
}
await performViewGroupApiUpdate({ inputs: viewGroupInputsToUpdate });
diff --git a/packages/twenty-front/src/modules/views/hooks/useViewsSideEffectsOnViewGroups.ts b/packages/twenty-front/src/modules/views/hooks/useViewsSideEffectsOnViewGroups.ts
index 61476527258..8bd6dbbb061 100644
--- a/packages/twenty-front/src/modules/views/hooks/useViewsSideEffectsOnViewGroups.ts
+++ b/packages/twenty-front/src/modules/views/hooks/useViewsSideEffectsOnViewGroups.ts
@@ -2,6 +2,7 @@ import { objectMetadataItemsSelector } from '@/object-metadata/states/objectMeta
import { type ViewGroup } from '@/views/types/ViewGroup';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
const useViewsSideEffectsOnViewGroups = () => {
@@ -23,8 +24,7 @@ const useViewsSideEffectsOnViewGroups = () => {
);
if (!isDefined(objectMetadataItem)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Object metadata item not found');
+ throw new Error(doNotTranslate('Object metadata item not found'));
}
let viewGroupsToCreate: ViewGroup[] = [];
diff --git a/packages/twenty-front/src/modules/views/utils/duplicateViewFiltersAndViewFilterGroups.ts b/packages/twenty-front/src/modules/views/utils/duplicateViewFiltersAndViewFilterGroups.ts
index a55892fef80..0b604f0bfb3 100644
--- a/packages/twenty-front/src/modules/views/utils/duplicateViewFiltersAndViewFilterGroups.ts
+++ b/packages/twenty-front/src/modules/views/utils/duplicateViewFiltersAndViewFilterGroups.ts
@@ -2,6 +2,7 @@ import { type ViewFilter } from '@/views/types/ViewFilter';
import { type ViewFilterGroup } from '@/views/types/ViewFilterGroup';
import { v4 } from 'uuid';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const duplicateViewFiltersAndViewFilterGroups = ({
viewFilterGroupsToDuplicate,
@@ -34,8 +35,9 @@ export const duplicateViewFiltersAndViewFilterGroups = ({
!isDefined(newViewFilterGroupId)
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Failed to find view filter group to copy for id ${viewFilterGroupToCopy.id} this shouldn't happen`,
+ doNotTranslate(
+ `Failed to find view filter group to copy for id ${viewFilterGroupToCopy.id} this shouldn't happen`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts b/packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts
index 71c7c2db5e6..6fc409a1b3d 100644
--- a/packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts
+++ b/packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts
@@ -8,6 +8,7 @@ import {
} from '@/object-record/record-group/types/RecordGroupDefinition';
import { type ViewGroup } from '@/views/types/ViewGroup';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type ThemeColor } from 'twenty-ui/theme';
import { FieldMetadataType } from '~/generated-metadata/graphql';
@@ -112,8 +113,9 @@ export const mapViewGroupsToRecordGroupDefinitions = ({
} else if (groupByFieldMetadataItem.type === FieldMetadataType.SELECT) {
if (!groupByFieldMetadataItem.options) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Select Field ${objectMetadataItem.nameSingular} has no options`,
+ doNotTranslate(
+ `Select Field ${objectMetadataItem.nameSingular} has no options`,
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/views/view-filter-value/utils/stringifyRelativeDateFilter.ts b/packages/twenty-front/src/modules/views/view-filter-value/utils/stringifyRelativeDateFilter.ts
index 09d82dbfdef..b8ec1d3a50b 100644
--- a/packages/twenty-front/src/modules/views/view-filter-value/utils/stringifyRelativeDateFilter.ts
+++ b/packages/twenty-front/src/modules/views/view-filter-value/utils/stringifyRelativeDateFilter.ts
@@ -1,6 +1,7 @@
import { detectCalendarStartDay } from '@/localization/utils/detection/detectCalendarStartDay';
import { isNonEmptyString } from '@sniptt/guards';
import { isDefined, type RelativeDateFilter } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const stringifyRelativeDateFilter = (
relativeDateFilter: RelativeDateFilter,
@@ -14,8 +15,9 @@ export const stringifyRelativeDateFilter = (
relativeDateFilter.amount <= 0
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Amount must be defined and greater than 0 for relative date filters',
+ doNotTranslate(
+ 'Amount must be defined and greater than 0 for relative date filters',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx b/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx
index faa67f92430..02f373575a5 100644
--- a/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx
+++ b/packages/twenty-front/src/modules/workflow/components/WorkflowEditUpdateEventFieldsMultiSelect.tsx
@@ -6,6 +6,7 @@ import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/is
import { shouldDisplayFormField } from '@/workflow/workflow-steps/workflow-actions/utils/shouldDisplayFormField';
import { t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIcons } from 'twenty-ui/icon';
import { RelationType } from '~/generated-metadata/graphql';
@@ -74,8 +75,7 @@ export const WorkflowFieldsMultiSelect = ({
field.metadata.relationType === RelationType.MANY_TO_ONE;
const value = isFieldRelationManyToOne
- ? // oxlint-disable-next-line lingui/no-unlocalized-strings -- This suffix forms a GraphQL field identifier.
- `${field.metadata.fieldName}Id`
+ ? doNotTranslate(`${field.metadata.fieldName}Id`)
: field.metadata.fieldName;
return {
diff --git a/packages/twenty-front/src/modules/workflow/constants/WorkflowStepDefaultNames.ts b/packages/twenty-front/src/modules/workflow/constants/WorkflowStepDefaultNames.ts
index 5781dc18b1a..4a562202a2d 100644
--- a/packages/twenty-front/src/modules/workflow/constants/WorkflowStepDefaultNames.ts
+++ b/packages/twenty-front/src/modules/workflow/constants/WorkflowStepDefaultNames.ts
@@ -27,13 +27,13 @@ import { MANUAL_TRIGGER } from '@/workflow/workflow-trigger/constants/triggers/M
import { WEBHOOK_TRIGGER } from '@/workflow/workflow-trigger/constants/triggers/WebhookTrigger';
import { type MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/core/macro';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// oxlint-disable lingui/no-unlocalized-strings -- Stored step names must match their English keys before the display descriptor is translated.
export const WORKFLOW_STEP_DEFAULT_NAMES: Array<{
type: WorkflowActionType | WorkflowTriggerType;
name: string;
label: MessageDescriptor;
-}> = [
+}> = doNotTranslate([
{
type: 'CODE',
name: 'Code - Logic Function',
@@ -184,4 +184,4 @@ export const WORKFLOW_STEP_DEFAULT_NAMES: Array<{
name: DatabaseTriggerDefaultLabel.RECORD_UPSERTED,
label: msg`Record is created or updated`,
},
-];
+]);
diff --git a/packages/twenty-front/src/modules/workflow/constants/WorkflowTimeZone.ts b/packages/twenty-front/src/modules/workflow/constants/WorkflowTimeZone.ts
index b444a93b0cb..9b5117179bf 100644
--- a/packages/twenty-front/src/modules/workflow/constants/WorkflowTimeZone.ts
+++ b/packages/twenty-front/src/modules/workflow/constants/WorkflowTimeZone.ts
@@ -1,2 +1,3 @@
-// oxlint-disable-next-line lingui/no-unlocalized-strings -- UTC is an IANA time zone identifier.
-export const WORKFLOW_TIMEZONE = 'UTC';
+import { doNotTranslate } from 'twenty-shared/i18n';
+
+export const WORKFLOW_TIMEZONE = doNotTranslate('UTC');
diff --git a/packages/twenty-front/src/modules/workflow/hooks/useFlowOrThrow.ts b/packages/twenty-front/src/modules/workflow/hooks/useFlowOrThrow.ts
index 3e2ff65a394..0efff89f6d7 100644
--- a/packages/twenty-front/src/modules/workflow/hooks/useFlowOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/hooks/useFlowOrThrow.ts
@@ -1,13 +1,13 @@
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { flowComponentState } from '@/workflow/states/flowComponentState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useFlowOrThrow = () => {
const flow = useAtomComponentStateValue(flowComponentState);
if (!isDefined(flow)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Expected the flow to be defined');
+ throw new Error(doNotTranslate('Expected the flow to be defined'));
}
return flow;
diff --git a/packages/twenty-front/src/modules/workflow/hooks/useGetUpdatableWorkflowVersionOrThrow.ts b/packages/twenty-front/src/modules/workflow/hooks/useGetUpdatableWorkflowVersionOrThrow.ts
index b92833aa3f2..c94b5f28931 100644
--- a/packages/twenty-front/src/modules/workflow/hooks/useGetUpdatableWorkflowVersionOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/hooks/useGetUpdatableWorkflowVersionOrThrow.ts
@@ -3,6 +3,7 @@ import { useCreateDraftFromWorkflowVersion } from '@/workflow/hooks/useCreateDra
import { useWorkflowWithCurrentVersion } from '@/workflow/hooks/useWorkflowWithCurrentVersion';
import { workflowVisualizerWorkflowIdComponentState } from '@/workflow/states/workflowVisualizerWorkflowIdComponentState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useGetUpdatableWorkflowVersionOrThrow = (instanceId?: string) => {
const { createDraftFromWorkflowVersion } =
@@ -15,8 +16,9 @@ export const useGetUpdatableWorkflowVersionOrThrow = (instanceId?: string) => {
const getUpdatableWorkflowVersion = async (): Promise<string> => {
if (!isDefined(workflowVisualizerWorkflowId) || !isDefined(workflow)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Failed to get updatable workflow version');
+ throw new Error(
+ doNotTranslate('Failed to get updatable workflow version'),
+ );
}
if (workflow.currentVersion.status === 'DRAFT') {
@@ -29,8 +31,7 @@ export const useGetUpdatableWorkflowVersionOrThrow = (instanceId?: string) => {
});
if (!isDefined(draftVersionId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Failed to create draft version');
+ throw new Error(doNotTranslate('Failed to create draft version'));
}
return draftVersionId;
diff --git a/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx b/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx
index bd8684ea070..eebc463f664 100644
--- a/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx
+++ b/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx
@@ -23,6 +23,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
import { useCallback } from 'react';
import { useMutation } from '@apollo/client/react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
import { useStore } from 'jotai';
@@ -112,8 +113,9 @@ export const useRunWorkflowVersion = () => {
});
if (!isDefined(recordNodeCreatedInCache)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('The record should have been created in cache');
+ throw new Error(
+ doNotTranslate('The record should have been created in cache'),
+ );
}
upsertFindOneRecordQueryInCache({
diff --git a/packages/twenty-front/src/modules/workflow/hooks/useWorkflowRunIdOrThrow.ts b/packages/twenty-front/src/modules/workflow/hooks/useWorkflowRunIdOrThrow.ts
index 60d8fddb040..346ab5f1dbb 100644
--- a/packages/twenty-front/src/modules/workflow/hooks/useWorkflowRunIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/hooks/useWorkflowRunIdOrThrow.ts
@@ -1,6 +1,7 @@
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { workflowVisualizerWorkflowRunIdComponentState } from '@/workflow/states/workflowVisualizerWorkflowRunIdComponentState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useWorkflowRunIdOrThrow = () => {
const workflowVisualizerWorkflowRunId = useAtomComponentStateValue(
@@ -8,8 +9,9 @@ export const useWorkflowRunIdOrThrow = () => {
);
if (!isDefined(workflowVisualizerWorkflowRunId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Expected the workflow run ID to be defined');
+ throw new Error(
+ doNotTranslate('Expected the workflow run ID to be defined'),
+ );
}
return workflowVisualizerWorkflowRunId;
diff --git a/packages/twenty-front/src/modules/workflow/hooks/useWorkflowVersionIdOrThrow.ts b/packages/twenty-front/src/modules/workflow/hooks/useWorkflowVersionIdOrThrow.ts
index daccb8ade08..0cbf7e6a49e 100644
--- a/packages/twenty-front/src/modules/workflow/hooks/useWorkflowVersionIdOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/hooks/useWorkflowVersionIdOrThrow.ts
@@ -1,6 +1,7 @@
import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';
import { workflowVisualizerWorkflowVersionIdComponentState } from '@/workflow/states/workflowVisualizerWorkflowVersionIdComponentState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useWorkflowVersionIdOrThrow = () => {
const workflowVisualizerWorkflowVersionId = useAtomComponentStateValue(
@@ -8,8 +9,9 @@ export const useWorkflowVersionIdOrThrow = () => {
);
if (!isDefined(workflowVisualizerWorkflowVersionId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Expected the workflow version ID to be defined');
+ throw new Error(
+ doNotTranslate('Expected the workflow version ID to be defined'),
+ );
}
return workflowVisualizerWorkflowVersionId;
diff --git a/packages/twenty-front/src/modules/workflow/utils/getStepDefinitionOrThrow.ts b/packages/twenty-front/src/modules/workflow/utils/getStepDefinitionOrThrow.ts
index bc5906c6d9f..c69dceda56d 100644
--- a/packages/twenty-front/src/modules/workflow/utils/getStepDefinitionOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/utils/getStepDefinitionOrThrow.ts
@@ -4,6 +4,7 @@ import {
} from '@/workflow/types/Workflow';
import { findStepPosition } from '@/workflow/utils/findStepPosition';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';
export const getStepDefinitionOrThrow = ({
@@ -31,8 +32,9 @@ export const getStepDefinitionOrThrow = ({
if (!isDefined(steps)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Malformed workflow version: missing steps information; be sure to create at least one step before trying to edit one',
+ doNotTranslate(
+ 'Malformed workflow version: missing steps information; be sure to create at least one step before trying to edit one',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx
index fdd34d46213..1c5ada310e5 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasBase.tsx
@@ -69,6 +69,7 @@ import React, {
useState,
} from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { WORKFLOW_DIAGRAM_DEFAULT_NODE_DIMENSIONS } from 'twenty-shared/workflow';
import { Tag, type TagColor } from 'twenty-ui/primitives/data-display';
import {
@@ -291,8 +292,9 @@ export const WorkflowDiagramCanvasBase = ({
setWorkflowDiagram((diagram) => {
if (isDefined(diagram) === false) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'It must be impossible for the edges to be updated if the diagram is not defined yet. Be sure the diagram is rendered only when defined.',
+ doNotTranslate(
+ 'It must be impossible for the edges to be updated if the diagram is not defined yet. Be sure the diagram is rendered only when defined.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx
index 322dd670cf3..003c0a65e6f 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowDiagramCanvasEditable.tsx
@@ -34,6 +34,7 @@ import {
} from '@xyflow/react';
import { useRef } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const WorkflowDiagramCanvasEditable = () => {
const workflowVisualizerWorkflowId = useAtomComponentStateValue(
@@ -86,8 +87,9 @@ export const WorkflowDiagramCanvasEditable = () => {
setWorkflowDiagram((diagram) => {
if (isDefined(diagram) === false) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'It must be impossible for the edges to be updated if the diagram is not defined yet. Be sure the diagram is rendered only when defined.',
+ doNotTranslate(
+ 'It must be impossible for the edges to be updated if the diagram is not defined yet. Be sure the diagram is rendered only when defined.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunVisualizerEffect.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunVisualizerEffect.tsx
index 09a1cf79296..e13c2d2ebb1 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunVisualizerEffect.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunVisualizerEffect.tsx
@@ -20,6 +20,7 @@ import { useStepsOutputSchema } from '@/workflow/workflow-variables/hooks/useSte
import { useStore } from 'jotai';
import { useCallback, useContext, useEffect } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIcons } from 'twenty-ui/icon';
@@ -187,8 +188,9 @@ export const WorkflowRunVisualizerEffect = ({
);
if (!isDefined(currentWorkflowVisualizerWorkflowId)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'The workflow id must be set; ensure the workflow id is always set before rendering the workflow diagram.',
+ doNotTranslate(
+ 'The workflow id must be set; ensure the workflow id is always set before rendering the workflow diagram.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/constants/WorkflowDiagramEmptyNodeDefinition.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/constants/WorkflowDiagramEmptyNodeDefinition.ts
index 8c0420ea09b..7fe9a2db027 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/constants/WorkflowDiagramEmptyNodeDefinition.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/constants/WorkflowDiagramEmptyNodeDefinition.ts
@@ -1,5 +1,6 @@
import { EMPTY_NODE_ID } from '@/workflow/workflow-diagram/constants/EmptyNodeId';
import { type WorkflowDiagramStepNode } from '@/workflow/workflow-diagram/types/WorkflowDiagram';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const WORKFLOW_DIAGRAM_EMPTY_NODE_DEFINITION = {
id: EMPTY_NODE_ID,
@@ -13,8 +14,7 @@ export const WORKFLOW_DIAGRAM_EMPTY_NODE_DEFINITION = {
data: {
nodeType: 'action',
actionType: 'EMPTY',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The canvas replaces this fallback with a translated label when rendering.
- name: 'Add an Action',
+ name: doNotTranslate('Add an Action'),
hasNextStepIds: false,
stepId: EMPTY_NODE_ID,
position: {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertEdgeHasDefinedHandlesOrThrow.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertEdgeHasDefinedHandlesOrThrow.ts
index 019ee90e7d5..ddfd2c8694a 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertEdgeHasDefinedHandlesOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertEdgeHasDefinedHandlesOrThrow.ts
@@ -1,5 +1,6 @@
import { type Edge } from '@xyflow/react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type AssertEdgeHasDefinedHandlesOrThrow = (
edge: Edge,
@@ -12,8 +13,9 @@ export const assertEdgeHasDefinedHandlesOrThrow: AssertEdgeHasDefinedHandlesOrTh
(edge) => {
if (!isDefined(edge.sourceHandle) || !isDefined(edge.targetHandle)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'sourceHandle and targetHandle must be defined on the edge.',
+ doNotTranslate(
+ 'sourceHandle and targetHandle must be defined on the edge.',
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertWorkflowConnectionOrThrow.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertWorkflowConnectionOrThrow.ts
index 678276dbbee..bb5861febbc 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertWorkflowConnectionOrThrow.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/assertWorkflowConnectionOrThrow.ts
@@ -1,6 +1,7 @@
import { type WorkflowConnection } from '@/workflow/workflow-diagram/types/WorkflowDiagram';
import { type Connection } from '@xyflow/react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
type AssertWorkflowConnectionOrThrow = (
connection: Connection,
@@ -13,8 +14,9 @@ export const assertWorkflowConnectionOrThrow: AssertWorkflowConnectionOrThrow =
!isDefined(connection.targetHandle)
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'WorkflowConnection must have defined sourceHandle and targetHandle.',
+ doNotTranslate(
+ 'WorkflowConnection must have defined sourceHandle and targetHandle.',
+ ),
);
}
};
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/generateWorkflowRunDiagram.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/generateWorkflowRunDiagram.ts
index 3454feb7eef..91bd82407ce 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/generateWorkflowRunDiagram.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/generateWorkflowRunDiagram.ts
@@ -12,6 +12,7 @@ import {
import { generateWorkflowDiagram } from '@/workflow/workflow-diagram/utils/generateWorkflowDiagram';
import { isStepNode } from '@/workflow/workflow-diagram/utils/isStepNode';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { StepStatus, type WorkflowRunStepInfos } from 'twenty-shared/workflow';
const shouldOpenStep = ({
@@ -107,8 +108,9 @@ export const generateWorkflowRunDiagram = ({
);
if (!isDefined(parentNode)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Expected the edge to have a parent node');
+ throw new Error(
+ doNotTranslate('Expected the edge to have a parent node'),
+ );
}
const stepInfo = stepInfos?.[parentNode.id];
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramTriggerNode.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramTriggerNode.ts
index f035c154cd5..ffe599396b8 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramTriggerNode.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/getWorkflowDiagramTriggerNode.ts
@@ -6,6 +6,7 @@ import { DATABASE_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/Da
import { getTriggerIcon } from '@/workflow/workflow-trigger/utils/getTriggerIcon';
import { type Node } from '@xyflow/react';
import { assertUnreachable, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';
export const getWorkflowDiagramTriggerNode = ({
@@ -18,22 +19,19 @@ export const getWorkflowDiagramTriggerNode = ({
switch (trigger.type) {
case 'MANUAL': {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The canonical name is translated by getWorkflowStepDisplayName below.
- triggerDefaultLabel = 'Manual trigger';
+ triggerDefaultLabel = doNotTranslate('Manual trigger');
triggerIcon = getTriggerIcon(trigger);
break;
}
case 'CRON': {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The canonical name is translated by getWorkflowStepDisplayName below.
- triggerDefaultLabel = 'On a schedule';
+ triggerDefaultLabel = doNotTranslate('On a schedule');
triggerIcon = getTriggerIcon(trigger);
break;
}
case 'WEBHOOK': {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The canonical name is translated by getWorkflowStepDisplayName below.
- triggerDefaultLabel = 'Webhook';
+ triggerDefaultLabel = doNotTranslate('Webhook');
triggerIcon = getTriggerIcon(trigger);
break;
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramEmptyTriggerReadonly.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramEmptyTriggerReadonly.tsx
index e7db896103a..b9890268d7e 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramEmptyTriggerReadonly.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramEmptyTriggerReadonly.tsx
@@ -17,6 +17,7 @@ import { WorkflowNodeTitle } from '@/workflow/workflow-diagram/workflow-nodes/co
import { useLingui } from '@lingui/react/macro';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';
import { useIcons } from 'twenty-ui/icon';
@@ -52,8 +53,9 @@ export const WorkflowDiagramEmptyTriggerReadonly = ({ id }: { id: string }) => {
!isDefined(workflowVisualizerWorkflowVersionId)
) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Workflow ID and Version ID must be defined to open the command menu.',
+ doNotTranslate(
+ 'Workflow ID and Version ID must be defined to open the command menu.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx
index e1d213456cf..d58288e778b 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramHandleSource.tsx
@@ -6,6 +6,7 @@ import { styled } from '@linaria/react';
import { Handle, Position, type HandleProps } from '@xyflow/react';
import { useMemo, type CSSProperties } from 'react';
import { themeCssVariables } from 'twenty-ui/theme';
+import { doNotTranslate } from 'twenty-shared/i18n';
const HANDLE_SCALE_ON_HOVER = 1.5;
@@ -73,8 +74,9 @@ export const WorkflowDiagramHandleSource = ({
const dynamicStyles = useMemo(() => {
const isRight = position === Position.Right;
const transform = isRight ? 'translate(50%, -50%)' : 'translate(-50%, 50%)';
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const transformOrigin = isRight ? 'top right' : 'bottom left';
+ const transformOrigin = doNotTranslate(
+ isRight ? 'top right' : 'bottom left',
+ );
let bg: string;
let borderColor: string;
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeReadonly.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeReadonly.tsx
index 9570093a9f5..027b2649a15 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeReadonly.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowDiagramStepNodeReadonly.tsx
@@ -25,6 +25,7 @@ import { isNodeTitleHighlighted } from '@/workflow/workflow-diagram/workflow-nod
import { Position } from '@xyflow/react';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useIcons } from 'twenty-ui/icon';
export const WorkflowDiagramStepNodeReadonly = ({
@@ -63,8 +64,9 @@ export const WorkflowDiagramStepNodeReadonly = ({
!isDefined(workflowVisualizerWorkflowId) ||
!isDefined(workflowVisualizerWorkflowVersionId)
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Workflow ID and Version ID must be defined');
+ throw new Error(
+ doNotTranslate('Workflow ID and Version ID must be defined'),
+ );
}
if (!isInSidePanel) {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx
index c73da384a55..3536a43ed6f 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/workflow-nodes/components/WorkflowRunDiagramStepNode.tsx
@@ -28,6 +28,7 @@ import { styled } from '@linaria/react';
import { Position } from '@xyflow/react';
import { useContext } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { StepStatus } from 'twenty-shared/workflow';
import { IconCheck, IconX, useIcons } from 'twenty-ui/icon';
import { Loader } from 'twenty-ui/primitives/feedback';
@@ -121,8 +122,7 @@ export const WorkflowRunDiagramStepNode = ({
const handleClick = () => {
if (!isDefined(workflowVisualizerWorkflowId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Workflow ID must be defined');
+ throw new Error(doNotTranslate('Workflow ID must be defined'));
}
if (!isInSidePanel) {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepInputDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepInputDetail.tsx
index 11527a7a98c..2655ce07175 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepInputDetail.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepInputDetail.tsx
@@ -9,6 +9,7 @@ import { getWorkflowRunStepContext } from '@/workflow/workflow-steps/utils/getWo
import { getWorkflowVariablesUsedInStep } from '@/workflow/workflow-steps/utils/getWorkflowVariablesUsedInStep';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type GetJsonNodeHighlighting,
JsonTree,
@@ -49,8 +50,9 @@ export const WorkflowRunStepInputDetail = ({ stepId }: { stepId: string }) => {
});
if (stepDefinition?.type !== 'action') {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('The input tab must be rendered with an action step.');
+ throw new Error(
+ doNotTranslate('The input tab must be rendered with an action step.'),
+ );
}
const variablesUsedInStep = getWorkflowVariablesUsedInStep({
@@ -71,8 +73,11 @@ export const WorkflowRunStepInputDetail = ({ stepId }: { stepId: string }) => {
});
if (stepContext.length === 0) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('The input tab must be rendered with a non-empty context.');
+ throw new Error(
+ doNotTranslate(
+ 'The input tab must be rendered with a non-empty context.',
+ ),
+ );
}
const previousStepId = stepContext[stepContext.length - 1].id;
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx
index 107601a868a..7e968729c5b 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx
@@ -6,6 +6,7 @@ import { useWorkflowRunStepInfo } from '@/workflow/workflow-steps/hooks/useWorkf
import { getWorkflowRunStepInfoToDisplayAsOutput } from '@/workflow/workflow-steps/utils/getWorkflowRunStepInfoToDisplayAsOutput';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type GetJsonNodeHighlighting,
JsonTree,
@@ -35,8 +36,9 @@ export const WorkflowRunStepOutputDetail = ({ stepId }: { stepId: string }) => {
steps: workflowRun.state.flow.steps,
});
if (!isDefined(stepDefinition?.definition)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('The step is expected to be properly shaped.');
+ throw new Error(
+ doNotTranslate('The step is expected to be properly shaped.'),
+ );
}
const setRedHighlightingForEveryNode: GetJsonNodeHighlighting = (keyPath) => {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/hooks/useUpdateStepFilterFromVariable.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/hooks/useUpdateStepFilterFromVariable.ts
index d88629a2deb..542ebb61fed 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/filters/hooks/useUpdateStepFilterFromVariable.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/filters/hooks/useUpdateStepFilterFromVariable.ts
@@ -12,6 +12,7 @@ import {
type StepFilter,
} from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { extractRawVariableNamePart } from 'twenty-shared/workflow';
export const useUpdateStepFilterFromVariable = ({
@@ -47,8 +48,9 @@ export const useUpdateStepFilterFromVariable = ({
);
if (!isDefined(currentStepOutputSchema)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`No output schema found for workflow step ${stepId}`);
+ throw new Error(
+ doNotTranslate(`No output schema found for workflow step ${stepId}`),
+ );
}
const { variableType, fieldMetadataId, compositeFieldSubFieldName } =
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateStep.ts
index bd796234a39..47c185ffee3 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateStep.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateStep.ts
@@ -13,6 +13,7 @@ import {
import { useState } from 'react';
import { type Nullable } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
export const useCreateStep = () => {
@@ -82,8 +83,7 @@ export const useCreateStep = () => {
) as Nullable<DifferenceChange>;
if (!isDefined(createdFirstStepDiff) && !isDefined(addedStepDiff)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error("Couldn't create step");
+ throw new Error(doNotTranslate("Couldn't create step"));
}
if (shouldSelectNode) {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateStep.ts
index 2ea31c812da..d6f2c352735 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateStep.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateStep.ts
@@ -6,6 +6,7 @@ import { useDuplicateWorkflowVersionStep } from '@/workflow/workflow-steps/hooks
import { type Difference } from 'microdiff';
import { useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const useDuplicateStep = () => {
const [isLoading, setIsLoading] = useState(false);
@@ -41,8 +42,7 @@ export const useDuplicateStep = () => {
const createdStepDiff = stepsDiff?.find((diff) => diff.type === 'CREATE');
if (!isDefined(createdStepDiff)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error("Couldn't duplicate step");
+ throw new Error(doNotTranslate("Couldn't duplicate step"));
}
setWorkflowSelectedNode(createdStepDiff.value.id);
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/utils/getIsDescendantOfIterator.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/utils/getIsDescendantOfIterator.ts
index 32fdf25540d..80d647a9a34 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/utils/getIsDescendantOfIterator.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/utils/getIsDescendantOfIterator.ts
@@ -1,6 +1,7 @@
import { type WorkflowStep } from '@/workflow/types/Workflow';
import { isLastStepOfLoop } from '@/workflow/workflow-diagram/utils/isLastStepOfLoop';
import { TRIGGER_STEP_ID } from 'twenty-shared/workflow';
+import { doNotTranslate } from 'twenty-shared/i18n';
const isParentStep = ({
currentStep,
@@ -50,8 +51,9 @@ export const getIsDescendantOfIterator = ({
const currentStep = steps.find((step) => step.id === currentStepId);
if (!currentStep) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error(`Step with ID ${currentStepId} not found`);
+ throw new Error(
+ doNotTranslate(`Step with ID ${currentStepId} not found`),
+ );
}
const parentSteps = steps
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/utils/getWrongExportedFunctionMarkers.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/utils/getWrongExportedFunctionMarkers.ts
index 37577878d90..2d85d87f72a 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/utils/getWrongExportedFunctionMarkers.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/utils/getWrongExportedFunctionMarkers.ts
@@ -1,5 +1,6 @@
import { t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
const getSubstringCoordinate = (
text: string,
substring: string,
@@ -35,8 +36,7 @@ export const getWrongExportedFunctionMarkers = (value: string) => {
markers.push({
severity: 8, //MarkerSeverity.Error,
message: t`Exported arrow function should be named "main"`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Monaco uses the exact code fragment as a diagnostic identifier.
- code: 'export const main',
+ code: doNotTranslate('export const main'),
startLineNumber: coordinates.line,
startColumn: coordinates.column,
endLineNumber: 1,
@@ -49,8 +49,7 @@ export const getWrongExportedFunctionMarkers = (value: string) => {
markers.push({
severity: 8, //MarkerSeverity.Error,
message: t`An exported "main" arrow function is required.`,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Monaco uses the exact code fragment as a diagnostic identifier.
- code: 'export const main',
+ code: doNotTranslate('export const main'),
startLineNumber: 1,
startColumn: 1,
endLineNumber: 1,
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowConversationFields.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowConversationFields.tsx
index 4ccdf032da3..378425e50fe 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowConversationFields.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowConversationFields.tsx
@@ -6,6 +6,7 @@ import {
type WorkflowConversation,
type WorkflowConversationScope,
} from 'twenty-shared/workflow';
+import { doNotTranslate } from 'twenty-shared/i18n';
type WorkflowConversationFieldsProps = {
dropdownId: string;
@@ -28,11 +29,9 @@ export const WorkflowConversationFields = ({
const scope = conversation?.scope ?? defaultScope;
const scopeOptions: { label: string; value: WorkflowConversationScope }[] = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Conversation scopes are persisted API enum tokens.
- { label: t`One per run`, value: 'RUN' },
+ { label: t`One per run`, value: doNotTranslate('RUN') },
{ label: t`A new one each time the step runs`, value: 'STEP' },
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Conversation scopes are persisted API enum tokens.
- { label: t`Shared by key, across runs`, value: 'KEY' },
+ { label: t`Shared by key, across runs`, value: doNotTranslate('KEY') },
];
const handleScopeChange = (nextScope: WorkflowConversationScope) => {
@@ -65,8 +64,7 @@ export const WorkflowConversationFields = ({
readonly={readonly}
defaultValue={conversation?.key}
onChange={(key) => {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Conversation scopes are persisted API enum tokens.
- onChange({ scope: 'KEY', key });
+ onChange({ scope: doNotTranslate('KEY'), key });
}}
VariablePicker={WorkflowVariablePicker}
/>
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpdateRecord.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpdateRecord.tsx
index c8a069f6b0c..503c724a22f 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpdateRecord.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionUpdateRecord.tsx
@@ -16,6 +16,7 @@ import { WorkflowVariablePicker } from '@/workflow/workflow-variables/components
import { t } from '@lingui/core/macro';
import { useEffect, useState } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { canObjectBeManagedByAutomation } from 'twenty-shared/workflow';
import { Separator } from 'twenty-ui/primitives/layout';
import { type SelectOption } from 'twenty-ui/primitives/input';
@@ -218,8 +219,7 @@ export const WorkflowEditActionUpdateRecord = ({
definition.metadata.relationType === RelationType.MANY_TO_ONE;
const value = isFieldRelationManyToOne
- ? // oxlint-disable-next-line lingui/no-unlocalized-strings -- This suffix forms a GraphQL field identifier.
- `${definition.metadata.fieldName}Id`
+ ? doNotTranslate(`${definition.metadata.fieldName}Id`)
: definition.metadata.fieldName;
return value === fieldName;
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/constants/FormFieldDefaultTexts.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/constants/FormFieldDefaultTexts.ts
index 58041374a09..ab167584302 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/constants/FormFieldDefaultTexts.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/constants/FormFieldDefaultTexts.ts
@@ -2,13 +2,13 @@ import { type WorkflowFormFieldType } from '@/workflow/workflow-steps/workflow-a
import { type MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/core/macro';
import { FieldMetadataType } from 'twenty-shared/types';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// oxlint-disable lingui/no-unlocalized-strings -- Stored form field text is matched to translated descriptors when rendered.
export const FORM_FIELD_DEFAULT_TEXTS: Array<{
type: WorkflowFormFieldType;
text: string;
message: MessageDescriptor;
-}> = [
+}> = doNotTranslate([
{ type: FieldMetadataType.TEXT, text: 'Text', message: msg`Text` },
{
type: FieldMetadataType.TEXT,
@@ -39,4 +39,4 @@ export const FORM_FIELD_DEFAULT_TEXTS: Array<{
text: 'Choose values',
message: msg`Choose values`,
},
-];
+]);
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/getDefaultFormFieldSettings.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/getDefaultFormFieldSettings.ts
index 0b876dce80b..b4ded77984d 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/getDefaultFormFieldSettings.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/getDefaultFormFieldSettings.ts
@@ -1,38 +1,38 @@
import { CoreObjectNameSingular, FieldMetadataType } from 'twenty-shared/types';
import { type WorkflowFormFieldType } from '@/workflow/workflow-steps/workflow-actions/form-action/types/WorkflowFormFieldType';
import { assertUnreachable } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { v4 } from 'uuid';
-// oxlint-disable lingui/no-unlocalized-strings -- These persisted defaults must match the canonical text keys translated by getFormFieldDisplayText.
export const getDefaultFormFieldSettings = (type: WorkflowFormFieldType) => {
switch (type) {
case FieldMetadataType.TEXT:
return {
id: v4(),
name: 'text',
- label: 'Text',
- placeholder: 'Enter your text',
+ label: doNotTranslate('Text'),
+ placeholder: doNotTranslate('Enter your text'),
};
case FieldMetadataType.NUMBER:
return {
id: v4(),
name: 'number',
- label: 'Number',
+ label: doNotTranslate('Number'),
placeholder: '1000',
};
case FieldMetadataType.DATE:
return {
id: v4(),
name: 'date',
- label: 'Date',
- placeholder: 'mm/dd/yyyy',
+ label: doNotTranslate('Date'),
+ placeholder: doNotTranslate('mm/dd/yyyy'),
};
case 'RECORD':
return {
id: v4(),
name: 'record',
- label: 'Record',
- placeholder: `Select a Company`,
+ label: doNotTranslate('Record'),
+ placeholder: doNotTranslate(`Select a Company`),
settings: {
objectName: CoreObjectNameSingular.Company,
},
@@ -41,8 +41,8 @@ export const getDefaultFormFieldSettings = (type: WorkflowFormFieldType) => {
return {
id: v4(),
name: 'select',
- label: 'Select',
- placeholder: 'Choose a value',
+ label: doNotTranslate('Select'),
+ placeholder: doNotTranslate('Choose a value'),
settings: {
selectType: 'EXISTING_FIELD',
selectedFieldId: undefined,
@@ -52,8 +52,8 @@ export const getDefaultFormFieldSettings = (type: WorkflowFormFieldType) => {
return {
id: v4(),
name: 'multiSelect',
- label: 'Multi-Select',
- placeholder: 'Choose values',
+ label: doNotTranslate('Multi-Select'),
+ placeholder: doNotTranslate('Choose values'),
settings: {
selectType: 'EXISTING_FIELD',
selectedFieldId: undefined,
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/constants/HttpRequest.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/constants/HttpRequest.ts
index ba71e30e8be..a3bcfd1bdf0 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/constants/HttpRequest.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/constants/HttpRequest.ts
@@ -1,3 +1,5 @@
+import { doNotTranslate } from 'twenty-shared/i18n';
+
const {
HTTP_METHODS,
METHODS_WITH_BODY,
@@ -13,9 +15,9 @@ const {
{ label: 'DELETE', value: 'DELETE' },
] as const,
METHODS_WITH_BODY: ['POST', 'PUT', 'PATCH'] as const,
- DEFAULT_JSON_BODY_PLACEHOLDER:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This JSON snippet is a code example with stable keys and placeholders.
+ DEFAULT_JSON_BODY_PLACEHOLDER: doNotTranslate(
'{\n "key": "value"\n "another_key": "{{workflow.variable}}" \n}',
+ ),
DEFAULT_HTTP_REQUEST_OUTPUT_VALUE: {
data: undefined,
status: undefined,
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/send-chat-message-action/components/WorkflowEditActionSendChatMessage.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/send-chat-message-action/components/WorkflowEditActionSendChatMessage.tsx
index 289d7e0ccc4..fa49c861259 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/send-chat-message-action/components/WorkflowEditActionSendChatMessage.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/send-chat-message-action/components/WorkflowEditActionSendChatMessage.tsx
@@ -13,6 +13,7 @@ import { t } from '@lingui/core/macro';
import { useEffect, useMemo, useState } from 'react';
import { CoreObjectNameSingular } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type WorkflowConversation } from 'twenty-shared/workflow';
import { useDebouncedCallback } from 'use-debounce';
@@ -140,10 +141,7 @@ export const WorkflowEditActionSendChatMessage = ({
<WorkflowConversationFields
dropdownId={`workflow-send-chat-message-conversation-${action.id}`}
conversation={formData.conversation}
- defaultScope={
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Conversation scopes are persisted API enum tokens.
- 'RUN'
- }
+ defaultScope={doNotTranslate('RUN')}
readonly={actionOptions.readonly}
onChange={handleConversationChange}
/>
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/shouldDisplayFormField.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/shouldDisplayFormField.ts
index 4d6893dea8e..badbadccfe9 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/shouldDisplayFormField.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/utils/shouldDisplayFormField.ts
@@ -5,6 +5,7 @@ import {
type WorkflowTriggerType,
} from '@/workflow/types/Workflow';
import { CustomError } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { FieldMetadataType } from '~/generated-metadata/graphql';
const SUPPORTED_FORM_FIELD_TYPES = [
@@ -78,8 +79,7 @@ export const shouldDisplayFormField = ({
);
default:
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- `Action "${actionType}" is not supported`,
+ doNotTranslate(`Action "${actionType}" is not supported`),
'UNSUPPORTED_ACTION_TYPE',
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx
index 6448017d284..d137610e39b 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/components/CronExpressionHelper.tsx
@@ -12,6 +12,7 @@ import { CronExpressionParser } from 'cron-parser';
import { themeCssVariables } from 'twenty-ui/theme';
import { dateLocaleState } from '@/localization/states/dateLocaleState';
import { formatDateTimeString } from '@/object-record/record-field/ui/utils/formatDateTimeString';
+import { doNotTranslate } from 'twenty-shared/i18n';
const getNextExecutions = (
cronExpression: string,
@@ -34,8 +35,7 @@ const getNextExecutions = (
}
const interval = CronExpressionParser.parse(normalized, {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- UTC is an IANA time zone identifier.
- tz: 'UTC',
+ tz: doNotTranslate('UTC'),
});
return interval.take(3).map((date) => date.toDate());
} catch {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/CronTrigger.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/CronTrigger.ts
index ab0fe29a0d0..30de35276ba 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/CronTrigger.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/CronTrigger.ts
@@ -1,12 +1,12 @@
import { type WorkflowTriggerType } from '@/workflow/types/Workflow';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const CRON_TRIGGER: {
defaultLabel: string;
type: WorkflowTriggerType;
icon: string;
} = {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Persisted trigger names are translated by getWorkflowStepDisplayName.
- defaultLabel: 'On a schedule',
+ defaultLabel: doNotTranslate('On a schedule'),
type: 'CRON',
icon: 'IconClock',
};
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/ManualTrigger.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/ManualTrigger.ts
index d34879407ee..db2870fec5e 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/ManualTrigger.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/ManualTrigger.ts
@@ -1,12 +1,12 @@
import { type WorkflowTriggerType } from '@/workflow/types/Workflow';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const MANUAL_TRIGGER: {
defaultLabel: string;
type: WorkflowTriggerType;
icon: string;
} = {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Persisted trigger names are translated by getWorkflowStepDisplayName.
- defaultLabel: 'Launch manually',
+ defaultLabel: doNotTranslate('Launch manually'),
type: 'MANUAL',
icon: 'IconHandMove',
};
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/WebhookTrigger.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/WebhookTrigger.ts
index ffd76bf5ea4..aeeec2c5b99 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/WebhookTrigger.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/constants/triggers/WebhookTrigger.ts
@@ -1,12 +1,12 @@
import { type WorkflowTriggerType } from '@/workflow/types/Workflow';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const WEBHOOK_TRIGGER: {
defaultLabel: string;
type: WorkflowTriggerType;
icon: string;
} = {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Persisted trigger names are translated by getWorkflowStepDisplayName.
- defaultLabel: 'Webhook',
+ defaultLabel: doNotTranslate('Webhook'),
type: 'WEBHOOK',
icon: 'IconWebhook',
};
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTestPayloadFromTrigger.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTestPayloadFromTrigger.ts
index d94669642ee..de67c65d561 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTestPayloadFromTrigger.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTestPayloadFromTrigger.ts
@@ -1,5 +1,6 @@
import { type WorkflowTrigger } from '@/workflow/types/Workflow';
import { assertUnreachable } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getTestPayloadFromTrigger = (
trigger: WorkflowTrigger,
@@ -18,8 +19,9 @@ export const getTestPayloadFromTrigger = (
}
case 'DATABASE_EVENT': {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'Test workflow is not supported for database event triggers',
+ doNotTranslate(
+ 'Test workflow is not supported for database event triggers',
+ ),
);
}
default: {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultDefinition.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultDefinition.ts
index 76a1be78fc5..1ca366b3f53 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultDefinition.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultDefinition.ts
@@ -6,6 +6,7 @@ import {
import { DATABASE_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/DatabaseTriggerTypes';
import { getManualTriggerDefaultSettings } from '@/workflow/workflow-trigger/utils/getManualTriggerDefaultSettings';
import { assertUnreachable } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
// TODO: This needs to be migrated to the server
export const getTriggerDefaultDefinition = ({
@@ -19,8 +20,9 @@ export const getTriggerDefaultDefinition = ({
}): WorkflowTrigger => {
if (activeNonSystemObjectMetadataItems.length === 0) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- 'This function need to receive at least one object metadata item to run.',
+ doNotTranslate(
+ 'This function need to receive at least one object metadata item to run.',
+ ),
);
}
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultLabel.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultLabel.ts
index 934e59a01b7..9f20c65dc3f 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultLabel.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getTriggerDefaultLabel.ts
@@ -3,6 +3,7 @@ import { splitWorkflowTriggerEventName } from '@/workflow/utils/splitWorkflowTri
import { DATABASE_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/DatabaseTriggerTypes';
import { OTHER_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/OtherTriggerTypes';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getTriggerDefaultLabel = (trigger: WorkflowTrigger): string => {
if (trigger.type === 'DATABASE_EVENT') {
@@ -15,8 +16,7 @@ export const getTriggerDefaultLabel = (trigger: WorkflowTrigger): string => {
)?.defaultLabel;
if (!isDefined(label)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Unknown trigger event');
+ throw new Error(doNotTranslate('Unknown trigger event'));
}
return label;
@@ -27,8 +27,7 @@ export const getTriggerDefaultLabel = (trigger: WorkflowTrigger): string => {
)?.defaultLabel;
if (!isDefined(label)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Unknown trigger type');
+ throw new Error(doNotTranslate('Unknown trigger type'));
}
return label;
diff --git a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getWebhookTriggerDefaultSettings.ts b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getWebhookTriggerDefaultSettings.ts
index ea158dcf348..59f6fa4b8cc 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getWebhookTriggerDefaultSettings.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-trigger/utils/getWebhookTriggerDefaultSettings.ts
@@ -1,8 +1,8 @@
import { type WorkflowWebhookTrigger } from '@/workflow/types/Workflow';
import { type WebhookHttpMethods } from '@/workflow/workflow-trigger/constants/WebhookTriggerHttpMethodOptions';
import { assertUnreachable } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// oxlint-disable lingui/no-unlocalized-strings -- Webhook example bodies are persisted API data and must remain stable across locales.
export const getWebhookTriggerDefaultSettings = (
webhookHttpMethods: WebhookHttpMethods,
): WorkflowWebhookTrigger['settings'] => {
@@ -19,17 +19,17 @@ export const getWebhookTriggerDefaultSettings = (
message: {
icon: 'IconVariable',
type: 'string',
- label: 'message',
- value: 'Workflow was started',
+ label: doNotTranslate('message'),
+ value: doNotTranslate('Workflow was started'),
isLeaf: true,
},
},
httpMethod: webhookHttpMethods,
expectedBody: {
- message: 'Workflow was started',
+ message: doNotTranslate('Workflow was started'),
},
expectedOutputSchema: {
- message: 'Workflow was started',
+ message: doNotTranslate('Workflow was started'),
},
authentication: null,
};
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/constants/WorkflowPersistedOutputSchemaLabels.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/constants/WorkflowPersistedOutputSchemaLabels.ts
index 6f4a4473830..6e3b0c9f408 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/constants/WorkflowPersistedOutputSchemaLabels.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/constants/WorkflowPersistedOutputSchemaLabels.ts
@@ -1,14 +1,14 @@
import { type WorkflowActionType } from '@/workflow/types/Workflow';
import { type MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/core/macro';
+import { doNotTranslate } from 'twenty-shared/i18n';
-// oxlint-disable lingui/no-unlocalized-strings -- Persisted output labels are matched to these canonical keys before their descriptors are translated.
export const WORKFLOW_PERSISTED_OUTPUT_SCHEMA_LABELS: Array<{
stepType: WorkflowActionType;
key: string;
label: string;
message: MessageDescriptor;
-}> = [
+}> = doNotTranslate([
{
stepType: 'ITERATOR',
key: 'currentItem',
@@ -33,4 +33,4 @@ export const WORKFLOW_PERSISTED_OUTPUT_SCHEMA_LABELS: Array<{
label: 'Response',
message: msg`Response`,
},
-];
+]);
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/hooks/useVariableDropdown.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/hooks/useVariableDropdown.ts
index 0f0f1402c4c..b86753ec645 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/hooks/useVariableDropdown.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/hooks/useVariableDropdown.ts
@@ -17,6 +17,7 @@ import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomStat
import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';
import { useState } from 'react';
import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { isNonEmptyString } from '@sniptt/guards';
import {
type BaseOutputSchemaV2,
@@ -136,16 +137,14 @@ export const useVariableDropdown = ({
linkOutputSchema: LinkOutputSchema,
) => {
if (!isDefined(workflowVisualizerWorkflowId)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Workflow ID must be configured');
+ throw new Error(doNotTranslate('Workflow ID must be configured'));
}
setWorkflowSelectedNode(step.id);
setWorkflowDiagram((diagram) => {
if (!isDefined(diagram)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This message describes a developer-only invariant; keeping it stable preserves error reporting fingerprints.
- throw new Error('Workflow diagram must be defined');
+ throw new Error(doNotTranslate('Workflow diagram must be defined'));
}
return {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/generate/generateFakeValue.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/generate/generateFakeValue.ts
index 5eda0971425..340b14a7b9d 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/generate/generateFakeValue.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/generate/generateFakeValue.ts
@@ -1,4 +1,5 @@
import { FieldMetadataType } from 'twenty-shared/types';
+import { doNotTranslate } from 'twenty-shared/i18n';
export type FakeValueTypes =
| string
@@ -14,8 +15,7 @@ type TypeClassification = 'Primitive' | 'FieldMetadataType';
const generatePrimitiveValue = (valueType: string): FakeValueTypes => {
if (valueType === 'string') {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values are stable generated test payloads, not interface labels.
- return 'My text';
+ return doNotTranslate('My text');
} else if (valueType === 'number') {
return 20;
} else if (valueType === 'boolean') {
@@ -54,8 +54,7 @@ const generateFieldMetadataTypeValue = (
): FakeValueTypes | null => {
switch (valueType) {
case FieldMetadataType.TEXT:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values are stable generated test payloads, not interface labels.
- return 'My text';
+ return doNotTranslate('My text');
case FieldMetadataType.NUMBER:
return 20;
case FieldMetadataType.BOOLEAN:
@@ -65,11 +64,9 @@ const generateFieldMetadataTypeValue = (
case FieldMetadataType.DATE_TIME:
return '01/23/2025 15:16';
case FieldMetadataType.ADDRESS:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values are stable generated test payloads, not interface labels.
- return '123 Main St, Anytown, CA 12345';
+ return doNotTranslate('123 Main St, Anytown, CA 12345');
case FieldMetadataType.FULL_NAME:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These values are stable generated test payloads, not interface labels.
- return 'Tim Cook';
+ return doNotTranslate('Tim Cook');
case FieldMetadataType.RAW_JSON:
return null;
case FieldMetadataType.UUID:
@@ -81,8 +78,7 @@ const generateFieldMetadataTypeValue = (
export const generateFakeValue = (
valueType: string,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This literal is a classification discriminant for generated test data.
- classification: TypeClassification = 'Primitive',
+ classification: TypeClassification = doNotTranslate('Primitive'),
): FakeValueTypes => {
switch (classification) {
case 'Primitive':
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/getStepItemIcon.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/getStepItemIcon.ts
index 713d45f4e6a..f427c36e911 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/getStepItemIcon.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/getStepItemIcon.ts
@@ -1,5 +1,6 @@
import { type InputSchemaPropertyType } from 'twenty-shared/workflow';
import { FieldMetadataType } from 'twenty-shared/types';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const getStepItemIcon = ({
itemType,
@@ -15,8 +16,7 @@ export const getStepItemIcon = ({
itemType === FieldMetadataType.NUMERIC ||
itemType === FieldMetadataType.NUMBER
) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This value names an icon in the icon dictionary.
- return 'Icon123';
+ return doNotTranslate('Icon123');
}
if (itemType === 'boolean' || itemType === FieldMetadataType.BOOLEAN) {
diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/resolvePersistedStepOutputSchema.ts b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/resolvePersistedStepOutputSchema.ts
index 2a355d3e260..60d430b1f37 100644
--- a/packages/twenty-front/src/modules/workflow/workflow-variables/utils/resolvePersistedStepOutputSchema.ts
+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/utils/resolvePersistedStepOutputSchema.ts
@@ -2,6 +2,7 @@ import { type OutputSchemaV2 } from '@/workflow/workflow-variables/types/StepOut
import { translatePersistedOutputSchemaLabels } from '@/workflow/workflow-variables/utils/translatePersistedOutputSchemaLabels';
import { getOutputSchemaFromValue } from 'twenty-shared/logic-function';
import { isEmptyObject, isPlainObject } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type BaseOutputSchemaV2,
isBaseOutputSchemaV2,
@@ -11,8 +12,7 @@ const AI_AGENT_DEFAULT_OUTPUT_SCHEMA: BaseOutputSchemaV2 = {
response: {
isLeaf: true,
type: 'string',
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- The persisted key is translated when the schema is read.
- label: 'Response',
+ label: doNotTranslate('Response'),
value: null,
},
};
diff --git a/packages/twenty-front/src/modules/workspace-member/hooks/useColorScheme.ts b/packages/twenty-front/src/modules/workspace-member/hooks/useColorScheme.ts
index 44c5f649889..acc2f45565a 100644
--- a/packages/twenty-front/src/modules/workspace-member/hooks/useColorScheme.ts
+++ b/packages/twenty-front/src/modules/workspace-member/hooks/useColorScheme.ts
@@ -7,6 +7,7 @@ import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomState
import { useStore } from 'jotai';
import { useCallback } from 'react';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import {
@@ -24,8 +25,8 @@ export const useColorScheme = () => {
const { updateWorkspaceMemberSettings } = useUpdateWorkspaceMemberSettings();
const { enqueueToast } = useToast();
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted color-scheme identifier.
- const colorScheme = currentWorkspaceMember?.colorScheme ?? 'System';
+ const colorScheme =
+ currentWorkspaceMember?.colorScheme ?? doNotTranslate('System');
const setColorScheme = useCallback(
async (value: ColorScheme) => {
diff --git a/packages/twenty-front/src/modules/workspace-member/hooks/useUiScale.ts b/packages/twenty-front/src/modules/workspace-member/hooks/useUiScale.ts
index 5cef281a555..5950b9180b2 100644
--- a/packages/twenty-front/src/modules/workspace-member/hooks/useUiScale.ts
+++ b/packages/twenty-front/src/modules/workspace-member/hooks/useUiScale.ts
@@ -5,6 +5,7 @@ import { useUpdateWorkspaceMemberSettings } from '@/workspace-member/hooks/useUp
import { persistedUiScaleStepState } from '@/ui/theme/states/persistedUiScaleStepState';
import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { type UiScale } from '@/ui/theme/types/UiScale';
export const useUiScale = () => {
@@ -18,8 +19,9 @@ export const useUiScale = () => {
const { updateWorkspaceMemberSettings } = useUpdateWorkspaceMemberSettings();
const uiScaleStep =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted UI-scale identifier.
- currentWorkspaceMember?.uiScale ?? persistedUiScaleStep ?? 'Default';
+ currentWorkspaceMember?.uiScale ??
+ persistedUiScaleStep ??
+ doNotTranslate('Default');
const setUiScaleStep = useCallback(
async (step: UiScale) => {
diff --git a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx
index 61fb07860ed..40f5bff82cb 100644
--- a/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx
+++ b/packages/twenty-front/src/modules/workspace/components/WorkspaceInviteTeam.tsx
@@ -13,6 +13,7 @@ import { i18n } from '@lingui/core';
import { msg, t } from '@lingui/core/macro';
import { useLingui } from '@lingui/react/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import {
IconLock,
@@ -184,8 +185,9 @@ export const WorkspaceInviteTeam = ({ roles }: WorkspaceInviteTeamProps) => {
return (
<SettingsTextInput
instanceId="workspace-invite-team-emails"
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ placeholder={doNotTranslate(
+ )}
value={value}
onChange={onChange}
error={error?.message}
diff --git a/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx b/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx
index 271d4fa3649..a5f24945e90 100644
--- a/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx
+++ b/packages/twenty-front/src/pages/onboarding/CreateProfile.tsx
@@ -31,6 +31,7 @@ import { useCallback, useState } from 'react';
import { Controller, type SubmitHandler, useForm } from 'react-hook-form';
import { Key } from 'ts-key-enum';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
import { z } from 'zod';
@@ -140,12 +141,10 @@ export const CreateProfile = () => {
async (data) => {
try {
if (!currentWorkspaceMember?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This precondition failure is an internal diagnostic.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
if (!data.firstName || !data.lastName) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This validated form invariant is an internal diagnostic.
- throw new Error('First name or last name is missing');
+ throw new Error(doNotTranslate('First name or last name is missing'));
}
await updateWorkspaceMemberSettings({
@@ -156,8 +155,7 @@ export const CreateProfile = () => {
lastName: data.lastName,
},
jobTitle: data.jobTitle,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted color-scheme identifier.
- colorScheme: 'System',
+ colorScheme: doNotTranslate('System'),
},
});
@@ -171,8 +169,7 @@ export const CreateProfile = () => {
lastName: data.lastName,
},
jobTitle: data.jobTitle,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a persisted color-scheme identifier.
- colorScheme: 'System',
+ colorScheme: doNotTranslate('System'),
}
: member,
),
diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationDistributionTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationDistributionTab.tsx
index 6588b2a1ab7..4640fcae2e7 100644
--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationDistributionTab.tsx
+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationRegistrationDistributionTab.tsx
@@ -1,6 +1,7 @@
import { useLingui } from '@lingui/react/macro';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { CommandBlock } from 'twenty-ui/components/data-display';
import { Section } from 'twenty-ui/components/layout';
import { IconCopy } from 'twenty-ui/icon';
@@ -32,9 +33,7 @@ export const SettingsApplicationRegistrationDistributionTab = ({
availableApplicationId: registration.universalIdentifier,
});
- // The command must remain executable when copied into a terminal.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const publishCommands = ['yarn twenty app:publish'];
+ const publishCommands = [doNotTranslate('yarn twenty app:publish')];
return (
<>
diff --git a/packages/twenty-front/src/pages/settings/applications/utils/getSettingsMenuItemDisplayTitle.ts b/packages/twenty-front/src/pages/settings/applications/utils/getSettingsMenuItemDisplayTitle.ts
index e797059ebaa..52ab393c567 100644
--- a/packages/twenty-front/src/pages/settings/applications/utils/getSettingsMenuItemDisplayTitle.ts
+++ b/packages/twenty-front/src/pages/settings/applications/utils/getSettingsMenuItemDisplayTitle.ts
@@ -1,14 +1,13 @@
import { t } from '@lingui/core/macro';
import { getLegacySettingsMenuItemUniversalIdentifier } from 'twenty-shared/application';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import {
type FrontComponent,
type SettingsMenuItem,
} from '~/generated-metadata/graphql';
-// This string identifies persisted menu items created before custom titles were supported.
-// oxlint-disable-next-line lingui/no-unlocalized-strings
-const LEGACY_SETTINGS_MENU_ITEM_TITLE = 'Settings';
+const LEGACY_SETTINGS_MENU_ITEM_TITLE = doNotTranslate('Settings');
export const getSettingsMenuItemDisplayTitle = ({
applicationUniversalIdentifier,
diff --git a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx
index 943bc0fe33b..661997944e4 100644
--- a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail.tsx
@@ -20,6 +20,7 @@ import { useCallback, useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useToast } from 'twenty-ui/components/feedback';
import { Section } from 'twenty-ui/components/layout';
import { IconRepeat, IconTrash } from 'twenty-ui/icon';
@@ -175,8 +176,9 @@ export const SettingsDevelopersApiKeyDetail = () => {
}
if (!isDefined(roleIdToUse)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('Role not selected - this should never happen');
+ throw new Error(
+ doNotTranslate('Role not selected - this should never happen'),
+ );
}
const { data: newApiKeyData } = await createApiKey({
diff --git a/packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx b/packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx
index 5f2633d9cc7..9a649ed9ed2 100644
--- a/packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx
+++ b/packages/twenty-front/src/pages/settings/developers/tabs/SettingsDevelopersAppsTab.tsx
@@ -12,6 +12,7 @@ import { useLingui } from '@lingui/react/macro';
import { useState } from 'react';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { CommandBlock } from 'twenty-ui/components/data-display';
import { SearchInput } from 'twenty-ui/components/input';
import { Section } from 'twenty-ui/components/layout';
@@ -66,12 +67,10 @@ export const SettingsDevelopersAppsTab = () => {
const registrations: ApplicationRegistrationListItemFragment[] =
data?.findManyApplicationRegistrations ?? [];
- const createCommands = [
- // oxlint-disable-next-line lingui/no-unlocalized-strings
+ const createCommands = doNotTranslate([
'npx create-twenty-app@latest my-twenty-app',
- // oxlint-disable-next-line lingui/no-unlocalized-strings
'cd my-twenty-app',
- ];
+ ]);
const createCopyButton = (
<Button
diff --git a/packages/twenty-front/src/pages/settings/legal/SettingsLegalDpaNew.tsx b/packages/twenty-front/src/pages/settings/legal/SettingsLegalDpaNew.tsx
index 3cc104e1433..89b014c5297 100644
--- a/packages/twenty-front/src/pages/settings/legal/SettingsLegalDpaNew.tsx
+++ b/packages/twenty-front/src/pages/settings/legal/SettingsLegalDpaNew.tsx
@@ -3,6 +3,7 @@ import { useLingui } from '@lingui/react/macro';
import { useState } from 'react';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { downloadFile } from '@/activities/files/utils/downloadFile';
import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient';
@@ -82,8 +83,7 @@ export const SettingsLegalDpaNew = () => {
const result = data?.generateSignedDpa;
if (!result) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('No result returned');
+ throw new Error(doNotTranslate('No result returned'));
}
const safeLegalEntityName = trimmedLegalEntityName.replace(
diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx
index 4ae9eac2204..34fb6377969 100644
--- a/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx
+++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx
@@ -13,6 +13,7 @@ import { useLingui } from '@lingui/react/macro';
import { enUS } from 'date-fns/locale';
import { type APP_LOCALES } from 'twenty-shared/translations';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { useLocaleOptions } from '@/localization/hooks/useLocaleOptions';
import { dateLocaleState } from '@/localization/states/dateLocaleState';
import { themeCssVariables } from 'twenty-ui/theme';
@@ -39,8 +40,7 @@ export const LocalePicker = () => {
const updateWorkspaceMember = async (changedFields: any) => {
if (!currentWorkspaceMember?.id) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Keep this developer invariant stable for error grouping.
- throw new Error('User is not logged in');
+ throw new Error(doNotTranslate('User is not logged in'));
}
try {
diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearance.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearance.tsx
index 1beaa26f9f4..a366e29f21d 100644
--- a/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearance.tsx
+++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearance.tsx
@@ -5,6 +5,7 @@ import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMembe
import { useColorScheme } from '@/workspace-member/hooks/useColorScheme';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { Section } from 'twenty-ui/components/layout';
import { RadioGroup } from 'twenty-ui/primitives/input';
import { MOBILE_VIEWPORT, themeCssVariables } from 'twenty-ui/theme';
@@ -25,14 +26,11 @@ export const SettingsAppearance = () => {
const { t } = useLingui();
const { colorScheme, setColorScheme } = useColorScheme();
const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);
- // ColorScheme values are persisted identifiers; the adjacent labels are translated.
- // oxlint-disable lingui/no-unlocalized-strings
const choices: { value: ColorScheme; label: string }[] = [
- { value: 'Light', label: t`Light` },
- { value: 'Dark', label: t`Dark` },
- { value: 'System', label: t`System settings` },
+ { value: doNotTranslate('Light'), label: t`Light` },
+ { value: doNotTranslate('Dark'), label: t`Dark` },
+ { value: doNotTranslate('System'), label: t`System settings` },
];
- // oxlint-enable lingui/no-unlocalized-strings
return (
<Section.Root>
diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearancePreview.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearancePreview.tsx
index 5c2f3239452..c6cf03b4f70 100644
--- a/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearancePreview.tsx
+++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/SettingsAppearancePreview.tsx
@@ -7,6 +7,7 @@ import {
themeCssVariables,
} from 'twenty-ui/theme';
import { type ColorScheme } from '@/ui/theme/types/ColorScheme';
+import { doNotTranslate } from 'twenty-shared/i18n';
const StyledPreview = styled.div`
border-radius: ${themeCssVariables.border.radius.md};
@@ -71,9 +72,9 @@ type SettingsAppearancePreviewProps = {
export const SettingsAppearancePreview = ({
colorScheme,
}: SettingsAppearancePreviewProps) => {
- // ColorScheme values select theme colors and are hidden from assistive technology.
- // oxlint-disable-next-line lingui/no-unlocalized-strings
- const segments = colorScheme === 'System' ? ['Light', 'Dark'] : [colorScheme];
+ const segments = doNotTranslate(
+ colorScheme === 'System' ? ['Light', 'Dark'] : [colorScheme],
+ );
return (
<StyledPreview aria-hidden>
diff --git a/packages/twenty-front/src/utils/array/sortByProperty.ts b/packages/twenty-front/src/utils/array/sortByProperty.ts
index 7495d44e6da..d4b516b4763 100644
--- a/packages/twenty-front/src/utils/array/sortByProperty.ts
+++ b/packages/twenty-front/src/utils/array/sortByProperty.ts
@@ -1,4 +1,5 @@
import { type ArraySortDirection } from 'twenty-shared/types';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const sortByProperty =
<T, K extends keyof T>(propertyName: K, sortBy: ArraySortDirection = 'asc') =>
@@ -14,8 +15,9 @@ export const sortByProperty =
return (a[propertyName] as number) - (b[propertyName] as number);
} else {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only sort invariant diagnostic.
- 'Property type not supported in sortByProperty, only string and number are supported',
+ doNotTranslate(
+ 'Property type not supported in sortByProperty, only string and number are supported',
+ ),
);
}
};
diff --git a/packages/twenty-front/src/utils/cast-as-number-or-null.ts b/packages/twenty-front/src/utils/cast-as-number-or-null.ts
index f7db654e078..954eb05bdd7 100644
--- a/packages/twenty-front/src/utils/cast-as-number-or-null.ts
+++ b/packages/twenty-front/src/utils/cast-as-number-or-null.ts
@@ -1,6 +1,7 @@
import { isNull, isNumber, isString } from '@sniptt/guards';
import { logError } from './logError';
+import { doNotTranslate } from 'twenty-shared/i18n';
const DEBUG_MODE = false;
@@ -53,8 +54,7 @@ export const castAsNumberOrNull = (
probableNumberOrNull: string | undefined | number | null,
): number | null => {
if (canBeCastAsNumberOrNull(probableNumberOrNull) === false) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only type invariant diagnostic.
- throw new Error('Cannot cast to number or null');
+ throw new Error(doNotTranslate('Cannot cast to number or null'));
}
if (isNull(probableNumberOrNull)) {
diff --git a/packages/twenty-front/src/utils/createRequiredContext.ts b/packages/twenty-front/src/utils/createRequiredContext.ts
index 6617354a17c..92af6f6a915 100644
--- a/packages/twenty-front/src/utils/createRequiredContext.ts
+++ b/packages/twenty-front/src/utils/createRequiredContext.ts
@@ -1,17 +1,18 @@
import React, { useContext } from 'react';
+import { doNotTranslate } from 'twenty-shared/i18n';
export const createRequiredContext = <TContext>(debugName: string) => {
const Context = React.createContext<TContext | undefined>(undefined);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- React DevTools needs a stable context display name.
- Context.displayName = `${debugName}Provider`;
+ Context.displayName = doNotTranslate(`${debugName}Provider`);
const useRequiredContextOrThrow = (): TContext => {
const context = useContext(Context);
if (context === undefined) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a developer-only context invariant diagnostic.
- `${debugName} Context not found. Please wrap your component tree with <${Context.displayName}> before using use${debugName}OrThrow().`,
+ doNotTranslate(
+ `${debugName} Context not found. Please wrap your component tree with <${Context.displayName}> before using use${debugName}OrThrow().`,
+ ),
);
}
diff --git a/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfMonthDescription.ts b/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfMonthDescription.ts
index 782a85876c8..671c686bacc 100644
--- a/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfMonthDescription.ts
+++ b/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfMonthDescription.ts
@@ -1,5 +1,6 @@
import { t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { getOrdinalNumber } from '~/utils/format/getOrdinalNumber';
import { isListValue } from '~/utils/validation/isListValue';
@@ -24,10 +25,8 @@ export const getDayOfMonthDescription = (
}
// Weekday (W) - closest weekday to the given date
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- W is the cron nearest-weekday token.
- if (dayOfMonth.includes('W')) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- W is the cron nearest-weekday token.
- const day = dayOfMonth.replace('W', '');
+ if (dayOfMonth.includes(doNotTranslate('W'))) {
+ const day = dayOfMonth.replace(doNotTranslate('W'), '');
const dayNum = parseInt(day, 10);
if (!isNaN(dayNum)) {
const ordinalDay = getOrdinalNumber(dayNum);
diff --git a/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfWeekDescription.ts b/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfWeekDescription.ts
index a0ca92fb909..d801a8a3c26 100644
--- a/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfWeekDescription.ts
+++ b/packages/twenty-front/src/utils/cron-to-human/descriptors/getDayOfWeekDescription.ts
@@ -1,6 +1,7 @@
import { t } from '@lingui/core/macro';
import { format, type Locale } from 'date-fns';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { isListValue } from '~/utils/validation/isListValue';
import { isNumericRange } from '~/utils/validation/isNumericRange';
@@ -42,10 +43,8 @@ export const getDayOfWeekDescription = (
const dayOfWeekStartIndexZero = options.dayOfWeekStartIndexZero ?? true;
// Last occurrence of a weekday in the month (e.g., "5L" = last Friday)
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- L is the cron last-weekday token.
- if (dayOfWeek.includes('L')) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- L is the cron last-weekday token.
- const day = dayOfWeek.replace('L', '');
+ if (dayOfWeek.includes(doNotTranslate('L'))) {
+ const day = dayOfWeek.replace(doNotTranslate('L'), '');
const dayNum = parseInt(day, 10);
if (!isNaN(dayNum)) {
const dayName = getDayName(
diff --git a/packages/twenty-front/src/utils/cron-to-human/utils/parseCronExpression.ts b/packages/twenty-front/src/utils/cron-to-human/utils/parseCronExpression.ts
index dbb70d256c3..c8093b9c45d 100644
--- a/packages/twenty-front/src/utils/cron-to-human/utils/parseCronExpression.ts
+++ b/packages/twenty-front/src/utils/cron-to-human/utils/parseCronExpression.ts
@@ -2,6 +2,7 @@ import { type CronExpressionParts } from '~/utils/cron-to-human/types/CronExpres
import { CronExpressionParser } from 'cron-parser';
import { t } from '@lingui/core/macro';
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { normalizeWhitespace } from './normalizeWhitespace';
export const parseCronExpression = (
@@ -24,8 +25,7 @@ export const parseCronExpression = (
}
try {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- UTC is a time-zone identifier.
- CronExpressionParser.parse(normalized, { tz: 'UTC' });
+ CronExpressionParser.parse(normalized, { tz: doNotTranslate('UTC') });
if (parts.length === 4) {
// Reduced format: hour day month dayOfWeek (minute defaults to 0)
diff --git a/packages/twenty-front/src/utils/date-utils.ts b/packages/twenty-front/src/utils/date-utils.ts
index 40deacd9a02..c73f6948736 100644
--- a/packages/twenty-front/src/utils/date-utils.ts
+++ b/packages/twenty-front/src/utils/date-utils.ts
@@ -15,6 +15,7 @@ import {
import { DateFormat } from '@/localization/constants/DateFormat';
import { TimeFormat } from '@/localization/constants/TimeFormat';
import { CustomError, isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { i18n } from '@lingui/core';
import { plural, t } from '@lingui/core/macro';
@@ -29,8 +30,7 @@ export const parseDate = (dateToParse: Date | string | number): Date => {
if (dateToParse === '' || dateToParse === 0) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a diagnostic paired with the stable INVALID_DATE_FORMAT code.
- `Invalid date passed to formatPastDate: "${dateToParse}"`,
+ doNotTranslate(`Invalid date passed to formatPastDate: "${dateToParse}"`),
'INVALID_DATE_FORMAT',
);
} else if (isString(dateToParse)) {
@@ -43,16 +43,14 @@ export const parseDate = (dateToParse: Date | string | number): Date => {
if (!formattedDate) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a diagnostic paired with the stable INVALID_DATE_FORMAT code.
- `Invalid date passed to formatPastDate: "${dateToParse}"`,
+ doNotTranslate(`Invalid date passed to formatPastDate: "${dateToParse}"`),
'INVALID_DATE_FORMAT',
);
}
if (!isValid(formattedDate)) {
throw new CustomError(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a diagnostic paired with the stable INVALID_DATE_FORMAT code.
- `Invalid date passed to formatPastDate: "${dateToParse}"`,
+ doNotTranslate(`Invalid date passed to formatPastDate: "${dateToParse}"`),
'INVALID_DATE_FORMAT',
);
}
@@ -78,8 +76,9 @@ export const beautifyExactDateTime = (
) => {
const parsedDate = parseDate(dateToBeautify);
const isTodayDate = isToday(parsedDate);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are date-fns format tokens.
- const dateFormat = isTodayDate ? 'HH:mm' : 'MMM d, yyyy · HH:mm';
+ const dateFormat = doNotTranslate(
+ isTodayDate ? 'HH:mm' : 'MMM d, yyyy · HH:mm',
+ );
return formatDate(dateToBeautify, dateFormat);
};
@@ -89,8 +88,7 @@ export const beautifyExactDate = (dateToBeautify: Date | string | number) => {
if (isTodayDate) {
return t`Today`;
}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date-fns format pattern.
- return formatDate(dateToBeautify, 'MMM d, yyyy');
+ return formatDate(dateToBeautify, doNotTranslate('MMM d, yyyy'));
};
export const beautifyPastDateRelativeToNow = (
@@ -222,8 +220,9 @@ export const formatToHumanReadableDate = (date: Date | string) => {
};
const getTimePattern = (timeFormat: TimeFormat) => {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- These are date-fns format tokens.
- return timeFormat === TimeFormat.HOUR_12 ? 'hh:mm a' : 'HH:mm';
+ return doNotTranslate(
+ timeFormat === TimeFormat.HOUR_12 ? 'hh:mm a' : 'HH:mm',
+ );
};
export const getDateTimeFormatStringFoDatePickerInputMask = ({
@@ -241,8 +240,7 @@ export const getDateTimeFormatStringFoDatePickerInputMask = ({
return `yyyy-MM-dd ${timePattern}`;
case DateFormat.MONTH_FIRST:
default:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date-picker input mask pattern.
- return `MM/dd/yyyy ${timePattern}`;
+ return doNotTranslate(`MM/dd/yyyy ${timePattern}`);
}
};
@@ -256,7 +254,6 @@ export const getDateFormatStringForDatePickerInputMask = (
return `yyyy-MM-dd`;
case DateFormat.MONTH_FIRST:
default:
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is a date-picker input mask pattern.
- return `MM/dd/yyyy`;
+ return doNotTranslate(`MM/dd/yyyy`);
}
};
diff --git a/packages/twenty-front/src/utils/format/formatTime.ts b/packages/twenty-front/src/utils/format/formatTime.ts
index 9428b0a6f2c..8c409f16595 100644
--- a/packages/twenty-front/src/utils/format/formatTime.ts
+++ b/packages/twenty-front/src/utils/format/formatTime.ts
@@ -1,4 +1,5 @@
import { isDefined } from 'twenty-shared/utils';
+import { doNotTranslate } from 'twenty-shared/i18n';
import { t } from '@lingui/core/macro';
type FormatTimeParams = {
@@ -36,6 +37,5 @@ export const formatTime = ({
formattedTime = `${displayHour}:${minuteNum.toString().padStart(2, '0')} ${period}`;
}
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- UTC is a time-zone designator.
- return appendUTC ? `${formattedTime} UTC` : formattedTime;
+ return appendUTC ? doNotTranslate(`${formattedTime} UTC`) : formattedTime;
};
diff --git a/packages/twenty-oxlint-rules/.oxlintrc.i18n.json b/packages/twenty-oxlint-rules/.oxlintrc.i18n.json
index 6750e9db790..21a47a261f6 100644
--- a/packages/twenty-oxlint-rules/.oxlintrc.i18n.json
+++ b/packages/twenty-oxlint-rules/.oxlintrc.i18n.json
@@ -82,6 +82,7 @@
],
"ignoreFunctions": [
"console.*",
+ "doNotTranslate",
"logDebug",
"logError",
"assertUnreachable",
diff --git a/packages/twenty-oxlint-rules/scripts/check-unlocalized-strings.mjs b/packages/twenty-oxlint-rules/scripts/check-unlocalized-strings.mjs
index da705a57306..717b891540a 100644
--- a/packages/twenty-oxlint-rules/scripts/check-unlocalized-strings.mjs
+++ b/packages/twenty-oxlint-rules/scripts/check-unlocalized-strings.mjs
@@ -151,7 +151,7 @@ for (const violation of violations) {
if (violations.length > 0) {
console.error(
- `${violations.length} string(s) need Lingui translation markers.`,
+ `${violations.length} string(s) need Lingui translation markers. Wrap user-facing text with t\`\`, msg\`\` or <Trans>, and text that must stay as written with doNotTranslate().`,
);
process.exitCode = 1;
} else {
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template.ts
index 39d32267888..ecfc518ef4e 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template.ts
@@ -17,14 +17,11 @@ export const CONDITIONAL_DISPLAY_DEVICE_DESKTOP = {
and: [{ '===': [{ var: 'device' }, 'DESKTOP'] }],
} as const satisfies PageLayoutWidgetConditionalDisplay;
-// Visibility expressions are executable syntax rather than user-facing text.
-// oxlint-disable lingui/no-unlocalized-strings
export const CONDITIONAL_AVAILABILITY_EXPRESSION_DEVICE_MOBILE =
'device == "MOBILE"';
export const CONDITIONAL_AVAILABILITY_EXPRESSION_DEVICE_DESKTOP =
'device == "DESKTOP"';
-// oxlint-enable lingui/no-unlocalized-strings
export const GRID_LAYOUT_POSITIONS = {
FULL_WIDTH: {
diff --git a/packages/twenty-shared/src/i18n/do-not-translate.ts b/packages/twenty-shared/src/i18n/do-not-translate.ts
new file mode 100644
index 00000000000..f7f12c5f25d
--- /dev/null
+++ b/packages/twenty-shared/src/i18n/do-not-translate.ts
@@ -0,0 +1,2 @@
+// The Lingui lint gate skips arguments of this call: use it for text that must stay as written.
+export const doNotTranslate = <TValue>(value: TValue): TValue => value;
diff --git a/packages/twenty-shared/src/i18n/index.ts b/packages/twenty-shared/src/i18n/index.ts
index 629656a8a63..868dbd74af1 100644
--- a/packages/twenty-shared/src/i18n/index.ts
+++ b/packages/twenty-shared/src/i18n/index.ts
@@ -9,6 +9,7 @@
export type { LocaleMessagesMap } from './create-i18n-instance-factory';
export { createI18nInstanceFactory } from './create-i18n-instance-factory';
+export { doNotTranslate } from './do-not-translate';
export { generateMessageId } from './generate-message-id';
export { getMetadataLabelContext } from './get-metadata-label-context';
export { interpolateMessagePlaceholders } from './interpolate-message-placeholders';
diff --git a/packages/twenty-ui/.oxlintrc.i18n.json b/packages/twenty-ui/.oxlintrc.i18n.json
index 585c8e075fe..aaaec5fe182 100644
--- a/packages/twenty-ui/.oxlintrc.i18n.json
+++ b/packages/twenty-ui/.oxlintrc.i18n.json
@@ -72,6 +72,7 @@
],
"ignoreFunctions": [
"console.*",
+ "doNotTranslate",
"require",
"styled",
"css",
diff --git a/packages/twenty-ui/docs/normalizeDocumentationDefaultValue.ts b/packages/twenty-ui/docs/normalizeDocumentationDefaultValue.ts
index 80d113ab921..c85c4cefaf5 100644
--- a/packages/twenty-ui/docs/normalizeDocumentationDefaultValue.ts
+++ b/packages/twenty-ui/docs/normalizeDocumentationDefaultValue.ts
@@ -1,5 +1,7 @@
import ts from 'typescript';
+const DO_NOT_TRANSLATE_CALL = /^doNotTranslate\(([\s\S]*?),?\s*\)$/;
+
export const normalizeDocumentationDefaultValue = (
defaultValue: { value: unknown } | null,
): string | null => {
@@ -7,7 +9,8 @@ export const normalizeDocumentationDefaultValue = (
return null;
}
- const value = String(defaultValue.value).trim();
+ const rawValue = String(defaultValue.value).trim();
+ const value = (rawValue.match(DO_NOT_TRANSLATE_CALL)?.[1] ?? rawValue).trim();
if (value === 'undefined') {
return null;
diff --git a/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx b/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx
index 97f94103d66..b56d0649e2a 100644
--- a/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx
+++ b/packages/twenty-ui/src/components/code-editor/CodeEditor/CodeEditor.tsx
@@ -21,6 +21,7 @@ import { useCodeEditorHeight } from './internal/useCodeEditorHeight';
import { defineCodeEditorDefaultTheme } from './internal/utils/defineCodeEditorDefaultTheme';
import styles from './CodeEditor.module.scss';
import { type CodeEditorProps } from './types/CodeEditorProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
// Left alone, `@monaco-editor/loader` downloads Monaco from a CDN at runtime,
// which puts a second Monaco — pinned to a different version than the one we
@@ -63,8 +64,7 @@ export const CodeEditor = ({
isLoading = false,
options,
resizable = false,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass a translated resizeLabel; this preserves the public UI fallback.
- resizeLabel = 'Resize editor',
+ resizeLabel = doNotTranslate('Resize editor'),
contentPadding = 'default',
autoHeight = false,
containerProps,
diff --git a/packages/twenty-ui/src/components/data-display/JsonTree/internal/hooks/useJsonTreeContextOrThrow.tsx b/packages/twenty-ui/src/components/data-display/JsonTree/internal/hooks/useJsonTreeContextOrThrow.tsx
index 6cb9b0cd428..d6d92dd9822 100644
--- a/packages/twenty-ui/src/components/data-display/JsonTree/internal/hooks/useJsonTreeContextOrThrow.tsx
+++ b/packages/twenty-ui/src/components/data-display/JsonTree/internal/hooks/useJsonTreeContextOrThrow.tsx
@@ -1,14 +1,16 @@
import { JsonTreeContext } from '@ui/components/data-display/JsonTree/internal/contexts/JsonTreeContext';
import { isDefined } from '@ui/utilities/utils/isDefined';
import { useContext } from 'react';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const useJsonTreeContextOrThrow = () => {
const value = useContext(JsonTreeContext);
if (!isDefined(value)) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal context invariant for developers.
- 'useJsonTreeContextOrThrow must be used within a JsonTreeContextProvider',
+ doNotTranslate(
+ 'useJsonTreeContextOrThrow must be used within a JsonTreeContextProvider',
+ ),
);
}
diff --git a/packages/twenty-ui/src/components/feedback/Callout/internal/CalloutComponent.tsx b/packages/twenty-ui/src/components/feedback/Callout/internal/CalloutComponent.tsx
index 309dafc81a8..91af924549a 100644
--- a/packages/twenty-ui/src/components/feedback/Callout/internal/CalloutComponent.tsx
+++ b/packages/twenty-ui/src/components/feedback/Callout/internal/CalloutComponent.tsx
@@ -10,6 +10,7 @@ import { isDefined } from '@ui/utilities/utils/isDefined';
import styles from '../Callout.module.scss';
import { type CalloutProps } from '../types/CalloutProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const CalloutComponent = ({
status = 'info',
@@ -20,8 +21,7 @@ export const CalloutComponent = ({
fullWidth = false,
icon = <IconHelp size={themeCssVariables.icon.size.md} aria-hidden="true" />,
action,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass a translated closeLabel; this preserves the public UI fallback.
- closeLabel = 'Close',
+ closeLabel = doNotTranslate('Close'),
onDismiss,
className,
render,
diff --git a/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx b/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx
index bb614c27b09..ba33b708530 100644
--- a/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx
+++ b/packages/twenty-ui/src/components/feedback/Toast/Toast.tsx
@@ -23,6 +23,7 @@ import { ToastProgress } from './internal/components/ToastProgress';
import { useToastCountdown } from './internal/hooks/useToastCountdown';
import { type ToastProps } from './types/ToastProps';
import { type ToastStatus } from './types/ToastStatus';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const TOAST_ICONS = {
neutral: IconAlertTriangle,
@@ -42,10 +43,8 @@ export const Toast = ({
duration = DEFAULT_TOAST_DURATION,
onCancel,
onClose,
- // oxlint-disable lingui/no-unlocalized-strings -- Applications pass translated labels; these preserve the public UI fallback.
- cancelLabel = 'Cancel',
- closeLabel = 'Close',
- // oxlint-enable lingui/no-unlocalized-strings
+ cancelLabel = doNotTranslate('Cancel'),
+ closeLabel = doNotTranslate('Close'),
status = 'neutral',
role = 'status',
className,
diff --git a/packages/twenty-ui/src/components/feedback/Toast/internal/hooks/useToastContext.ts b/packages/twenty-ui/src/components/feedback/Toast/internal/hooks/useToastContext.ts
index c9939b06e93..cdb1cfc4a46 100644
--- a/packages/twenty-ui/src/components/feedback/Toast/internal/hooks/useToastContext.ts
+++ b/packages/twenty-ui/src/components/feedback/Toast/internal/hooks/useToastContext.ts
@@ -3,13 +3,15 @@ import { useContext } from 'react';
import { isDefined } from '@ui/utilities/utils/isDefined';
import { ToastContext } from '../contexts/ToastContext';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const useToastContext = () => {
const context = useContext(ToastContext);
if (!isDefined(context)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal provider invariant for developers.
- throw new Error('Toast components must be used within a ToastProvider.');
+ throw new Error(
+ doNotTranslate('Toast components must be used within a ToastProvider.'),
+ );
}
return context;
diff --git a/packages/twenty-ui/src/components/feedback/Toast/internal/utils/assertValidToastLimit.ts b/packages/twenty-ui/src/components/feedback/Toast/internal/utils/assertValidToastLimit.ts
index 6649b6747bd..b0d1bc56261 100644
--- a/packages/twenty-ui/src/components/feedback/Toast/internal/utils/assertValidToastLimit.ts
+++ b/packages/twenty-ui/src/components/feedback/Toast/internal/utils/assertValidToastLimit.ts
@@ -1,8 +1,8 @@
import { isPositiveInteger } from '@sniptt/guards';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const assertValidToastLimit = (limit: number) => {
if (!isPositiveInteger(limit)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This validates a developer-supplied provider option.
- throw new Error('Toast limit must be a positive integer.');
+ throw new Error(doNotTranslate('Toast limit must be a positive integer.'));
}
};
diff --git a/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx b/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx
index 4b2cb239027..5fc8bdf6dbc 100644
--- a/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx
+++ b/packages/twenty-ui/src/components/feedback/Toaster/Toaster.tsx
@@ -10,6 +10,7 @@ import styles from './Toaster.module.scss';
import { ToasterItems } from './internal/ToasterItems';
import { ToasterLifecycleEffect } from './internal/ToasterLifecycleEffect';
import { type ToasterProps } from './types/ToasterProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const Toaster = ({
container,
@@ -33,8 +34,7 @@ export const Toaster = ({
props: {
role: 'region',
dir: direction,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass a translated aria-label; this preserves the public UI fallback.
- 'aria-label': 'Notifications',
+ 'aria-label': doNotTranslate('Notifications'),
...props,
className: clsx(styles.root, className),
children: (
diff --git a/packages/twenty-ui/src/components/input/CountrySelect/CountrySelect.tsx b/packages/twenty-ui/src/components/input/CountrySelect/CountrySelect.tsx
index 160f5b0eead..b2e80bdffa4 100644
--- a/packages/twenty-ui/src/components/input/CountrySelect/CountrySelect.tsx
+++ b/packages/twenty-ui/src/components/input/CountrySelect/CountrySelect.tsx
@@ -16,6 +16,7 @@ import { CountrySelectAvailabilityEffect } from './internal/CountrySelectAvailab
import { CountrySelectOptions } from './internal/CountrySelectOptions';
import { getCountrySelectLabelledBy } from './internal/getCountrySelectLabelledBy';
import { type CountrySelectProps } from './types/CountrySelectProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const skipTriggerActivation = (event: { preventBaseUIHandler?: () => void }) =>
event.preventBaseUIHandler?.();
@@ -25,11 +26,9 @@ export const CountrySelect = ({
value,
onValueChange,
label,
- // oxlint-disable lingui/no-unlocalized-strings -- Applications pass translated labels; these preserve the public UI fallback.
- searchLabel = 'Search',
- noCountryLabel = 'No country',
- noResultsLabel = 'No results',
- // oxlint-enable lingui/no-unlocalized-strings
+ searchLabel = doNotTranslate('Search'),
+ noCountryLabel = doNotTranslate('No country'),
+ noResultsLabel = doNotTranslate('No results'),
open: controlledOpen,
onOpenChange,
popupProps,
diff --git a/packages/twenty-ui/src/components/input/CurrencyPicker/internal/CurrencyPickerOptions.tsx b/packages/twenty-ui/src/components/input/CurrencyPicker/internal/CurrencyPickerOptions.tsx
index a9478df6503..a0a56c5fd55 100644
--- a/packages/twenty-ui/src/components/input/CurrencyPicker/internal/CurrencyPickerOptions.tsx
+++ b/packages/twenty-ui/src/components/input/CurrencyPicker/internal/CurrencyPickerOptions.tsx
@@ -10,16 +10,15 @@ import { isDefined } from '@ui/utilities/utils/isDefined';
import styles from '../CurrencyPicker.module.scss';
import { getCurrencyPickerLabel } from './getCurrencyPickerLabel';
import { type CurrencyPickerOptionsProps } from '../types/CurrencyPickerOptionsProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const CurrencyPickerOptions = ({
currencies,
value,
onValueChange,
disabled = false,
- // oxlint-disable lingui/no-unlocalized-strings -- Applications pass translated labels; these preserve the public UI fallback.
- searchLabel = 'Search',
- emptyLabel = 'No results',
- // oxlint-enable lingui/no-unlocalized-strings
+ searchLabel = doNotTranslate('Search'),
+ emptyLabel = doNotTranslate('No results'),
className,
render,
ref,
diff --git a/packages/twenty-ui/src/components/input/ImageInput/ImageInput.tsx b/packages/twenty-ui/src/components/input/ImageInput/ImageInput.tsx
index 422cb265f9b..49513a05a41 100644
--- a/packages/twenty-ui/src/components/input/ImageInput/ImageInput.tsx
+++ b/packages/twenty-ui/src/components/input/ImageInput/ImageInput.tsx
@@ -11,6 +11,7 @@ import { isDefined } from '@ui/utilities/utils/isDefined';
import styles from './ImageInput.module.scss';
import { ImageInputPreview } from './internal/ImageInputPreview';
import { type ImageInputProps } from './types/ImageInputProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const DEFAULT_IMAGE_ACCEPT = 'image/*';
@@ -23,11 +24,9 @@ export const ImageInput = ({
isUploading = false,
helperText,
errorMessage,
- // oxlint-disable lingui/no-unlocalized-strings -- Applications pass translated labels; these preserve the public UI fallback.
- uploadLabel = 'Upload',
- removeLabel = 'Remove',
- abortLabel = 'Abort',
- // oxlint-enable lingui/no-unlocalized-strings
+ uploadLabel = doNotTranslate('Upload'),
+ removeLabel = doNotTranslate('Remove'),
+ abortLabel = doNotTranslate('Abort'),
accept = DEFAULT_IMAGE_ACCEPT,
inputRef,
onChange,
diff --git a/packages/twenty-ui/src/components/input/NumberStepper/NumberStepper.tsx b/packages/twenty-ui/src/components/input/NumberStepper/NumberStepper.tsx
index e1dad753fd0..74f445e228d 100644
--- a/packages/twenty-ui/src/components/input/NumberStepper/NumberStepper.tsx
+++ b/packages/twenty-ui/src/components/input/NumberStepper/NumberStepper.tsx
@@ -13,6 +13,7 @@ import { NUMBER_STEPPER_FORMAT } from './internal/constants/NumberStepperFormat'
import { isBlurRoundingOfCurrentValue } from './internal/utils/isBlurRoundingOfCurrentValue';
import styles from './NumberStepper.module.scss';
import { type NumberStepperProps } from './types/NumberStepperProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const NumberStepper = ({
value,
@@ -30,18 +31,15 @@ export const NumberStepper = ({
form,
id,
showButtons = true,
- // oxlint-disable lingui/no-unlocalized-strings -- Applications pass translated labels; these preserve the public UI fallback.
- decrementLabel = 'Decrease value',
- incrementLabel = 'Increase value',
- // oxlint-enable lingui/no-unlocalized-strings
+ decrementLabel = doNotTranslate('Decrease value'),
+ incrementLabel = doNotTranslate('Increase value'),
className,
...props
}: NumberStepperProps) => {
const [resolvedValue, setResolvedValue] = useControlled({
controlled: value,
default: defaultValue ?? null,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Base UI uses this component name only in developer warnings.
- name: 'NumberStepper',
+ name: doNotTranslate('NumberStepper'),
state: 'value',
});
const currentValueRef = useValueAsRef(resolvedValue);
diff --git a/packages/twenty-ui/src/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.tsx b/packages/twenty-ui/src/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.tsx
index 2e773e70f10..4dcba1a97cb 100644
--- a/packages/twenty-ui/src/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.tsx
+++ b/packages/twenty-ui/src/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.tsx
@@ -9,15 +9,14 @@ import { isDefined } from '@ui/utilities/utils/isDefined';
import styles from '../PhoneCountryPicker.module.scss';
import { type PhoneCountryPickerOptionsProps } from '../types/PhoneCountryPickerOptionsProps';
import { getPhoneCountryOptionLabel } from './getPhoneCountryOptionLabel';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const PhoneCountryPickerOptions = ({
countries,
value,
onValueChange,
- // oxlint-disable lingui/no-unlocalized-strings -- Applications pass translated labels; these preserve the public UI fallback.
- searchLabel = 'Search',
- emptyLabel = 'No results',
- // oxlint-enable lingui/no-unlocalized-strings
+ searchLabel = doNotTranslate('Search'),
+ emptyLabel = doNotTranslate('No results'),
}: PhoneCountryPickerOptionsProps) => {
const [search, setSearch] = useState('');
const normalizedSearch = normalizeSearchText(search);
diff --git a/packages/twenty-ui/src/components/layout/OverflowingList/OverflowingList.tsx b/packages/twenty-ui/src/components/layout/OverflowingList/OverflowingList.tsx
index 2b53ac87d30..9fbcfeed38d 100644
--- a/packages/twenty-ui/src/components/layout/OverflowingList/OverflowingList.tsx
+++ b/packages/twenty-ui/src/components/layout/OverflowingList/OverflowingList.tsx
@@ -20,6 +20,7 @@ import { OverflowingListLayoutEffect } from './internal/OverflowingListLayoutEff
import { useOverflowingListLayout } from './internal/useOverflowingListLayout';
import { useOverflowingListFocus } from './internal/useOverflowingListFocus';
import { type OverflowingListProps } from './types/OverflowingListProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
type PopoverActions = NonNullable<
ComponentProps<typeof Popover.Root>['actionsRef']
@@ -31,8 +32,7 @@ export const OverflowingList = ({
children,
showOverflowCount,
maxInlineCount,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass a translated overflowLabel; this preserves the public UI fallback.
- overflowLabel = 'Show all items',
+ overflowLabel = doNotTranslate('Show all items'),
open,
defaultOpen = false,
onOpenChange,
@@ -52,8 +52,7 @@ export const OverflowingList = ({
const [isOpen, setIsOpen] = useControlled({
controlled: open,
default: defaultOpen,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Base UI uses this component name only in developer warnings.
- name: 'OverflowingList',
+ name: doNotTranslate('OverflowingList'),
state: 'open',
});
const internalActionsRef = useRef<PopoverActions>(null);
diff --git a/packages/twenty-ui/src/components/layout/OverflowingList/internal/focusOverflowingListFallback.ts b/packages/twenty-ui/src/components/layout/OverflowingList/internal/focusOverflowingListFallback.ts
index 32c56ca1085..2e82e60876f 100644
--- a/packages/twenty-ui/src/components/layout/OverflowingList/internal/focusOverflowingListFallback.ts
+++ b/packages/twenty-ui/src/components/layout/OverflowingList/internal/focusOverflowingListFallback.ts
@@ -1,8 +1,9 @@
-// oxlint-disable lingui/no-unlocalized-strings -- The selector must remain valid CSS.
import { isDefined } from '@ui/utilities/utils/isDefined';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
-const FOCUSABLE_ITEM_SELECTOR =
- 'button, a[href], input, select, textarea, [tabindex]';
+const FOCUSABLE_ITEM_SELECTOR = doNotTranslate(
+ 'button, a[href], input, select, textarea, [tabindex]',
+);
export const focusOverflowingListFallback = ({
items,
diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownBack.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownBack.tsx
index 4eb9eadeadb..e617a88bfcc 100644
--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownBack.tsx
+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownBack.tsx
@@ -6,10 +6,10 @@ import styles from '../Dropdown.module.scss';
import { type DropdownActionItemProps } from '../types/DropdownActionItemProps';
import { DropdownActionItem } from './DropdownActionItem';
import { useDropdownContext } from './useDropdownContext';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const DropdownBack = ({
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass translated children; this preserves the public UI fallback.
- children = 'Back',
+ children = doNotTranslate('Back'),
className,
onClick,
...props
diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.tsx
index 059d8275b40..a645b173b5f 100644
--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.tsx
+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.tsx
@@ -1,4 +1,3 @@
-// oxlint-disable lingui/no-unlocalized-strings -- KeyboardEvent.key values must match browser APIs.
import { useDirection } from '@base-ui/react/direction-provider';
import { useMergedRefs } from '@base-ui/utils/useMergedRefs';
import { useId } from 'react';
@@ -15,6 +14,7 @@ import { getDropdownFocusTarget } from './getDropdownFocusTarget';
import { useDropdownContext } from './useDropdownContext';
import { useDropdownItemFocus } from './useDropdownItemFocus';
import { useRegisterDropdownLabelElement } from './useRegisterDropdownLabelElement';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const DropdownSubmenuTrigger = ({
color,
@@ -77,7 +77,9 @@ export const DropdownSubmenuTrigger = ({
}
const isRightToLeft = direction === 'rtl';
- const forwardKey = isRightToLeft ? 'ArrowLeft' : 'ArrowRight';
+ const forwardKey = doNotTranslate(
+ isRightToLeft ? 'ArrowLeft' : 'ArrowRight',
+ );
if (event.key === forwardKey) {
event.preventDefault();
diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/getNextDropdownGridItem.ts b/packages/twenty-ui/src/components/navigation/Dropdown/internal/getNextDropdownGridItem.ts
index b4648aa2e3e..e2466f241b0 100644
--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/getNextDropdownGridItem.ts
+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/getNextDropdownGridItem.ts
@@ -1,7 +1,7 @@
-// oxlint-disable lingui/no-unlocalized-strings -- KeyboardEvent.key values must match browser APIs.
import { isPositiveInteger } from '@sniptt/guards';
import { isDefined } from '@ui/utilities/utils/isDefined';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const getNearestEnabledCell = ({
rowCells,
@@ -43,12 +43,12 @@ export const getNextDropdownGridItem = ({
}): HTMLElement | undefined => {
const section = currentItem?.closest<HTMLElement>('[data-dropdown-columns]');
const columns = Number(section?.dataset.dropdownColumns);
- const isArrowKey = [
+ const isArrowKey = doNotTranslate([
'ArrowUp',
'ArrowDown',
'ArrowLeft',
'ArrowRight',
- ].includes(key);
+ ]).includes(key);
if (
!isDefined(section) ||
@@ -73,7 +73,7 @@ export const getNextDropdownGridItem = ({
const currentRow = Math.floor(currentIndex / columns);
const currentColumn = currentIndex % columns;
const isVertical = key === 'ArrowUp' || key === 'ArrowDown';
- const forwardKey = isRightToLeft ? 'ArrowLeft' : 'ArrowRight';
+ const forwardKey = doNotTranslate(isRightToLeft ? 'ArrowLeft' : 'ArrowRight');
const step = key === 'ArrowDown' || key === forwardKey ? 1 : -1;
const rowCount = Math.ceil(cells.length / columns);
const enabledItems = new Set(items);
diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownContext.ts b/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownContext.ts
index eac7c1306ef..22ee466b9aa 100644
--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownContext.ts
+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownContext.ts
@@ -3,13 +3,15 @@ import { useContext } from 'react';
import { isDefined } from '@ui/utilities/utils/isDefined';
import { DropdownContext } from './DropdownContext';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const useDropdownContext = () => {
const context = useContext(DropdownContext);
if (!isDefined(context)) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This is an internal context invariant for developers.
- throw new Error('Dropdown components must be inside Dropdown.Root');
+ throw new Error(
+ doNotTranslate('Dropdown components must be inside Dropdown.Root'),
+ );
}
return context;
diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.ts b/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.ts
index 37be2897f0d..1df1f97d2bb 100644
--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.ts
+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.ts
@@ -1,4 +1,3 @@
-// oxlint-disable lingui/no-unlocalized-strings -- KeyboardEvent.key values must match browser APIs.
import { useDirection } from '@base-ui/react/direction-provider';
import { useState, type KeyboardEvent } from 'react';
@@ -13,6 +12,7 @@ import { getDropdownTrigger } from './getDropdownTrigger';
import { getNextDropdownGridItem } from './getNextDropdownGridItem';
import { getNextDropdownItem } from './getNextDropdownItem';
import { useDropdownContext } from './useDropdownContext';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const TYPEAHEAD_RESET_DELAY = 500;
@@ -40,7 +40,9 @@ export const useDropdownKeyboardNavigation = () => {
'input,textarea,select,[contenteditable="true"]',
);
const isRightToLeft = direction === 'rtl';
- const backwardKey = isRightToLeft ? 'ArrowRight' : 'ArrowLeft';
+ const backwardKey = doNotTranslate(
+ isRightToLeft ? 'ArrowRight' : 'ArrowLeft',
+ );
const isSubmenuBackwardKey =
isSubmenu && !isEditable && event.key === backwardKey;
const backwardGridItem =
diff --git a/packages/twenty-ui/src/components/navigation/MenuItem/constants/DefaultColorLabels.ts b/packages/twenty-ui/src/components/navigation/MenuItem/constants/DefaultColorLabels.ts
index 2466343b987..b1364a1a327 100644
--- a/packages/twenty-ui/src/components/navigation/MenuItem/constants/DefaultColorLabels.ts
+++ b/packages/twenty-ui/src/components/navigation/MenuItem/constants/DefaultColorLabels.ts
@@ -1,7 +1,7 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Applications translate these public UI fallback color names at the read path.
import { type ColorLabels } from '../types/ColorLabels';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
-export const DEFAULT_COLOR_LABELS: ColorLabels = {
+export const DEFAULT_COLOR_LABELS: ColorLabels = doNotTranslate({
gray: 'Gray',
tomato: 'Tomato',
red: 'Red',
@@ -27,4 +27,4 @@ export const DEFAULT_COLOR_LABELS: ColorLabels = {
orange: 'Orange',
amber: 'Amber',
yellow: 'Yellow',
-};
+});
diff --git a/packages/twenty-ui/src/primitives/data-display/Avatar/internal/AvatarRoot.tsx b/packages/twenty-ui/src/primitives/data-display/Avatar/internal/AvatarRoot.tsx
index 32ba3defb39..4482c18e0ac 100644
--- a/packages/twenty-ui/src/primitives/data-display/Avatar/internal/AvatarRoot.tsx
+++ b/packages/twenty-ui/src/primitives/data-display/Avatar/internal/AvatarRoot.tsx
@@ -10,6 +10,7 @@ import styles from '../Avatar.module.scss';
import { type AvatarRootProps } from '../types/AvatarRootProps';
import { getAvatarInitial } from './getAvatarInitial';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const AvatarRoot = ({
name,
@@ -71,8 +72,7 @@ export const AvatarRoot = ({
variant === 'outline' &&
state.imageLoadingStatus !== 'loaded' &&
fallbackBorder
- ? // oxlint-disable-next-line lingui/no-unlocalized-strings -- CSS consumes this border style value.
- `1px solid ${fallbackBorder}`
+ ? doNotTranslate(`1px solid ${fallbackBorder}`)
: 'none',
...(isFunction(style) ? style(state) : style),
}) as CSSProperties
diff --git a/packages/twenty-ui/src/primitives/data-display/Chip/Chip.tsx b/packages/twenty-ui/src/primitives/data-display/Chip/Chip.tsx
index 769a20e8aba..cefeaaf440f 100644
--- a/packages/twenty-ui/src/primitives/data-display/Chip/Chip.tsx
+++ b/packages/twenty-ui/src/primitives/data-display/Chip/Chip.tsx
@@ -8,6 +8,7 @@ import { isDefined } from '@ui/utilities/utils/isDefined';
import styles from './Chip.module.scss';
import { type ChipProps } from './types/ChipProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const MEDIUM_LABEL_STYLE: CSSProperties = { height: 'var(--t-spacing-4)' };
@@ -53,8 +54,9 @@ export const Chip = ({
style: {
...(isDefined(maxWidth)
? {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- CSS consumes this calculation as a style value.
- '--tw-chip-max-width': `calc(${maxWidth}px - 2 * var(--tw-chip-padding))`,
+ '--tw-chip-max-width': doNotTranslate(
+ `calc(${maxWidth}px - 2 * var(--tw-chip-padding))`,
+ ),
}
: {}),
...style,
diff --git a/packages/twenty-ui/src/primitives/layout/ResizeHandle/ResizeHandle.tsx b/packages/twenty-ui/src/primitives/layout/ResizeHandle/ResizeHandle.tsx
index 6e79915c3a9..dc580a0048f 100644
--- a/packages/twenty-ui/src/primitives/layout/ResizeHandle/ResizeHandle.tsx
+++ b/packages/twenty-ui/src/primitives/layout/ResizeHandle/ResizeHandle.tsx
@@ -12,6 +12,7 @@ import { RESIZE_HANDLE_EDGES } from './internal/ResizeHandleEdges.constant';
import { useResizeHandleInteraction } from './internal/useResizeHandleInteraction';
import styles from './ResizeHandle.module.scss';
import { type ResizeHandleProps } from './types/ResizeHandleProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const ResizeHandle = ({
axis: requestedAxis = 'y',
@@ -48,8 +49,7 @@ export const ResizeHandle = ({
const [value, setValue] = useControlled({
controlled: controlledValue,
default: defaultValue,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Base UI uses this component name only in developer warnings.
- name: 'ResizeHandle',
+ name: doNotTranslate('ResizeHandle'),
});
const boundedValue = clamp(value, min, max);
const handleValueChange = (nextValue: number) => {
@@ -88,8 +88,7 @@ export const ResizeHandle = ({
props: mergeProps<'div'>(interactionProps, props, {
role: 'separator',
tabIndex: disabled ? -1 : (props.tabIndex ?? 0),
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass a translated aria-label; this preserves the public UI fallback.
- 'aria-label': props['aria-label'] ?? 'Resize',
+ 'aria-label': props['aria-label'] ?? doNotTranslate('Resize'),
'aria-orientation': axis === 'y' ? 'horizontal' : 'vertical',
'aria-valuemin': min,
'aria-valuemax': max,
diff --git a/packages/twenty-ui/src/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.ts b/packages/twenty-ui/src/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.ts
index 735892dc8d4..3432413f82a 100644
--- a/packages/twenty-ui/src/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.ts
+++ b/packages/twenty-ui/src/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.ts
@@ -1,4 +1,3 @@
-// oxlint-disable lingui/no-unlocalized-strings -- KeyboardEvent.key values must match browser APIs.
import { useDirection } from '@base-ui/react/direction-provider';
import { clamp } from '@base-ui/utils/clamp';
import { type KeyboardEvent } from 'react';
@@ -8,6 +7,7 @@ import { isDefined } from '@ui/utilities/utils/isDefined';
import { type ResizeHandleProps } from '../types/ResizeHandleProps';
import { useResizeHandlePointerInteraction } from './useResizeHandlePointerInteraction';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
type UseResizeHandleInteractionArgs = Required<
Pick<
@@ -90,15 +90,17 @@ export const useResizeHandleInteraction = ({
return;
}
- const forwardKey = axis === 'y' ? 'ArrowDown' : 'ArrowRight';
- const backwardKey = axis === 'y' ? 'ArrowUp' : 'ArrowLeft';
+ const forwardKey = doNotTranslate(
+ axis === 'y' ? 'ArrowDown' : 'ArrowRight',
+ );
+ const backwardKey = doNotTranslate(axis === 'y' ? 'ArrowUp' : 'ArrowLeft');
const increaseKey = isReversed ? backwardKey : forwardKey;
const decreaseKey = isReversed ? forwardKey : backwardKey;
const valueByKey = new Map([
[increaseKey, value + step],
[decreaseKey, value - step],
- ['Home', min],
- ['End', max],
+ [doNotTranslate('Home'), min],
+ [doNotTranslate('End'), max],
]);
const nextValue = valueByKey.get(event.key);
diff --git a/packages/twenty-ui/src/primitives/navigation/Breadcrumb/Breadcrumb.tsx b/packages/twenty-ui/src/primitives/navigation/Breadcrumb/Breadcrumb.tsx
index 320f3be8521..083115015ae 100644
--- a/packages/twenty-ui/src/primitives/navigation/Breadcrumb/Breadcrumb.tsx
+++ b/packages/twenty-ui/src/primitives/navigation/Breadcrumb/Breadcrumb.tsx
@@ -5,14 +5,14 @@ import { BreadcrumbItemContent } from './internal/BreadcrumbItemContent';
import { type BreadcrumbProps } from './types/BreadcrumbProps';
import styles from './Breadcrumb.module.scss';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const Breadcrumb = ({
links,
className,
render,
ref,
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Applications pass a translated aria-label; this preserves the public UI fallback.
- 'aria-label': ariaLabel = 'Breadcrumb',
+ 'aria-label': ariaLabel = doNotTranslate('Breadcrumb'),
...props
}: BreadcrumbProps) => {
return useRender({
diff --git a/packages/twenty-ui/src/primitives/navigation/Tabs/internal/focusNextEnabledTab.ts b/packages/twenty-ui/src/primitives/navigation/Tabs/internal/focusNextEnabledTab.ts
index 45adf23254b..4e1f5e45237 100644
--- a/packages/twenty-ui/src/primitives/navigation/Tabs/internal/focusNextEnabledTab.ts
+++ b/packages/twenty-ui/src/primitives/navigation/Tabs/internal/focusNextEnabledTab.ts
@@ -1,9 +1,9 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Keyboard and selector tokens must match browser APIs.
import { type TextDirection } from '@base-ui/react/direction-provider';
import { isDefined } from '@ui/utilities/utils/isDefined';
import { type TabsListProps } from '../types/TabsListProps';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
type FocusNextEnabledTabOptions = {
event: Parameters<NonNullable<TabsListProps['onKeyDown']>>[0];
@@ -13,7 +13,7 @@ type FocusNextEnabledTabOptions = {
const TAB_SELECTOR = '[role="tab"]';
const TAB_LIST_SELECTOR = '[role="tablist"]';
-const UNAVAILABLE_TAB_ANCESTOR_SELECTOR = '[hidden], [inert]';
+const UNAVAILABLE_TAB_ANCESTOR_SELECTOR = doNotTranslate('[hidden], [inert]');
const isUnavailableTab = (tab: HTMLElement) =>
tab.hasAttribute('data-disabled') ||
@@ -45,16 +45,21 @@ export const focusNextEnabledTab = ({
return;
}
- const horizontalKeys =
+ const horizontalKeys = doNotTranslate(
direction === 'rtl'
? ['ArrowLeft', 'ArrowRight']
- : ['ArrowRight', 'ArrowLeft'];
+ : ['ArrowRight', 'ArrowLeft'],
+ );
const [forwardKey, backwardKey] =
list.getAttribute('data-orientation') === 'vertical'
- ? ['ArrowDown', 'ArrowUp']
+ ? doNotTranslate(['ArrowDown', 'ArrowUp'])
: horizontalKeys;
- if (![forwardKey, backwardKey, 'Home', 'End'].includes(event.key)) {
+ if (
+ !doNotTranslate([forwardKey, backwardKey, 'Home', 'End']).includes(
+ event.key,
+ )
+ ) {
return;
}
diff --git a/packages/twenty-ui/src/primitives/typography/Shortcut/internal/getShortcutPresentation.ts b/packages/twenty-ui/src/primitives/typography/Shortcut/internal/getShortcutPresentation.ts
index 85c5ba9f34f..2bbabb04132 100644
--- a/packages/twenty-ui/src/primitives/typography/Shortcut/internal/getShortcutPresentation.ts
+++ b/packages/twenty-ui/src/primitives/typography/Shortcut/internal/getShortcutPresentation.ts
@@ -1,4 +1,3 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Applications can override these public UI keyboard labels.
import { isNonEmptyArray, isString } from '@sniptt/guards';
import { isDefined } from '@ui/utilities/utils/isDefined';
@@ -6,22 +5,25 @@ import { getUserDevice } from '@ui/utilities/device/getUserDevice';
import { type ShortcutDefinition } from '../types/ShortcutDefinition';
import { type ShortcutFormatOptions } from '../types/ShortcutFormatOptions';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
-const ACCESSIBLE_KEY_LABELS = new Map<string, string>([
- ['⌘', 'Command'],
- ['⌥', 'Option'],
- ['⇧', 'Shift'],
- ['⌃', 'Control'],
- ['Ctrl', 'Control'],
- ['⏎', 'Enter'],
- ['↵', 'Enter'],
- ['⌫', 'Backspace'],
- ['↑', 'Arrow up'],
- ['↓', 'Arrow down'],
- ['←', 'Arrow left'],
- ['→', 'Arrow right'],
- ['esc', 'Escape'],
-]);
+const ACCESSIBLE_KEY_LABELS = new Map<string, string>(
+ doNotTranslate([
+ ['⌘', 'Command'],
+ ['⌥', 'Option'],
+ ['⇧', 'Shift'],
+ ['⌃', 'Control'],
+ ['Ctrl', 'Control'],
+ ['⏎', 'Enter'],
+ ['↵', 'Enter'],
+ ['⌫', 'Backspace'],
+ ['↑', 'Arrow up'],
+ ['↓', 'Arrow down'],
+ ['←', 'Arrow left'],
+ ['→', 'Arrow right'],
+ ['esc', 'Escape'],
+ ]),
+);
const isShortcutCombination = (
shortcut: ShortcutDefinition,
@@ -39,12 +41,12 @@ export const getShortcutPresentation = ({
platform === 'mac' ||
(!isDefined(platform) && (device === 'mac' || device === 'ios'));
const keySymbols = new Map<string, string>([
- ['Mod', isMac ? '⌘' : 'Ctrl'],
- ['CommandOrControl', isMac ? '⌘' : 'Ctrl'],
- ['Command', '⌘'],
- ['Control', 'Ctrl'],
- ['Alt', isMac ? '⌥' : 'Alt'],
- ['Enter', '⏎'],
+ [doNotTranslate('Mod'), isMac ? '⌘' : doNotTranslate('Ctrl')],
+ [doNotTranslate('CommandOrControl'), isMac ? '⌘' : doNotTranslate('Ctrl')],
+ [doNotTranslate('Command'), '⌘'],
+ doNotTranslate(['Control', 'Ctrl']),
+ [doNotTranslate('Alt'), isMac ? '⌥' : doNotTranslate('Alt')],
+ [doNotTranslate('Enter'), '⏎'],
]);
const steps = isShortcutCombination(shortcut) ? [shortcut] : shortcut;
const groups = steps
diff --git a/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts b/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts
index 3a8fe6a0f9b..9784ebbe911 100644
--- a/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts
+++ b/packages/twenty-ui/src/utilities/color/utils/stringToThemeColorP3String.ts
@@ -4,6 +4,7 @@ import {
type ThemeColor,
MAIN_COLOR_NAMES,
} from '@ui/theme';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const stringToThemeColor = (string: string): ThemeColor => {
let hash = 0;
@@ -25,8 +26,7 @@ export const stringToThemeColorP3String = ({
theme: ThemeType;
}): string => {
if (variant < 1 || variant > 12) {
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- This validates an internal color token parameter.
- throw new Error('Variant must be between 1 and 12');
+ throw new Error(doNotTranslate('Variant must be between 1 and 12'));
}
const colorName = stringToThemeColor(string);
diff --git a/packages/twenty-ui/src/utilities/device/getOsControlSymbol.ts b/packages/twenty-ui/src/utilities/device/getOsControlSymbol.ts
index 88ce1f8d8cc..e94d76cf18e 100644
--- a/packages/twenty-ui/src/utilities/device/getOsControlSymbol.ts
+++ b/packages/twenty-ui/src/utilities/device/getOsControlSymbol.ts
@@ -1,8 +1,8 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Ctrl is a platform keycap symbol.
import { getUserDevice } from '@ui/utilities/device/getUserDevice';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const getOsControlSymbol = () => {
const device = getUserDevice();
- return device === 'mac' || device === 'ios' ? '⌘' : 'Ctrl';
+ return device === 'mac' || device === 'ios' ? '⌘' : doNotTranslate('Ctrl');
};
diff --git a/packages/twenty-ui/src/utilities/device/getUserDevice.ts b/packages/twenty-ui/src/utilities/device/getUserDevice.ts
index 02d6f9431a1..6680b9e2ed3 100644
--- a/packages/twenty-ui/src/utilities/device/getUserDevice.ts
+++ b/packages/twenty-ui/src/utilities/device/getUserDevice.ts
@@ -1,5 +1,5 @@
-// oxlint-disable lingui/no-unlocalized-strings -- User-agent tokens are protocol values.
import { isString } from '@sniptt/guards';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
export const getUserDevice = () => {
const userAgent = globalThis.navigator?.userAgent;
@@ -19,7 +19,7 @@ export const getUserDevice = () => {
}
if (
- normalizedUserAgent.includes('mac os x') ||
+ normalizedUserAgent.includes(doNotTranslate('mac os x')) ||
normalizedUserAgent.includes('macos')
) {
return 'mac';
diff --git a/packages/twenty-ui/src/utilities/internal/doNotTranslate.ts b/packages/twenty-ui/src/utilities/internal/doNotTranslate.ts
new file mode 100644
index 00000000000..f7f12c5f25d
--- /dev/null
+++ b/packages/twenty-ui/src/utilities/internal/doNotTranslate.ts
@@ -0,0 +1,2 @@
+// The Lingui lint gate skips arguments of this call: use it for text that must stay as written.
+export const doNotTranslate = <TValue>(value: TValue): TValue => value;
diff --git a/packages/twenty-ui/src/utilities/responsive/constants/MobileMediaQuery.ts b/packages/twenty-ui/src/utilities/responsive/constants/MobileMediaQuery.ts
index 221b3c50bd0..162807f54bd 100644
--- a/packages/twenty-ui/src/utilities/responsive/constants/MobileMediaQuery.ts
+++ b/packages/twenty-ui/src/utilities/responsive/constants/MobileMediaQuery.ts
@@ -1,4 +1,6 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Media query syntax is interpreted by CSS.
import { MOBILE_VIEWPORT } from '@ui/theme';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
-export const MOBILE_MEDIA_QUERY = `(max-width: ${MOBILE_VIEWPORT}px)`;
+export const MOBILE_MEDIA_QUERY = doNotTranslate(
+ `(max-width: ${MOBILE_VIEWPORT}px)`,
+);
diff --git a/packages/twenty-ui/src/utilities/responsive/constants/TouchDeviceMediaQuery.ts b/packages/twenty-ui/src/utilities/responsive/constants/TouchDeviceMediaQuery.ts
index 5d1378a278d..18974a95e59 100644
--- a/packages/twenty-ui/src/utilities/responsive/constants/TouchDeviceMediaQuery.ts
+++ b/packages/twenty-ui/src/utilities/responsive/constants/TouchDeviceMediaQuery.ts
@@ -1,2 +1,5 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Media query syntax is interpreted by CSS.
-export const TOUCH_DEVICE_MEDIA_QUERY = '(hover: none) and (pointer: coarse)';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
+
+export const TOUCH_DEVICE_MEDIA_QUERY = doNotTranslate(
+ '(hover: none) and (pointer: coarse)',
+);
diff --git a/packages/twenty-ui/src/utilities/utils/normalizeSearchText.ts b/packages/twenty-ui/src/utilities/utils/normalizeSearchText.ts
index 85e4c335ff3..4d625203d25 100644
--- a/packages/twenty-ui/src/utilities/utils/normalizeSearchText.ts
+++ b/packages/twenty-ui/src/utilities/utils/normalizeSearchText.ts
@@ -1,5 +1,5 @@
-// oxlint-disable lingui/no-unlocalized-strings -- Unicode normalization forms are standard identifiers.
import { isDefined } from './isDefined';
+import { doNotTranslate } from '@ui/utilities/internal/doNotTranslate';
const SPACING_DIACRITICS = /[·ʻʼ´¨ˆ˜΄ˇ˘˙˚˛˝¯¸^`]/g;
const MARKS_AFTER_LATIN_GREEK_ARABIC_OR_HEBREW_LETTER =
@@ -46,12 +46,14 @@ export const normalizeSearchText = (
return text
.toLowerCase()
- .normalize('NFD')
+ .normalize(doNotTranslate('NFD'))
.replace(SPACING_DIACRITICS, '')
.replace(MARKS_AFTER_LATIN_GREEK_ARABIC_OR_HEBREW_LETTER, '$1')
.replace(CYRILLIC_LETTER_WITH_MARKS, removeCyrillicStressAccents)
- .normalize('NFC')
- .replace(HANGUL_SYLLABLES, (syllables) => syllables.normalize('NFD'))
+ .normalize(doNotTranslate('NFC'))
+ .replace(HANGUL_SYLLABLES, (syllables) =>
+ syllables.normalize(doNotTranslate('NFD')),
+ )
.replace(HANGUL_COMPATIBILITY_JAMO, (jamo) => jamo.normalize('NFKD'))
.replace(
LETTERS_WITH_SEARCH_REPLACEMENT,
diff --git a/packages/twenty-website/src/contact-cal/use-contact-cal-modal.ts b/packages/twenty-website/src/contact-cal/use-contact-cal-modal.ts
index 3ea023e3864..0cfae0c6896 100644
--- a/packages/twenty-website/src/contact-cal/use-contact-cal-modal.ts
+++ b/packages/twenty-website/src/contact-cal/use-contact-cal-modal.ts
@@ -3,13 +3,15 @@
import { useContext } from 'react';
import { ContactCalModalContext } from './contact-cal-modal-context';
+import { doNotTranslate } from 'twenty-shared/i18n';
export function useContactCalModal() {
const value = useContext(ContactCalModalContext);
if (value === null) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Preserve the developer invariant for error grouping.
- 'useContactCalModal must be used within ContactCalModalRoot',
+ doNotTranslate(
+ 'useContactCalModal must be used within ContactCalModalRoot',
+ ),
);
}
return value;
diff --git a/packages/twenty-website/src/pricing-state/use-pricing-state.ts b/packages/twenty-website/src/pricing-state/use-pricing-state.ts
index 8085d448719..c3d256045a1 100644
--- a/packages/twenty-website/src/pricing-state/use-pricing-state.ts
+++ b/packages/twenty-website/src/pricing-state/use-pricing-state.ts
@@ -3,14 +3,16 @@
import { useContext } from 'react';
import { PricingStateContext } from './pricing-state-context';
+import { doNotTranslate } from 'twenty-shared/i18n';
export function usePricingState() {
const context = useContext(PricingStateContext);
if (context === null) {
throw new Error(
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Preserve the developer invariant for error grouping.
- 'usePricingState must be used within a PricingStateProvider',
+ doNotTranslate(
+ 'usePricingState must be used within a PricingStateProvider',
+ ),
);
}
return context;
diff --git a/packages/twenty-website/src/ui/ButtonShape.tsx b/packages/twenty-website/src/ui/ButtonShape.tsx
index 710a9bd07db..27b9d1ff341 100644
--- a/packages/twenty-website/src/ui/ButtonShape.tsx
+++ b/packages/twenty-website/src/ui/ButtonShape.tsx
@@ -1,6 +1,7 @@
import { styled } from '@linaria/react';
import { DURATION, EASING } from '@/tokens';
+import { doNotTranslate } from 'twenty-shared/i18n';
// Purely geometric 9-slice for the brand's beveled button: rounded left cap,
// stretching middle, curved-bevel right cap. All color comes from the
@@ -48,23 +49,25 @@ const Middle = styled.span`
`;
const leftFillPath = (height: number): string =>
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG path commands are geometry, not copy.
- `M4 0 A4 4 0 0 0 0 4 V${height - 4} A4 4 0 0 0 4 ${height} Z`;
+ doNotTranslate(`M4 0 A4 4 0 0 0 0 4 V${height - 4} A4 4 0 0 0 4 ${height} Z`);
const leftStrokePath = (height: number): string =>
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG path commands are geometry, not copy.
- `M4 0.5 A3.5 3.5 0 0 0 0.5 4 V${height - 4} A3.5 3.5 0 0 0 4 ${height - 0.5}`;
+ doNotTranslate(
+ `M4 0.5 A3.5 3.5 0 0 0 0.5 4 V${height - 4} A3.5 3.5 0 0 0 4 ${height - 0.5}`,
+ );
const rightFillPath = (height: number): string => {
const straight = Math.max(height - TAPER_TOP_OFFSET - TAPER_HEIGHT, 0);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG path commands are geometry, not copy.
- return `M0 0 h11 a4 4 0 0 1 4 4 v${straight} a6 6 0 0 1 -1.544 4.019 l-8.548 9.477 A6 6 0 0 1 0.453 ${height} H0 Z`;
+ return doNotTranslate(
+ `M0 0 h11 a4 4 0 0 1 4 4 v${straight} a6 6 0 0 1 -1.544 4.019 l-8.548 9.477 A6 6 0 0 1 0.453 ${height} H0 Z`,
+ );
};
const rightStrokePath = (height: number): string => {
const straight = Math.max(height - TAPER_TOP_OFFSET - TAPER_HEIGHT, 0);
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG path commands are geometry, not copy.
- return `M0 0.5 h11 a3.5 3.5 0 0 1 3.5 3.5 v${straight} a5.5 5.5 0 0 1 -1.416 3.684 l-8.547 9.477 a5.5 5.5 0 0 1 -4.084 1.816 H0`;
+ return doNotTranslate(
+ `M0 0.5 h11 a3.5 3.5 0 0 1 3.5 3.5 v${straight} a5.5 5.5 0 0 1 -1.416 3.684 l-8.547 9.477 a5.5 5.5 0 0 1 -4.084 1.816 H0`,
+ );
};
export type ButtonShapeProps = {
diff --git a/packages/twenty-website/src/ui/EngagementBand.tsx b/packages/twenty-website/src/ui/EngagementBand.tsx
index 8488414e261..f46288c14a4 100644
--- a/packages/twenty-website/src/ui/EngagementBand.tsx
+++ b/packages/twenty-website/src/ui/EngagementBand.tsx
@@ -15,6 +15,7 @@ import {
import { Body } from './Body';
import { Heading } from './Heading';
import { SectionShell } from './SectionShell';
+import { doNotTranslate } from 'twenty-shared/i18n';
const Band = styled.div`
${buildSchemeDeclarations('light')}
@@ -100,9 +101,9 @@ const overlayImageClassName = css`
object-position: right center;
`;
-const OVERLAY_IMAGE_SIZES =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Next Image sizes are viewport geometry.
- `(min-width: ${BREAKPOINT_PX.md}px) 308px, 50vw`;
+const OVERLAY_IMAGE_SIZES = doNotTranslate(
+ `(min-width: ${BREAKPOINT_PX.md}px) 308px, 50vw`,
+);
type EngagementBandProps = {
heading: string;
diff --git a/packages/twenty-website/src/ui/NotchedCardShape.tsx b/packages/twenty-website/src/ui/NotchedCardShape.tsx
index 25b6e383a7f..5f91820ff38 100644
--- a/packages/twenty-website/src/ui/NotchedCardShape.tsx
+++ b/packages/twenty-website/src/ui/NotchedCardShape.tsx
@@ -6,6 +6,7 @@ import {
type Scheme,
semanticColor,
} from '@/tokens';
+import { doNotTranslate } from 'twenty-shared/i18n';
const CAP_HEIGHT_PX = 20;
@@ -21,12 +22,12 @@ const NOTCH_MAX_WIDTH_PX = Math.round(
(MAX_CONTENT_WIDTH_PX - LEFT_SLOPE_WIDTH_PX - RIGHT_SLOPE_WIDTH_PX),
);
-const LEFT_SLOPE_PATH =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG path commands are geometry, not copy.
- 'M0 0 C4.197 0 8.369 0.66 12.361 1.958 L61.861 18.042 A40 40 0 0 0 74.222 20 L0 20 Z';
-const RIGHT_SLOPE_PATH =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- SVG path commands are geometry, not copy.
- 'M0 20 A40 40 0 0 1 12.63 17.953 L60.418 2.047 A40 40 0 0 1 73.048 0 L73.048 20 Z';
+const LEFT_SLOPE_PATH = doNotTranslate(
+ 'M0 0 C4.197 0 8.369 0.66 12.361 1.958 L61.861 18.042 A40 40 0 0 0 74.222 20 L0 20 Z',
+);
+const RIGHT_SLOPE_PATH = doNotTranslate(
+ 'M0 20 A40 40 0 0 1 12.63 17.953 L60.418 2.047 A40 40 0 0 1 73.048 0 L73.048 20 Z',
+);
const ShapeRow = styled.div`
display: flex;
diff --git a/packages/twenty-website/src/ui/StepperSwipeDeck.tsx b/packages/twenty-website/src/ui/StepperSwipeDeck.tsx
index 50b6329589c..0ecf0fa5ed3 100644
--- a/packages/twenty-website/src/ui/StepperSwipeDeck.tsx
+++ b/packages/twenty-website/src/ui/StepperSwipeDeck.tsx
@@ -5,6 +5,7 @@ import { useCallback, useRef, useState, type ReactNode } from 'react';
import { usePrefersReducedMotion } from '@/platform/motion';
import { EASING } from '@/tokens';
+import { doNotTranslate } from 'twenty-shared/i18n';
const SWIPE_COMMIT_RATIO = 0.18;
const EDGE_RESISTANCE = 0.28;
@@ -136,9 +137,7 @@ export function StepperSwipeDeck({
const slideBasisPercent = 100 / stepCount;
const translatePercent = (-100 * activeIndex) / stepCount;
- const slideFlex =
- // oxlint-disable-next-line lingui/no-unlocalized-strings -- Flex sizing is layout geometry.
- `0 0 calc(${slideBasisPercent}%)`;
+ const slideFlex = doNotTranslate(`0 0 calc(${slideBasisPercent}%)`);
return (
<Viewport