Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STR_2386 doesn't show correct month/year in some languages. #2866

Closed
yanleiberg opened this issue Jun 28, 2024 · 14 comments
Closed

STR_2386 doesn't show correct month/year in some languages. #2866

yanleiberg opened this issue Jun 28, 2024 · 14 comments

Comments

@yanleiberg
Copy link
Contributor

yanleiberg commented Jun 28, 2024

For all scenario goal with a guest number requirement and park rating 600 in rct1 and rct2,
it always displays the deadline to " the end of March, Year 1, with a park rating of at least 600“ in Chinese and Japanese

string id: STR_2386

  1. wrong {monthyear} displaying for the scenario goal string (STR_2386) in zh_cn, zh_tw, ja-JP
  2. unnecessary {newline} before number of guest in zh_cn

surprisingly this is correctly displaying in ko-KR.
STR_2387 is correct now in zh_cn, zh_tw, ja-JP, please don't modify it.

How to fix:
I believe we should simply remove the “{POP16}” before {MONTHYEAR} in STR_2386 but I am not sure for that.

I am still new to OpenRCT2 even I love RCT1/2, I would like to contribute if possible.

Here are 2 examples:

---Forest Frontiers---

actual display in game:
在第1年3月末乐园内至少有
250游客,并且乐园评分不低于600

translated from actual display:
To have at least
250 guests in your park at the end of March, Year 1, with a park rating of at least 600

correct display should be:
在第1年10月末乐园内至少有250游客,并且乐园评分不低于600

---Dynamite Dunes---

actual display in game:
在第1年3月末乐园内至少有
650游客,并且乐园评分不低于600

translated from actual display:
To have at least
650 guests in your park at the end of March, Year 1, with a park rating of at least 600

correct display should be:
在第3年10月末乐园内至少有250游客,并且乐园评分不低于600

image
image
image

@mrmagic2020
Copy link
Contributor

Hi yanleiberg, I had a look into the translation file, and indeed for some reason an extra {NEWLINE} is inserted before {COMMA32} (where the actual value gets inserted). Removing the {NEWLINE} solves the issue.

STR_2386 :{BLACK}截止{POP16}{MONTHYEAR},园区内至少有{NEWLINE}{PUSH16}{PUSH16}{COMMA32}游客,并且游乐园评分不低于600

However, I'm not sure what is wrong with the {MONTHYEAR}. To my understanding, {POP16} and {PUSH16} are used when you want to alter the order of the value being passed in to make the translation more natural. Since the token {COMMA32} appears before {MONTHYEAR} in en-GB, here we need to "pop" a token to access the next one, then "push" backwards two times to then fetch the first one.

That being said, the {MONTHYEAR} token in STR_2386 refers to STR_2736:

STR_2736 :第{POP16}{COMMA16}年{PUSH16}{PUSH16}{MONTH}

Where the order of the tokens is again altered. Now the issue has become too complex for me to comprehend 😅 Maybe @Gymnasiast could help on this!

Stuff I have tried
  1. Restoring token order for STR_2386: Everything works fine.
    STR_2386 :{BLACK}园区内至少有{COMMA32}游客,截止{MONTHYEAR},并且游乐园评分不低于600
    image

  2. Restoring token order for STR_2736: The issue persists.
    STR_2736 :{MONTH}第{COMMA16}年
    image

  • Month is March(0), should be October(7)
  • Year is correct.
  1. Restoring token order for both strings: Everything works fine.
    image

@yanleiberg
Copy link
Contributor Author

yanleiberg commented Jun 28, 2024

  1. Restoring token order for STR_2386: Everything works fine.
    STR_2386 :{BLACK}园区内至少有{COMMA32}游客,截止{MONTHYEAR},并且游乐园评分不低于600
    image

This one seems good, however it doesn't read nature in Chinese.
If we must use {COMMA32} first and then {MONTHYEAR} to fix this issue, I would suggest to modify it like this for zh_cn:
STR_2386 :{BLACK}园区内至少有{COMMA32}名游客并且游乐园评分不低于600,截止日期为{MONTHYEAR}末

result will be:
园区内至少有250名游客并且游乐园评分不低于600,截止日期为第1年10月末

  1. Restoring token order for STR_2736: The issue persists.
    STR_2736 :{MONTH}第{COMMA16}年
    image
  • Month is March(0), should be October(7)
  • Year is correct.

This one is wrong indeed.

  1. Restoring token order for both strings: Everything works fine.
    image

This one is partially correct, the month 10 (october) and the year (1 ) is correct, however in Chinese and Japanese, the year should appear before the month, this one is showing month before the year.

@yanleiberg
Copy link
Contributor Author

yanleiberg commented Jun 28, 2024

I am also curious where is the character "末" comes from.
I did a search on zh-CN.txt but I couldn't find it.
This character means "the end" of a month.
This character itself isn't containted by the STR_2386 so I assume it is from {MONTHYEAR}, could this be the cause of this issue?

