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:
Félix Malfait
2025-08-28 15:12:38 +02:00
committed by GitHub
parent 6eb9a4e024
commit e264d7f32b
24 changed files with 99 additions and 84 deletions
@@ -150,12 +150,14 @@ export class FlatFieldMetadataTypeValidatorService {
];
if (!isDefined(fieldMetadataTypeValidator)) {
const fieldType = flatFieldMetadataToValidate.type;
return [
{
code: FieldMetadataExceptionCode.UNCOVERED_FIELD_METADATA_TYPE_VALIDATION,
message: `Unsupported field metadata type ${flatFieldMetadataToValidate.type}`,
value: flatFieldMetadataToValidate.type,
userFriendlyMessage: t`Unsupported field metadata type ${flatFieldMetadataToValidate.type}`,
message: `Unsupported field metadata type ${fieldType}`,
value: fieldType,
userFriendlyMessage: t`Unsupported field metadata type ${fieldType}`,
},
];
}