convert EN localization to use proper casing, remove postprocessing from renderer

This commit is contained in:
jeffvli
2026-04-29 13:37:57 -07:00
parent bc7ef0624b
commit 4424e9ae33
193 changed files with 2267 additions and 3399 deletions
@@ -42,9 +42,7 @@ export const CreateRadioStationForm = ({ onCancel }: CreateRadioStationFormProps
onError: (error) => {
toast.error({
message: (error as Error).message,
title: t('error.genericError', {
postProcess: 'sentenceCase',
}) as string,
title: t('error.genericError') as string,
});
},
onSuccess: () => {
@@ -60,7 +58,6 @@ export const CreateRadioStationForm = ({ onCancel }: CreateRadioStationFormProps
<TextInput
label={t('form.createRadioStation.input', {
context: 'name',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('name')}
@@ -68,7 +65,6 @@ export const CreateRadioStationForm = ({ onCancel }: CreateRadioStationFormProps
<TextInput
label={t('form.createRadioStation.input', {
context: 'streamUrl',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('streamUrl')}
@@ -76,16 +72,15 @@ export const CreateRadioStationForm = ({ onCancel }: CreateRadioStationFormProps
<TextInput
label={t('form.createRadioStation.input', {
context: 'homepageUrl',
postProcess: 'titleCase',
})}
{...form.getInputProps('homepageUrl')}
/>
<Group justify="flex-end">
<ModalButton onClick={onCancel} variant="subtle">
{t('common.cancel', { postProcess: 'sentenceCase' })}
{t('common.cancel')}
</ModalButton>
<ModalButton loading={mutation.isPending} type="submit" variant="filled">
{t('common.create', { postProcess: 'sentenceCase' })}
{t('common.create')}
</ModalButton>
</Group>
</Stack>
@@ -101,13 +96,13 @@ export const openCreateRadioStationModal = (
if (!server) {
toast.error({
message: t('common.error.noServer', { postProcess: 'sentenceCase' }) as string,
message: t('common.error.noServer') as string,
});
return;
}
openModal({
children: <CreateRadioStationForm onCancel={closeAllModals} />,
title: t('action.createRadioStation', { postProcess: 'titleCase' }) as string,
title: t('action.createRadioStation') as string,
});
};
@@ -104,9 +104,7 @@ export const EditRadioStationForm = ({ onCancel, station }: EditRadioStationForm
}
toast.success({
message: t('form.editRadioStation.success', {
postProcess: 'sentenceCase',
}) as string,
message: t('form.editRadioStation.success') as string,
});
closeAllModals();
} catch (err: unknown) {
@@ -116,7 +114,7 @@ export const EditRadioStationForm = ({ onCancel, station }: EditRadioStationForm
toast.error({
message: (err as Error)?.message,
title: t('error.genericError', { postProcess: 'sentenceCase' }) as string,
title: t('error.genericError') as string,
});
} finally {
setIsSaving(false);
@@ -132,7 +130,6 @@ export const EditRadioStationForm = ({ onCancel, station }: EditRadioStationForm
key="name"
label={t('form.createRadioStation.input', {
context: 'name',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('name')}
@@ -141,7 +138,6 @@ export const EditRadioStationForm = ({ onCancel, station }: EditRadioStationForm
key="streamUrl"
label={t('form.createRadioStation.input', {
context: 'streamUrl',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('streamUrl')}
@@ -150,7 +146,6 @@ export const EditRadioStationForm = ({ onCancel, station }: EditRadioStationForm
key="homepageUrl"
label={t('form.createRadioStation.input', {
context: 'homepageUrl',
postProcess: 'titleCase',
})}
{...form.getInputProps('homepageUrl')}
/>,
@@ -329,7 +324,7 @@ export const openEditRadioStationModal = (
if (!server) {
toast.error({
message: t('common.error.noServer', { postProcess: 'sentenceCase' }) as string,
message: t('common.error.noServer') as string,
});
return;
}
@@ -339,6 +334,6 @@ export const openEditRadioStationModal = (
openModal({
children: <EditRadioStationForm onCancel={closeAllModals} station={station} />,
size: hasImageUpload ? 'lg' : 'md',
title: t('common.edit', { postProcess: 'titleCase' }) as string,
title: t('common.edit') as string,
});
};
@@ -38,7 +38,7 @@ export const RadioListHeaderFilters = () => {
{permissions.radio.create && (
<Group gap="sm" wrap="nowrap">
<Button onClick={handleCreateRadioStationModal} variant="subtle">
{t('action.createRadioStation', { postProcess: 'sentenceCase' })}
{t('action.createRadioStation')}
</Button>
</Group>
)}
@@ -17,7 +17,7 @@ export const RadioListHeader = ({ title }: RadioListHeaderProps) => {
const { t } = useTranslation();
const { itemCount } = useListContext();
const pageTitle = title || t('page.radioList.title', { postProcess: 'titleCase' });
const pageTitle = title || t('page.radioList.title');
return (
<Stack gap={0}>
@@ -70,8 +70,8 @@ const RadioListItem = ({ station }: RadioListItemProps) => {
children: (
<ConfirmModal
labels={{
cancel: t('common.cancel', { postProcess: 'sentenceCase' }),
confirm: t('common.delete', { postProcess: 'sentenceCase' }),
cancel: t('common.cancel'),
confirm: t('common.delete'),
}}
loading={deleteRadioStationMutation.isPending}
onConfirm={async () => {
@@ -88,19 +88,17 @@ const RadioListItem = ({ station }: RadioListItemProps) => {
} catch (err: any) {
toast.error({
message: err.message,
title: t('error.genericError', {
postProcess: 'sentenceCase',
}),
title: t('error.genericError'),
});
}
closeAllModals();
}}
>
<Text>{t('common.areYouSure', { postProcess: 'sentenceCase' })}</Text>
<Text>{t('common.areYouSure')}</Text>
</ConfirmModal>
),
title: t('common.delete', { postProcess: 'titleCase' }),
title: t('common.delete'),
});
},
[deleteRadioStationMutation, isCurrentStation, server, station.id, stop, t],
@@ -152,7 +150,7 @@ const RadioListItem = ({ station }: RadioListItemProps) => {
onClick={handleEditClick}
size="sm"
tooltip={{
label: t('common.edit', { postProcess: 'sentenceCase' }),
label: t('common.edit'),
}}
variant="subtle"
/>
@@ -164,7 +162,7 @@ const RadioListItem = ({ station }: RadioListItemProps) => {
onClick={handleDeleteClick}
size="sm"
tooltip={{
label: t('common.delete', { postProcess: 'sentenceCase' }),
label: t('common.delete'),
}}
variant="subtle"
/>