Skip to content

Commit 35e6a98

Browse files
committed
refactor: simplify code
1 parent e3813ae commit 35e6a98

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/libs/Localize/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function getTranslatedPhrase<TKey extends TranslationPaths>(language: Locale, ph
7575
throw new Error(`Invalid plural form for '${phraseKey}'`);
7676
}
7777

78-
const pluralRule = getPluralRules(language).select(phraseObject.count);
78+
const pluralRule = memoizedCreatePluralRules(language).select(phraseObject.count);
7979

8080
const pluralResult = translateResult[pluralRule];
8181
if (pluralResult) {
@@ -153,10 +153,6 @@ function getPreferredListFormat(): Intl.ListFormat {
153153
return CONJUNCTION_LIST_FORMATS_FOR_LOCALES[IntlStore.getCurrentLocale() ?? CONST.LOCALES.DEFAULT];
154154
}
155155

156-
function getPluralRules(language: Locale): Intl.PluralRules {
157-
return memoizedCreatePluralRules(language);
158-
}
159-
160156
/**
161157
* Format an array into a string with comma and "and" ("a dog, a cat and a chicken")
162158
*/

0 commit comments

Comments
 (0)