Fixed img loading issue with summary_tabs_2 for fr, pt_BR and zh_CN

pull/918/head
rnicar 2024-05-15 21:00:26 +02:00
parent 872c53437c
commit 66bbee2440
18 changed files with 15 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

View File

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

View File

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

View File

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

View File

@ -115,7 +115,7 @@ export class LoadingScene extends SceneBase {
for (let t = 1; t <= 3; t++){
this.loadImage(`summary_tabs_${t}`, 'ui');
}
i18next.languages.forEach(lang => {
(i18next.options.supportedLngs as Array<any>).forEach(lang => {
if(Utils.verifyLang(lang)){
this.loadImage(`starter_select_bg_${lang}`, 'ui');
this.loadImage(`summary_bg_${lang}`, 'ui');
@ -206,7 +206,7 @@ export class LoadingScene extends SceneBase {
this.loadAtlas('pb', '');
this.loadAtlas('items', '');
this.loadAtlas('types', '');
i18next.languages.forEach(lang => {
(i18next.options.supportedLngs as Array<any>).forEach(lang => {
if(Utils.verifyLang(lang)){
this.loadAtlas(`types_${lang}`, '');
}

View File

@ -0,0 +1,12 @@
In case a new lang is added, it should be added to the function verifyLang of Utils as well, but only after
adding all the necessary lang images:
- starter_select_bg_LANGNAME
- summary_bg_LANGNAME
- summary_moves_LANGNAME
- summary_moves_effect_LANGNAME
- summary_profile_LANGNAME
- summary_stats_LANGNAME
- summary_tabs_1_LANGNAME
- summary_tabs_2_LANGNAME
- summary_tabs_3_LANGNAME
These images should be added to the legacy folder as well

View File

@ -804,7 +804,7 @@ export default class SummaryUiHandler extends UiHandler {
stats.forEach((stat, s) => {
const statName = stat !== Stat.HP
? getStatName(stat)
: 'HP';
: i18next.t('pokemonStat:HP');
const rowIndex = s % 3;
const colIndex = Math.floor(s / 3);