mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: update bot chunk 4
This commit is contained in:
1 parent
5499cb5cca
commit
98724df711
11 files changed
+122
-91
No files matched your search
@@ -1,8 +1,10 @@
|
||||
import { assertSecret } from '@blitzkit/core';
|
||||
import { DEFAULT_LOCALE, localizedStrings } from '@blitzkit/i18n';
|
||||
import { DEFAULT_LOCALE, STRINGS, type SupportedLocale } from '@blitzkit/i18n';
|
||||
|
||||
export function resolveBranchName(locale: string = DEFAULT_LOCALE) {
|
||||
const strings = localizedStrings[locale];
|
||||
if (!(locale in STRINGS)) throw new Error(`Unsupported locale: ${locale}`);
|
||||
|
||||
const strings = STRINGS[locale as SupportedLocale];
|
||||
const secret = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
||||
|
||||
if (
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { DEFAULT_LOCALE, localizedStrings } from '@blitzkit/i18n';
|
||||
import { DEFAULT_LOCALE, STRINGS, type SupportedLocale } from '@blitzkit/i18n';
|
||||
|
||||
export function getStrings(locale: string = DEFAULT_LOCALE) {
|
||||
return localizedStrings[locale];
|
||||
if (locale in STRINGS) return STRINGS[locale as SupportedLocale];
|
||||
throw new Error(`Unsupported locale: ${locale}`);
|
||||
}
|
||||
Reference in new issue
Block a user