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
@@ -59,7 +59,7 @@ export const SettingsObjectFieldInactiveActionDropdown = ({
|
||||
dropdownId={dropdownId}
|
||||
clickableComponent={
|
||||
<LightIconButton
|
||||
aria-label="Inactive Field Options"
|
||||
aria-label={t`Inactive Field Options`}
|
||||
Icon={IconDotsVertical}
|
||||
accent="tertiary"
|
||||
/>
|
||||
|
||||
+7
-6
@@ -163,15 +163,15 @@ export const SettingsObjectFieldItemTableRow = ({
|
||||
const typeLabel =
|
||||
variant === 'field-type'
|
||||
? isRemoteObjectField
|
||||
? 'Remote'
|
||||
? t`Remote`
|
||||
: fieldMetadataItem.isCustom
|
||||
? 'Custom'
|
||||
: 'Standard'
|
||||
? t`Custom`
|
||||
: t`Standard`
|
||||
: variant === 'identifier'
|
||||
? isDefined(identifierType)
|
||||
? identifierType === 'label'
|
||||
? 'Record text'
|
||||
: 'Record image'
|
||||
? t`Record text`
|
||||
: t`Record image`
|
||||
: ''
|
||||
: '';
|
||||
|
||||
@@ -181,9 +181,10 @@ export const SettingsObjectFieldItemTableRow = ({
|
||||
isDefined(relationObjectMetadataItem?.namePlural) &&
|
||||
!relationObjectMetadataItem.isSystem;
|
||||
|
||||
const morphRelationCount = fieldMetadataItem.morphRelations?.length;
|
||||
const morphRelationLabel =
|
||||
fieldMetadataItem.type === FieldMetadataType.MORPH_RELATION
|
||||
? `${fieldMetadataItem.morphRelations?.length} Objects`
|
||||
? t`${morphRelationCount} Objects`
|
||||
: undefined;
|
||||
|
||||
const label = morphRelationLabel
|
||||
|
||||
Reference in New Issue
Block a user