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:
+7
-6
@@ -1,3 +1,4 @@
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { IconButton, type SelectOption } from 'twenty-ui/input';
|
||||
@@ -55,7 +56,7 @@ export const SettingsDatabaseEventsForm = ({
|
||||
const { getIcon } = useIcons();
|
||||
|
||||
const objectOptions: SelectOption<string>[] = [
|
||||
{ label: 'All Objects', value: '*', Icon: IconNorthStar },
|
||||
{ label: t`All Objects`, value: '*', Icon: IconNorthStar },
|
||||
...objectMetadataItems.map((item) => ({
|
||||
label: item.labelPlural,
|
||||
value: item.nameSingular,
|
||||
@@ -64,10 +65,10 @@ export const SettingsDatabaseEventsForm = ({
|
||||
];
|
||||
|
||||
const actionOptions: SelectOption<string>[] = [
|
||||
{ label: 'All', value: '*', Icon: IconNorthStar },
|
||||
{ label: 'Created', value: 'created', Icon: IconPlus },
|
||||
{ label: 'Updated', value: 'updated', Icon: IconBox },
|
||||
{ label: 'Deleted', value: 'deleted', Icon: IconTrash },
|
||||
{ label: t`All`, value: '*', Icon: IconNorthStar },
|
||||
{ label: t`Created`, value: 'created', Icon: IconPlus },
|
||||
{ label: t`Updated`, value: 'updated', Icon: IconBox },
|
||||
{ label: t`Deleted`, value: 'deleted', Icon: IconTrash },
|
||||
];
|
||||
|
||||
return (
|
||||
@@ -82,7 +83,7 @@ export const SettingsDatabaseEventsForm = ({
|
||||
updateOperation?.(index, 'object', newValue)
|
||||
}
|
||||
fullWidth
|
||||
emptyOption={{ label: 'Object', value: null }}
|
||||
emptyOption={{ label: t`Object`, value: null }}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<Select
|
||||
|
||||
Reference in New Issue
Block a user