Skip to content

Commit e223eff

Browse files
committed
added localized helper to wrap the raw string in the LocalizedString type
1 parent 58335eb commit e223eff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

specifyweb/frontend/js_src/lib/components/Preferences/GlobalDefinitions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { preferencesText } from '../../localization/preferences';
22
import { attachmentsText } from '../../localization/attachments';
3+
import { localized } from '../../utils/types';
34
import { definePref } from './types';
45

56
export const FULL_DATE_FORMAT_OPTIONS = [
@@ -48,7 +49,7 @@ export const globalPreferenceDefinitions = {
4849
defaultValue: 'YYYY-MM-DD',
4950
values: FULL_DATE_FORMAT_OPTIONS.map((value) => ({
5051
value,
51-
title: value,
52+
title: localized(value),
5253
})),
5354
}),
5455
monthYearDateFormat: definePref<string>({
@@ -59,7 +60,7 @@ export const globalPreferenceDefinitions = {
5960
defaultValue: 'YYYY-MM',
6061
values: MONTH_YEAR_FORMAT_OPTIONS.map((value) => ({
6162
value,
62-
title: value,
63+
title: localized(value),
6364
})),
6465
}),
6566
},

0 commit comments

Comments
 (0)