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
@@ -22,20 +22,15 @@ export const AnalyticsSettings = memo(() => {
{
control: (
<Switch
aria-label={t('setting.analyticsEnable', { postProcess: 'sentenceCase' })}
aria-label={t('setting.analyticsEnable')}
defaultChecked={localStorage.getItem('umami.disabled') !== '1'}
onChange={(e) => handleSetSendAnalytics(e.currentTarget.checked)}
/>
),
description: t('setting.analyticsEnable_description', { postProcess: 'sentenceCase' }),
title: t('setting.analyticsEnable', { postProcess: 'sentenceCase' }),
description: t('setting.analyticsEnable_description'),
title: t('setting.analyticsEnable'),
},
];
return (
<SettingsSection
options={analyticsOptions}
title={t('page.setting.analytics', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={analyticsOptions} title={t('page.setting.analytics')} />;
});
@@ -31,9 +31,7 @@ export const ExportImportSettings = memo(() => {
openModal({
children: <ExportImportSettingsModal />,
size: 'lg',
title: t('setting.exportImportSettings_importModalTitle', {
postProcess: 'sentenceCase',
}),
title: t('setting.exportImportSettings_importModalTitle'),
});
};
@@ -42,30 +40,17 @@ export const ExportImportSettings = memo(() => {
control: (
<>
<Button onClick={onExportSettings} size="compact-sm">
{t('setting.exportImportSettings_control_exportText', {
postProcess: 'sentenceCase',
})}
{t('setting.exportImportSettings_control_exportText')}
</Button>
<Button onClick={openImportModal} size="compact-sm">
{t('setting.exportImportSettings_control_importText', {
postProcess: 'sentenceCase',
})}
{t('setting.exportImportSettings_control_importText')}
</Button>
</>
),
description: t('setting.exportImportSettings_control_description', {
postProcess: 'sentenceCase',
}),
title: t('setting.exportImportSettings_control_title', {
postProcess: 'sentenceCase',
}),
description: t('setting.exportImportSettings_control_description'),
title: t('setting.exportImportSettings_control_title'),
},
];
return (
<SettingsSection
options={options}
title={t('page.setting.exportImport', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={options} title={t('page.setting.exportImport')} />;
});
@@ -41,28 +41,24 @@ export const LoggerSettings = memo(() => {
{
label: t('setting.logLevel', {
context: 'optionDebug',
postProcess: 'titleCase',
}),
value: 'debug',
},
{
label: t('setting.logLevel', {
context: 'optionInfo',
postProcess: 'titleCase',
}),
value: 'info',
},
{
label: t('setting.logLevel', {
context: 'optionWarn',
postProcess: 'titleCase',
}),
value: 'warn',
},
{
label: t('setting.logLevel', {
context: 'optionError',
postProcess: 'titleCase',
}),
value: 'error',
},
@@ -73,16 +69,10 @@ export const LoggerSettings = memo(() => {
),
description: t('setting.logLevel', {
context: 'description',
postProcess: 'sentenceCase',
}),
title: t('setting.logLevel', { postProcess: 'sentenceCase' }),
title: t('setting.logLevel'),
},
];
return (
<SettingsSection
options={loggerOptions}
title={t('page.setting.logger', { postProcess: 'sentenceCase' })}
/>
);
return <SettingsSection options={loggerOptions} title={t('page.setting.logger')} />;
});
@@ -53,10 +53,9 @@ export const StylesSettings = memo(() => {
}
description={t('setting.customCssEnable', {
context: 'description',
postProcess: 'sentenceCase',
})}
note={t('setting.customCssNotice', { postProcess: 'sentenceCase' })}
title={t('setting.customCssEnable', { postProcess: 'sentenceCase' })}
note={t('setting.customCssNotice')}
title={t('setting.customCssEnable')}
/>
{enabled && (
<>
@@ -70,7 +69,7 @@ export const StylesSettings = memo(() => {
// disabled={isSaveButtonDisabled}
variant="filled"
>
{t('common.save', { postProcess: 'titleCase' })}
{t('common.save')}
</Button>
)}
<Button
@@ -78,17 +77,14 @@ export const StylesSettings = memo(() => {
size="compact-md"
variant="filled"
>
{t(open ? 'common.close' : 'common.edit', {
postProcess: 'titleCase',
})}
{t(open ? 'common.close' : 'common.edit', {})}
</Button>
</>
}
description={t('setting.customCss', {
context: 'description',
postProcess: 'sentenceCase',
})}
title={t('setting.customCss', { postProcess: 'sentenceCase' })}
title={t('setting.customCss')}
/>
{open && (
<>
@@ -100,7 +96,7 @@ export const StylesSettings = memo(() => {
setCss(sanitizeCss(`<style>${e.currentTarget.value}`))
}
/>
<Text>{t('common.preview', { postProcess: 'sentenceCase' })}: </Text>
<Text>{t('common.preview')}: </Text>
<Code block>{css}</Code>
</>
)}