mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-15 05:36:11 +01:00
feat: more home page
This commit is contained in:
1 parent
44203223fd
commit
c5f5f69fd6
11 files changed
+60
-10
No files matched your search
@@ -32,9 +32,8 @@ export abstract class AbstractAPI {
|
||||
return await this._strings(locale);
|
||||
}
|
||||
async gameStrings(locale: string, prefix: string) {
|
||||
const supported = this.assertLocale(locale);
|
||||
const blitz = supported.blitz ?? supported.locale;
|
||||
return await this._gameStrings(blitz, prefix);
|
||||
this.assertLocale(locale);
|
||||
return await this._gameStrings(locale, prefix);
|
||||
}
|
||||
|
||||
abstract tank(id: string): Promise<Tank>;
|
||||
|
||||
@@ -14,7 +14,9 @@ if (typeof window !== "undefined") {
|
||||
throw new Error("ServerAPI is being evaluated in the browser");
|
||||
}
|
||||
|
||||
const globbedStrings = import.meta.glob("../../../../i18n/strings/*.json");
|
||||
const globbedStrings = import.meta.glob("../../../../i18n/strings/*.json", {
|
||||
import: "default",
|
||||
});
|
||||
|
||||
interface LocalizationConfig {
|
||||
namespaces: string[];
|
||||
@@ -72,7 +74,7 @@ export class ServerAPI extends AbstractAPI {
|
||||
Object.assign(
|
||||
strings,
|
||||
await fetch(
|
||||
`${remoteStorage.url}/${remoteStorage.relative_path}/${namespace}/${locale}.yaml`
|
||||
`${remoteStorage.url}${remoteStorage.relative_path}/${namespace}/${locale}.yaml`
|
||||
)
|
||||
.then((response) => response.text())
|
||||
.then((text) => {
|
||||
|
||||
Reference in new issue
Block a user