image

@mrmagic2020
Copy link
Contributor

I am also curious where is the character "末" comes from. I did a search on zh-CN.txt but I couldn't find it. This character means "the end" for a month. This character itself isn't containted by the STR_2386 so I assume it is from {MONTHYEAR}, could this be the cause of this issue?

image

That's because this string has been updated since the last release.
See: https://github.com/OpenRCT2/Localisation/pull/2811/files#diff-5568d548799b97a557080e334d05654ae340853df906921bc3faf05ef7f7b517R1742.

@yanleiberg
Copy link
Contributor Author

Thank you @mrmagic2020

I have test on my side, yes this character "末" is in the STR_2386 in the file zh-CN.txt.

I have tested by changing the line 1742 from
STR_2386 :{BLACK}在{POP16}{MONTHYEAR}末乐园内至少有{NEWLINE}{PUSH16}{PUSH16}{COMMA32}游客,并且乐园评分不低于600
to
STR_2386 :{BLACK}在{POP16}{POP16}{MONTHYEAR}末乐园内至少有{PUSH16}{PUSH16}{PUSH16}{COMMA32}游客,并且乐园评分不低于600
with one more POP16 and PUSH16, it is correctly displaying the {MONTHYEAR} now.
Also tested for zh_cn, zh_tw, ja-JP, all working now. with one extra pair of POP16 and PUSH16. and removing {NEWLINE} in zh-CN
image
image

@yanleiberg
Copy link
Contributor Author

yanleiberg commented Jun 28, 2024

I still don't know the cause of this issue, but it works now on my openrct2 😄

@yanleiberg
Copy link
Contributor Author

I would like to do a pull request for this fix, which repo should I fork?
https://github.com/OpenRCT2/OpenRCT2
or
https://github.com/OpenRCT2/Localisation

@yanleiberg
Copy link
Contributor Author

yanleiberg commented Jun 28, 2024

That's because this string has been updated since the last release. See: https://github.com/OpenRCT2/Localisation/pull/2811/files#diff-5568d548799b97a557080e334d05654ae340853df906921bc3faf05ef7f7b517R1742.

Why I cannot see this change in the master branch of https://github.com/OpenRCT2/Localisation/blob/master/data/language/zh-CN.txt?

yanleiberg added a commit to yanleiberg/Localisation that referenced this issue Jun 28, 2024
fix for OpenRCT2#2866
wrong MONTHYEAR in the goal description for ja-JP.
@AaronVanGeffen
Copy link
Member

Why I cannot see this change in the master branch

The master branch reflects the latest release. You'll want to look at the develop branch instead, i.e. https://github.com/OpenRCT2/Localisation/blob/develop/data/language/zh-CN.txt

yanleiberg added a commit to yanleiberg/Localisation that referenced this issue Jun 28, 2024
fix for OpenRCT2#2866
wrong MONTHYEAR in the goal description for zh-TW
yanleiberg added a commit to yanleiberg/Localisation that referenced this issue Jun 28, 2024
fix for OpenRCT2#2866
- wrong MONTHYEAR in the goal description for zh-CN
- remove {NEWLINE} for better layout
- add "底" (meaning "the end of" a month) to STR_2386 and STR_2387 to avoid confusions meaning.
@yanleiberg
Copy link
Contributor Author

yanleiberg commented Jun 28, 2024

oh I got it, the PR 2811 on May-16 is the one without the character "末", and the last release I have on my local was build on May-5 with it.
Actualy by removing the character "末",this will leads to an ambiguity of whether the goal date is due on the beginning or the end of a month. I recommend to add it back.
By minimizing the change and for better reading, "底" is better in this context for zh_CN as in PR2811, the pre-text of {MONTHYEAR} is changed from "在" to "截至".

PR created.

@telk5093
Copy link
Contributor

surprisingly this is correctly displaying in ko-KR.

Yeah, Korean translation did not change the order of {COMMA32} AND {MONTHYEAR} to avoid this.

@yanleiberg
Copy link
Contributor Author

The master branch reflects the latest release. You'll want to look at the develop branch instead, i.e. https://github.com/OpenRCT2/Localisation/blob/develop/data/language/zh-CN.txt

I got 404 with your link.
image

@mrmagic2020
Copy link
Contributor

The master branch reflects the latest release. You'll want to look at the develop branch instead, i.e. https://github.com/OpenRCT2/Localisation/blob/develop/data/language/zh-CN.txt

I got 404 with your link. image

Should be this one: https://github.com/OpenRCT2/OpenRCT2/blob/develop/data/language/zh-CN.txt

@Gymnasiast
Copy link
Member

Thank you for finding and fixing this! The root of the problem is that our translation system is rather limited and still employs pushing and popping items from a stack, rather than allowing to specify an order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants