Use proper casing for i18n locales (#1998)

This commit is contained in:
Jeff
2026-05-11 19:42:07 -07:00
committed by GitHub
parent e49e488b4c
commit e2a1d813a9
224 changed files with 17323 additions and 18474 deletions
@@ -55,9 +55,10 @@ export const DraggableItems = <K extends string, T extends SortableItem<K>>({
const translatedItemMap = useMemo(
() =>
Object.fromEntries(
itemLabels.map(([key, value]) => [key, t(value, { postProcess: 'sentenceCase' })]),
) as Record<K, string>,
Object.fromEntries(itemLabels.map(([key, value]) => [key, t(value)])) as Record<
K,
string
>,
[itemLabels, t],
);
@@ -78,10 +79,9 @@ export const DraggableItems = <K extends string, T extends SortableItem<K>>({
);
}, []);
const titleText = t(title, { postProcess: 'sentenceCase' });
const titleText = t(title);
const descriptionText = t(description, {
context: 'description',
postProcess: 'sentenceCase',
});
const shouldShow = useMemo(() => {
@@ -114,7 +114,7 @@ export const DraggableItems = <K extends string, T extends SortableItem<K>>({
size="compact-md"
variant="filled"
>
{t('common.save', { postProcess: 'titleCase' })}
{t('common.save')}
</Button>
)}
<Button
@@ -122,7 +122,7 @@ export const DraggableItems = <K extends string, T extends SortableItem<K>>({
size="compact-md"
variant={open ? 'subtle' : 'filled'}
>
{t(open ? 'common.close' : 'common.edit', { postProcess: 'titleCase' })}
{t(open ? 'common.close' : 'common.edit')}
</Button>
</>
}