feat: add lingui/no-unlocalized-strings ESLint rule and fix translations (#16610)
## Summary
This PR adds the `lingui/no-unlocalized-strings` ESLint rule to detect
untranslated strings and fixes translation issues across multiple
components.
## Changes
### ESLint Configuration (`eslint.config.react.mjs`)
- Added comprehensive `ignore` patterns for non-translatable strings
(CSS values, HTML attributes, technical identifiers)
- Added `ignoreNames` for props that don't need translation (className,
data-*, aria-*, etc.)
- Added `ignoreFunctions` for console methods, URL APIs, and other
non-user-facing functions
- Disabled rule for debug files, storybook, and test files
### Components Fixed (~19 files)
- Object record components (field inputs, pickers, merge dialogs)
- Settings components (accounts, admin panel)
- Serverless function components
- Record table and title cell components
## Status
🚧 **Work in Progress** - ~124 files remaining to fix
This PR is being submitted as draft to allow progressive fixing of
remaining translation issues.
## Testing
- Run `npx eslint "src/**/*.tsx"` in `packages/twenty-front` to check
remaining issues
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ export const SettingsAccountsBlocklistInput = ({
|
||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||
<SettingsTextInput
|
||||
instanceId="settings-accounts-blocklist-input"
|
||||
placeholder="eddy@gmail.com, @apple.com"
|
||||
placeholder={t`eddy@gmail.com, @apple.com`}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
error={error?.message}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ export const SettingsAccountsCalendarChannelsGeneral = () => {
|
||||
description: '',
|
||||
isCanceled: false,
|
||||
location: '',
|
||||
title: 'Onboarding call',
|
||||
title: t`Onboarding call`,
|
||||
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { type MessageFolder } from '@/accounts/types/MessageFolder';
|
||||
import { SettingsAccountsMessageFolderIcon } from '@/settings/accounts/components/message-folders/SettingsAccountsMessageFolderIcon';
|
||||
|
||||
@@ -127,7 +128,7 @@ export const SettingsMessageFoldersTreeItem = ({
|
||||
<StyledExpandButton
|
||||
isExpanded={isExpanded}
|
||||
onClick={handleExpandToggle}
|
||||
aria-label={isExpanded ? 'Collapse folder' : 'Expand folder'}
|
||||
aria-label={isExpanded ? t`Collapse folder` : t`Expand folder`}
|
||||
>
|
||||
<IconChevronRight size={16} />
|
||||
</StyledExpandButton>
|
||||
|
||||
Reference in New Issue
Block a user