Overwrite standard translations (#11134)

Manage overwriting translations for standard fields and standard objects
properties
This commit is contained in:
Félix Malfait
2025-03-25 22:17:29 +01:00
committed by GitHub
parent 7a7003d859
commit 6ec06be18d
13 changed files with 1809 additions and 122 deletions

View File

@ -9,10 +9,10 @@ import { Select } from '@/ui/input/components/Select';
import { useRefreshObjectMetadataItems } from '@/object-metadata/hooks/useRefreshObjectMetadataItem';
import { useLingui } from '@lingui/react/macro';
import { dynamicActivate } from '~/utils/i18n/dynamicActivate';
import { logError } from '~/utils/logError';
import { APP_LOCALES } from 'twenty-shared/translations';
import { isDefined } from 'twenty-shared/utils';
import { dynamicActivate } from '~/utils/i18n/dynamicActivate';
import { logError } from '~/utils/logError';
const StyledContainer = styled.div`
display: flex;
@ -62,7 +62,7 @@ export const LocalePicker = () => {
await refreshObjectMetadataItems();
};
const localeOptions: Array<{
const unsortedLocaleOptions: Array<{
label: string;
value: (typeof APP_LOCALES)[keyof typeof APP_LOCALES];
}> = [
@ -187,13 +187,18 @@ export const LocalePicker = () => {
value: APP_LOCALES['vi-VN'],
},
];
if (isDebugMode) {
localeOptions.push({
unsortedLocaleOptions.push({
label: t`Pseudo-English`,
value: APP_LOCALES['pseudo-en'],
});
}
const localeOptions = [...unsortedLocaleOptions].sort((a, b) =>
a.label.localeCompare(b.label),
);
return (
<StyledContainer>
<Select