Move foreign translations to external files

This commit is contained in:
redphx
2024-05-22 18:10:53 +07:00
parent a87b26b077
commit c4ad50906e
6 changed files with 308 additions and 3369 deletions

View File

@@ -5,6 +5,8 @@ export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
export const AppInterface = window.AppInterface;
export const NATIVE_FETCH = window.fetch;
UserAgent.init();
const userAgent = window.navigator.userAgent.toLowerCase();

View File

@@ -5,14 +5,12 @@ import { PrefKey, getPref } from "@utils/preferences";
import { RemotePlay } from "@modules/remote-play";
import { StreamBadges } from "@modules/stream/stream-badges";
import { TouchController } from "@modules/touch-controller";
import { STATES } from "@utils/global";
import { NATIVE_FETCH, STATES } from "@utils/global";
import { getPreferredServerRegion } from "@utils/region";
import { GamePassCloudGallery } from "./gamepass-gallery";
import { InputType } from "./bx-exposed";
import { UserAgent } from "./user-agent";
export const NATIVE_FETCH = window.fetch;
enum RequestType {
XCLOUD = 'xcloud',
XHOME = 'xhome',

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
import { PrefKey, getPref, setPref } from "@utils/preferences";
import { AppInterface, SCRIPT_VERSION } from "@utils/global";
import { UserAgent } from "@utils/user-agent";
import { Translations } from "./translation";
/**
* Check for update
@@ -25,6 +26,9 @@ export function checkForUpdate() {
setPref(PrefKey.LATEST_VERSION, json.tag_name.substring(1));
setPref(PrefKey.CURRENT_VERSION, SCRIPT_VERSION);
});
// Update translations
Translations.updateTranslations(true);
}