Settings: Fix language error (#5798)

This commit is contained in:
zubiden 2025-04-04 16:38:41 +02:00 committed by Alexander Zinchuk
parent 1792f2abb8
commit 9b72978373
2 changed files with 3 additions and 3 deletions

View File

@ -312,9 +312,9 @@ function createTranslationFn(): LangFn {
}
return processTranslation(key, variables as Record<string, string | number>, options);
}) as LangFn;
fn.code = language?.langCode || FORMATTERS_FALLBACK_LANG;
fn.rawCode = language?.langCode || FORMATTERS_FALLBACK_LANG;
fn.isRtl = language?.isRtl;
fn.pluralCode = language?.pluralCode || FORMATTERS_FALLBACK_LANG;
fn.code = language?.pluralCode || FORMATTERS_FALLBACK_LANG;
fn.with = (({ key, variables, options }: LangFnParameters) => {
if (options && areAdvancedLangFnOptions(options)) {
return processTranslationAdvanced(key, variables as Record<string, TeactNode | undefined>, options);

View File

@ -157,8 +157,8 @@ export type LangFn = {
number: (value: number) => string;
internalFormatters: LangFormatters;
isRtl?: boolean;
rawCode: string;
code: string;
pluralCode: string;
languageInfo: ApiLanguage;
};