UNPKG

pogo-data-generator

Version:
65 lines (64 loc) 2.75 kB
import type { AllForms, AllInvasions, AllPokemon, AllQuests, FinalResult, TranslationKeys } from '../typings/dataTypes'; import type { EvolutionQuest } from '../typings/general'; import type { Locales, Options } from '../typings/inputs'; import Masterfile from './Masterfile'; export default class Translations extends Masterfile { static readonly DEFAULT_APK_URL = "https://raw.githubusercontent.com/sora10pls/holoholo-text/refs/heads/main/Release/English/en-us_raw.json"; static readonly DEFAULT_REMOTE_URL = "https://raw.githubusercontent.com/sora10pls/holoholo-text/refs/heads/main/Remote/English/en-us_formatted.txt"; options: Options; translationApkUrl: string; translationRemoteUrl: string; translationPatchUrl: string; rawTranslations: TranslationKeys; manualTranslations: { [key: string]: TranslationKeys; }; parsedTranslations: { [key: string]: TranslationKeys; }; codes: { [key in Locales[number]]: { name: string; code: string; }; }; masterfile: FinalResult; generics: { [key: string]: { [key: string]: string; }; }; reference: TranslationKeys; enFallback: TranslationKeys; collator: Intl.Collator; constructor(options: Options, translationApkUrl?: string, translationRemoteUrl?: string, translationPatchUrl?: string); set fromApk(values: TranslationKeys); removeEscapes(str: string): string; fetchGzipJson(url: string): Promise<any>; static localizePatchUrl(url: string, localeCode: string): string; applyPatchTranslations(locale: Locales[number], localeCode: string): Promise<void>; resolveReferences(locale: Locales[number]): void; fetchTranslations(locale: Locales[number], availableManualTranslations: string[]): Promise<void>; mergeManualTranslations(locale: string): void; languageRef(locale: string): void; mergeCategories(locale: string): void; translateMasterfile(data: FinalResult, locale: string, formsSeparate: boolean): void; pokemon(locale: string, subItems: { [id: string]: boolean; }, pokemon: AllPokemon, forms: AllForms, unsetFormName?: string): void; pokemonCategories(locale: string): void; bonuses(locale: string): void; moves(locale: string): void; items(locale: string): void; types(locale: string): void; characters(locale: string, parsedInvasions: AllInvasions): void; gruntQuotes(locale: string): void; weather(locale: string): void; misc(locale: string): void; quests(locale: string, data: { [category: string]: AllQuests; }): void; parseEvoQuests(locale: string, evoQuests: { [id: string]: EvolutionQuest; }): void; }