[i18n] Indonesian & Hindi addition (#6850)

This commit is contained in:
Lugiad 2025-12-19 03:57:37 +01:00 committed by GitHub
parent a47633a779
commit a6554acfe3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 43 additions and 3 deletions

View File

@ -80,13 +80,13 @@ const fonts: LoadingFontFaceProperty[] = [
face: new FontFace("emerald", "url(./fonts/pokemon-bw.ttf)", {
unicodeRange: rangesByLanguage.japanese,
}),
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl"],
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "id", "hi", "tl"],
},
{
face: new FontFace("pkmnems", "url(./fonts/pokemon-bw.ttf)", {
unicodeRange: rangesByLanguage.japanese,
}),
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl"],
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "id", "hi", "tl"],
},
// devanagari
{
@ -196,6 +196,8 @@ await i18next
"tr",
"ro",
"ru",
"id",
"hi",
"tl",
"nb-NO",
],

View File

@ -82,6 +82,14 @@ export const languageOptions = [
label: "Русский (Needs Help)",
handler: () => changeLocaleHandler("ru"),
},
{
label: "Bahasa Indonesia (Needs Help)",
handler: () => changeLocaleHandler("id"),
},
{
label: "हिन्दी (Needs Help)",
handler: () => changeLocaleHandler("hi"),
},
{
label: "Dansk (Needs Help)",
handler: () => changeLocaleHandler("da"),

View File

@ -250,7 +250,7 @@ export class GameStatsUiHandler extends UiHandler {
const resolvedLang = i18next.resolvedLanguage ?? "en";
// NOTE TO TRANSLATION TEAM: Add more languages that want to display
// in a single-column inside of the `[]` (e.g. `["ru", "fr"]`)
return ["fr", "es-ES", "es-419", "it", "ja", "pt-BR", "ru", "tr"].includes(resolvedLang);
return ["fr", "es-ES", "es-419", "it", "ja", "pt-BR", "ru", "id", "tr"].includes(resolvedLang);
}
/** The number of columns used by this menu in the resolved language */
private get columnCount(): 1 | 2 {

View File

@ -147,6 +147,14 @@ const languageSettings: { [key: string]: LanguageSetting } = {
starterInfoYOffset: 0.5,
starterInfoXPos: 26,
},
id: {
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
hi: {
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
"nb-NO": {
starterInfoTextSize: "56px",
instructionTextSize: "38px",

View File

@ -168,6 +168,14 @@ const languageSettings: { [key: string]: LanguageSetting } = {
starterInfoYOffset: 0.5,
starterInfoXPos: 26,
},
id: {
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
hi: {
starterInfoTextSize: "56px",
instructionTextSize: "38px",
},
tl: {
starterInfoTextSize: "56px",
instructionTextSize: "38px",

View File

@ -105,6 +105,18 @@ export class SettingsDisplayUiHandler extends AbstractSettingsUiHandler {
label: "Русский (Needs Help)",
};
break;
case "id":
this.settings[languageIndex].options[0] = {
value: "Bahasa Indonesia",
label: "Bahasa Indonesia (Needs Help)",
};
break;
case "hi":
this.settings[languageIndex].options[0] = {
value: "हिन्दी",
label: "हिन्दी (Needs Help)",
};
break;
case "da":
this.settings[languageIndex].options[0] = {
value: "Dansk",

View File

@ -413,6 +413,8 @@ export function hasAllLocalizedSprites(lang?: string): boolean {
case "ja":
case "ca":
case "ru":
case "id":
case "hi":
case "tl":
case "nb-NO":
return true;