fix: Enable Lingui recommended rules and fix all translation violations (#14133)
- Enable lingui/no-single-variables-to-translate and all other
recommended Lingui rules
- Fix single variable translation patterns (t`${variable}` → variable)
- Fix expression-in-message violations by extracting variables
- Fix t-call-in-function violations by moving translations inside
functions
- Update ESLint configs to use linguiPlugin.configs['flat/recommended']
- Clean up unused imports and improve translation patterns
This commit is contained in:
@@ -4,7 +4,6 @@ import {
|
||||
StyledSelectControlIconChevronDown,
|
||||
} from '@/ui/input/components/SelectControl';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import pluralize from 'pluralize';
|
||||
import React from 'react';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
@@ -64,7 +63,7 @@ export const MultiSelectControl = ({
|
||||
) : null}
|
||||
{isDefined(fixedText) ? (
|
||||
<OverflowingTextWithTooltip
|
||||
text={t`${selectedOptionsCount} ${
|
||||
text={`${selectedOptionsCount} ${
|
||||
selectedOptionsCount <= 1 ? fixedText : pluralize(fixedText)
|
||||
}`}
|
||||
/>
|
||||
|
||||
+7
-1
@@ -35,7 +35,13 @@ export const MultiWorkspaceDropdownThemesComponents = () => {
|
||||
<MenuItem
|
||||
key={theme.id}
|
||||
LeftIcon={theme.icon}
|
||||
text={t`${theme.id}`}
|
||||
text={
|
||||
theme.id === 'System'
|
||||
? t`System`
|
||||
: theme.id === 'Dark'
|
||||
? t`Dark`
|
||||
: t`Light`
|
||||
}
|
||||
onClick={() => setColorScheme(theme.id)}
|
||||
RightIcon={theme.id === colorScheme ? IconCheck : undefined}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user