mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
fix: [Oo] for /stats
This commit is contained in:
1 parent
884b6d4318
commit
5201350e44
2 files changed
+6
-5
No files matched your search
@@ -8,12 +8,12 @@ export async function filtersToDescription(
|
||||
{ nation, tier, type, class: tankClass, tank }: StatFilters,
|
||||
locale: Locale,
|
||||
) {
|
||||
const { strings } = translator(locale);
|
||||
const { strings, bkLocale } = translator(locale);
|
||||
const awaitedTankDefinitions = await fetchTankDefinitions();
|
||||
const info: string[] = [];
|
||||
|
||||
// TODO: somehow localize tank names?
|
||||
if (tank) return awaitedTankDefinitions.tanks[tank].name;
|
||||
if (tank) return awaitedTankDefinitions.tanks[tank].name.locales[bkLocale];
|
||||
if (nation)
|
||||
info.push((strings.common.nations as Record<string, string>)[nation]);
|
||||
if (tier) {
|
||||
|
||||
@@ -12,8 +12,9 @@ export function translator(localeRaw: Locale) {
|
||||
SUPPORTED_LOCALES_DISCORD.includes(localeRaw)
|
||||
? localeRaw
|
||||
: DEFAULT_LOCALE_DISCORD;
|
||||
const strings = STRINGS[SUPPORTED_LOCALES_DISCORD_MAP_INVERSE[locale]];
|
||||
const unwrap = unwrapper(SUPPORTED_LOCALES_DISCORD_MAP_INVERSE[locale]);
|
||||
const bkLocale = SUPPORTED_LOCALES_DISCORD_MAP_INVERSE[locale];
|
||||
const strings = STRINGS[bkLocale];
|
||||
const unwrap = unwrapper(bkLocale);
|
||||
|
||||
return { locale, strings, unwrap };
|
||||
return { locale, strings, unwrap, bkLocale };
|
||||
}
|
||||
Reference in new issue
Block a user