Skip to content

Commit e4dc39d

Browse files
committed
refactor: shorten localeCompareLocal JSDoc to a single line
1 parent a8234f8 commit e4dc39d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/libs/Localize/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,7 @@ function getDevicePreferredLocale(): Locale {
202202
const COLLATOR_OPTIONS: Intl.CollatorOptions = {usage: 'sort', sensitivity: 'variant', numeric: true, caseFirst: 'upper'};
203203
const localeCompareCache = new Map<string, (a: string, b: string) => number>();
204204

205-
/**
206-
* Locale-aware string comparator for non-React callers (mirrors `translateLocal`). React code should use the
207-
* `localeCompare` returned by `useLocalize` instead.
208-
*/
205+
/** Mirrors `translateLocal` for non-React callers. React code should use `useLocalize().localeCompare`. */
209206
function localeCompareLocal(a: string, b: string): number {
210207
const locale = IntlStore.getCurrentLocale() ?? '';
211208
let compare = localeCompareCache.get(locale);

0 commit comments

Comments
 (0)