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:
+2
-1
@@ -2,6 +2,7 @@ import { AppErrorDisplay } from '@/error-handler/components/internal/AppErrorDis
|
||||
import { type AppErrorDisplayProps } from '@/error-handler/types/AppErrorDisplayProps';
|
||||
import { PageBody } from '@/ui/layout/page/components/PageBody';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
type AppFullScreenErrorFallbackProps = AppErrorDisplayProps;
|
||||
|
||||
@@ -18,7 +19,7 @@ const StyledContainer = styled.div`
|
||||
export const AppFullScreenErrorFallback = ({
|
||||
error,
|
||||
resetErrorBoundary,
|
||||
title = 'Sorry, something went wrong',
|
||||
title = t`Sorry, something went wrong`,
|
||||
}: AppFullScreenErrorFallbackProps) => {
|
||||
return (
|
||||
<StyledContainer>
|
||||
|
||||
@@ -3,13 +3,14 @@ import { type AppErrorDisplayProps } from '@/error-handler/types/AppErrorDisplay
|
||||
import { PageBody } from '@/ui/layout/page/components/PageBody';
|
||||
import { PageContainer } from '@/ui/layout/page/components/PageContainer';
|
||||
import { PageHeader } from '@/ui/layout/page/components/PageHeader';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
type AppPageErrorFallbackProps = AppErrorDisplayProps;
|
||||
|
||||
export const AppPageErrorFallback = ({
|
||||
error,
|
||||
resetErrorBoundary,
|
||||
title = 'Sorry, something went wrong',
|
||||
title = t`Sorry, something went wrong`,
|
||||
}: AppPageErrorFallbackProps) => {
|
||||
return (
|
||||
<PageContainer>
|
||||
|
||||
@@ -109,11 +109,11 @@ export const AppRootErrorFallback = ({
|
||||
<StyledImageContainer>
|
||||
<StyledBackgroundImage
|
||||
src="/images/placeholders/background/error_index_bg.png"
|
||||
alt="Background"
|
||||
alt={t`Background`}
|
||||
/>
|
||||
<StyledInnerImage
|
||||
src="/images/placeholders/moving-image/error_index.png"
|
||||
alt="Inner"
|
||||
alt={t`Error illustration`}
|
||||
/>
|
||||
</StyledImageContainer>
|
||||
<StyledEmptyTextContainer>
|
||||
@@ -124,7 +124,7 @@ export const AppRootErrorFallback = ({
|
||||
</StyledEmptyTextContainer>
|
||||
<StyledButton onClick={resetErrorBoundary}>
|
||||
<StyledIcon size={16} />
|
||||
Reload
|
||||
{t`Reload`}
|
||||
</StyledButton>
|
||||
</StyledEmptyContainer>
|
||||
</StyledPanel>
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
|
||||
export const AppErrorDisplay = ({
|
||||
resetErrorBoundary,
|
||||
title = 'Sorry, something went wrong',
|
||||
title = t`Sorry, something went wrong`,
|
||||
}: AppErrorDisplayProps) => {
|
||||
return (
|
||||
<AnimatedPlaceholderEmptyContainer>
|
||||
|
||||
Reference in New Issue
Block a user