mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-01-04 16:07:19 +03:00
75f2ad66ed
- added `zh-cn` locale - added `server` field to `config.yaml` file that indicates currently using game server - `global` or `cn` its default value is based on the system language - `constants.paths.gameDataDir` returns path based on `server` config property - `constants.placeholders.uppercase.full` was changed to an object: + global: <global game name> + cn: <cn game name> - in `constants.uri.*` changed second fields: + api + telemetry they're following the same format as `full` placeholder - `constants.versionsUri()` and `constants.backgroundUri()` are functions now their output depends on server you're passing as a parameter - added `Game.server` field (global / cn) - `PatchInfo` type now contains `server` field - `Patch.getPatchInfo()` also depends on `Game.server` value - reworked `Background.get()` method to support cn game api
22 lines
731 B
TypeScript
22 lines
731 B
TypeScript
import { register, init } from 'svelte-i18n';
|
|
|
|
import Locales from './ts/launcher/Locales';
|
|
|
|
register('en-us', () => Locales.get('en-us'));
|
|
register('ru-ru', () => Locales.get('ru-ru'));
|
|
register('es-es', () => Locales.get('es-es'));
|
|
register('de-de', () => Locales.get('de-de'));
|
|
register('fr-fr', () => Locales.get('fr-fr'));
|
|
register('it-it', () => Locales.get('it-it'));
|
|
register('hu-hu', () => Locales.get('hu-hu'));
|
|
register('id-id', () => Locales.get('id-id'));
|
|
register('nb-no', () => Locales.get('nb-no'));
|
|
register('zh-cn', () => Locales.get('zh-cn'));
|
|
register('uwu', () => Locales.get('uwu'));
|
|
|
|
Locales.default().then((locale) => {
|
|
init({
|
|
fallbackLocale: 'en-us',
|
|
initialLocale: locale,
|
|
});
|
|
});
|