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
@@ -131,7 +131,7 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
const handleSubmit = form.onSubmit(async (values) => {
if (serverLock && Object.keys(serverList).length >= 1) {
toast.error({
message: t('error.serverLockSingleServer', { postProcess: 'sentenceCase' }),
message: t('error.serverLockSingleServer'),
});
return;
}
@@ -140,7 +140,7 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
if (!authFunction) {
return toast.error({
message: t('error.invalidServer', { postProcess: 'sentenceCase' }),
message: t('error.invalidServer'),
});
}
@@ -158,7 +158,7 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
if (!data) {
return toast.error({
message: t('error.authenticationFailed', { postProcess: 'sentenceCase' }),
message: t('error.authenticationFailed'),
});
}
@@ -198,7 +198,7 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
closeAllModals();
toast.success({
message: t('form.addServer.success', { postProcess: 'sentenceCase' }),
message: t('form.addServer.success'),
});
if (localSettings && values.savePassword) {
@@ -207,7 +207,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
toast.error({
message: t('form.addServer.error', {
context: 'savePassword',
postProcess: 'sentenceCase',
}),
});
}
@@ -255,7 +254,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
disabled={serverLock}
label={t('form.addServer.input', {
context: 'name',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('name')}
@@ -264,7 +262,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
disabled={serverLock}
label={t('form.addServer.input', {
context: 'url',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('url')}
@@ -274,11 +271,9 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
disabled={serverLock}
label={t('form.addServer.input', {
context: 'remoteUrl',
postProcess: 'titleCase',
})}
placeholder={t('form.addServer.input', {
context: 'remoteUrlPlaceholder',
postProcess: 'sentenceCase',
})}
{...form.getInputProps('remoteUrl')}
/>
@@ -286,7 +281,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
<Checkbox
label={t('form.addServer.input', {
context: 'preferRemoteUrl',
postProcess: 'titleCase',
})}
{...form.getInputProps('preferRemoteUrl', {
type: 'checkbox',
@@ -296,7 +290,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
<TextInput
label={t('form.addServer.input', {
context: 'username',
postProcess: 'titleCase',
})}
required
{...form.getInputProps('username')}
@@ -304,7 +297,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
<PasswordInput
label={t('form.addServer.input', {
context: 'password',
postProcess: 'titleCase',
})}
{...form.getInputProps('password')}
/>
@@ -312,7 +304,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
<Checkbox
label={t('form.addServer.input', {
context: 'savePassword',
postProcess: 'titleCase',
})}
{...form.getInputProps('savePassword', {
type: 'checkbox',
@@ -324,7 +315,6 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
disabled={serverLock}
label={t('form.addServer.input', {
context: 'legacyAuthentication',
postProcess: 'titleCase',
})}
{...form.getInputProps('legacyAuth', { type: 'checkbox' })}
/>
@@ -333,11 +323,9 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
<Checkbox
description={t('form.addServer.input', {
context: 'preferInstantMixDescription',
postProcess: 'sentenceCase',
})}
label={t('form.addServer.input', {
context: 'preferInstantMix',
postProcess: 'titleCase',
})}
{...form.getInputProps('preferInstantMix', {
type: 'checkbox',
@@ -36,7 +36,7 @@ interface EditServerFormProps {
const ModifiedFieldIndicator = () => {
return (
<Tooltip label={i18n.t('common.modified', { postProcess: 'titleCase' }) as string}>
<Tooltip label={i18n.t('common.modified') as string}>
<Icon color="warn" icon="info" />
</Tooltip>
);
@@ -89,7 +89,7 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
const existingServer = getServerById(server.id);
if (!existingServer) {
return toast.error({
message: t('error.invalidServer', { postProcess: 'sentenceCase' }),
message: t('error.invalidServer'),
});
}
@@ -106,7 +106,7 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
if (!authFunction) {
return toast.error({
message: t('error.invalidServer', { postProcess: 'sentenceCase' }),
message: t('error.invalidServer'),
});
}
@@ -122,7 +122,7 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
if (!data) {
return toast.error({
message: t('error.authenticationFailed', { postProcess: 'sentenceCase' }),
message: t('error.authenticationFailed'),
});
}
@@ -163,7 +163,7 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
updateServer(server.id, serverItem);
toast.success({
message: t('form.updateServer.title', { postProcess: 'sentenceCase' }),
message: t('form.updateServer.title'),
});
// Handle password saving in local settings
@@ -182,7 +182,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
toast.error({
message: t('form.addServer.error', {
context: 'savePassword',
postProcess: 'sentenceCase',
}),
});
}
@@ -208,7 +207,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<TextInput
label={t('form.addServer.input', {
context: 'name',
postProcess: 'titleCase',
})}
required
rightSection={form.isDirty('name') && <ModifiedFieldIndicator />}
@@ -217,7 +215,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<TextInput
label={t('form.addServer.input', {
context: 'url',
postProcess: 'titleCase',
})}
required
rightSection={form.isDirty('url') && <ModifiedFieldIndicator />}
@@ -226,11 +223,9 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<TextInput
label={t('form.addServer.input', {
context: 'remoteUrl',
postProcess: 'titleCase',
})}
placeholder={t('form.addServer.input', {
context: 'remoteUrlPlaceholder',
postProcess: 'sentenceCase',
})}
rightSection={form.isDirty('remoteUrl') && <ModifiedFieldIndicator />}
{...form.getInputProps('remoteUrl')}
@@ -240,7 +235,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<Checkbox
label={t('form.addServer.input', {
context: 'preferRemoteUrl',
postProcess: 'titleCase',
})}
{...form.getInputProps('preferRemoteUrl', {
type: 'checkbox',
@@ -252,7 +246,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<TextInput
label={t('form.addServer.input', {
context: 'username',
postProcess: 'titleCase',
})}
required
rightSection={form.isDirty('username') && <ModifiedFieldIndicator />}
@@ -262,7 +255,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
data-autofocus
label={t('form.addServer.input', {
context: 'password',
postProcess: 'titleCase',
})}
{...form.getInputProps('password')}
/>
@@ -270,7 +262,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<Checkbox
label={t('form.addServer.input', {
context: 'savePassword',
postProcess: 'titleCase',
})}
{...form.getInputProps('savePassword', {
type: 'checkbox',
@@ -281,7 +272,6 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<Checkbox
label={t('form.addServer.input', {
context: 'legacyAuthentication',
postProcess: 'titleCase',
})}
{...form.getInputProps('legacyAuth', {
type: 'checkbox',
@@ -292,11 +282,9 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
<Checkbox
description={t('form.addServer.input', {
context: 'preferInstantMixDescription',
postProcess: 'sentenceCase',
})}
label={t('form.addServer.input', {
context: 'preferInstantMix',
postProcess: 'titleCase',
})}
{...form.getInputProps('preferInstantMix', {
type: 'checkbox',
@@ -39,18 +39,14 @@ export function IgnoreCorsSslSwitches() {
<Group>
<Switch
checked={ignoreCORS === 'true'}
label={t('form.addServer.ignoreCors', {
postProcess: 'sentenceCase',
})}
label={t('form.addServer.ignoreCors')}
onChange={handleUpdateIgnoreCORS}
/>
</Group>
<Group>
<Switch
checked={ignoreSSL === 'true'}
label={t('form.addServer.ignoreSsl', {
postProcess: 'sentenceCase',
})}
label={t('form.addServer.ignoreSsl')}
onChange={handleUpdateIgnoreSSL}
/>
</Group>
@@ -69,19 +69,11 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
<Table layout="fixed" variant="vertical" withTableBorder>
<Table.Tbody>
<Table.Tr>
<Table.Th>
{t('page.manageServers.url', {
postProcess: 'sentenceCase',
})}
</Table.Th>
<Table.Th>{t('page.manageServers.url')}</Table.Th>
<Table.Td>{server.url}</Table.Td>
</Table.Tr>
<Table.Tr>
<Table.Th>
{t('page.manageServers.username', {
postProcess: 'sentenceCase',
})}
</Table.Th>
<Table.Th>{t('page.manageServers.username')}</Table.Th>
<Table.Td>{server.username}</Table.Td>
</Table.Tr>
</Table.Tbody>
@@ -91,12 +83,10 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
leftSection={<Icon icon="edit" />}
onClick={() => handleEdit()}
tooltip={{
label: t('page.manageServers.editServerDetailsTooltip', {
postProcess: 'sentenceCase',
}),
label: t('page.manageServers.editServerDetailsTooltip'),
}}
>
{t('common.edit', { postProcess: 'titleCase' })}
{t('common.edit')}
</Button>
</Group>
</Stack>
@@ -108,7 +98,7 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
timeoutProps={{ callback: handleDeleteServer, duration: 1000 }}
variant="state-error"
>
{t('page.manageServers.removeServer', { postProcess: 'sentenceCase' })}
{t('page.manageServers.removeServer')}
</TimeoutButton>
</Stack>
);
@@ -34,7 +34,7 @@ export const ServerList = () => {
),
},
modal: 'base',
title: t('form.addServer.title', { postProcess: 'titleCase' }),
title: t('form.addServer.title'),
});
};
@@ -79,7 +79,7 @@ export const ServerList = () => {
leftSection={<Icon icon="add" />}
onClick={handleAddServerModal}
>
{t('form.addServer.title', { postProcess: 'titleCase' })}
{t('form.addServer.title')}
</Button>
</Group>
)}