Skip to content

Commit 404fb7a

Browse files
lang: USER_LOCALE
1 parent 7a5e82a commit 404fb7a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/ui/shared/ChangesList.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import getRevisionDiffURL from '../../wiki/util/getRevisionDiffURL';
55
import nsId from '../../wiki/util/nsId';
66
import type { ExpandedRevisionData } from '../../api/ExpandedRevisionData';
77
import { ContributionSurveyRevision } from '../../models/ContributionSurveyRevision';
8+
import { USER_LOCALE } from '../../wiki/Locale';
89

910
/**
1011
* @param root0
@@ -94,7 +95,7 @@ export function ChangesListTime(
9495
{ timestamp }: { timestamp: string }
9596
): JSX.Element {
9697
const time = new Date( timestamp );
97-
const formattedTime = time.toLocaleTimeString( window.deputyLang, {
98+
const formattedTime = time.toLocaleTimeString( USER_LOCALE, {
9899
hourCycle: 'h24',
99100
timeStyle: mw.user.options.get( 'date' ) === 'ISO 8601' ? 'long' : 'short'
100101
} );
@@ -118,12 +119,12 @@ export function ChangesListDate(
118119
if ( window.deputy.config.cci.forceUtc.get() ) {
119120
now = now.utc();
120121
}
121-
const formattedTime = time.toLocaleTimeString( window.deputyLang, {
122+
const formattedTime = time.toLocaleTimeString( USER_LOCALE, {
122123
hourCycle: 'h24',
123124
timeStyle: mw.user.options.get( 'date' ) === 'ISO 8601' ? 'long' : 'short',
124125
timeZone: window.deputy?.config.cci.forceUtc.get() ? 'UTC' : undefined
125126
} );
126-
const formattedDate = now.locale( window.deputyLang ).format( {
127+
const formattedDate = now.locale( USER_LOCALE ).format( {
127128
dmy: 'D MMMM YYYY',
128129
mdy: 'MMMM D, Y',
129130
ymd: 'YYYY MMMM D',

0 commit comments

Comments
 (0)