HearthSim / HSTracker

A deck tracker and deck manager for Hearthstone on macOS
https://hsreplay.net/downloads/
MIT License
1.17k stars 177 forks source link

BgSessions placement text's translation is incorrect #1271

Closed kshired closed 2 years ago

kshired commented 2 years ago

Describe the bug When I set HSTracker's language to korean, BgSessions recap shows incorrect format for placement text. In korean, ordinal format is not used for placement. ( It has to show not "n번째" but "n등" )

It's not a bug, but it seems to be changed. So, my sugesstion is how about using Localization instead of NumberFormatter at https://github.com/HearthSim/HSTracker/blob/37fb5e922ac7168557c658c16702d8d017bf521a/HSTracker/UIs/Battlegrounds/BattlegroundsGameView.swift#L173-L175

p.s) HDT shows correct format for placement text.

To Reproduce Steps to reproduce the behavior:

  1. Just play BG and see placement text in korean.

Game mode

Expected behavior Shows correct format of the placement text.

Screenshots 스크린샷 2022-06-22 오전 2 18 31

Version (please complete the following information): 2.1.8

fmoraes74 commented 2 years ago

Is the screenshot showing what happens today or what is the correct way? I chose to use the NumberFormatter as I thought Apple would have done the translation properly. I can certainly switch to Localization like HDT did but just want to confirm exactly the difference as I don't know the subtleties here.

kshired commented 2 years ago

@fmoraes74 In screenshot shows, "3번째" but it has to be "3등".

번째 is used for ordinal number like english’s ( "st", "nd", "rd", "th" ), but korean’s ordinal number is not used for plcement. Just use "등" ( it means placement ).

kshired commented 2 years ago

@fmoraes74 Oh I was mistaken, there's no BgSessions recap localization in HDT now.

But still this issue seems to be fixed.

fmoraes74 commented 2 years ago

Can you work on a fix? You can see the HDT localization here:

https://github.com/HearthSim/HDT-Localization/blob/master/Strings.resx#L3963

kshired commented 2 years ago

@fmoraes74 Ok Im gonna do that.

fmoraes74 commented 2 years ago

@kshired are you still going to do it? If not I will try to do it tomorrow.

kshired commented 2 years ago

@fmoraes74 Sorry I think I will not be able to resolve this issue in near days.. I'm swamped right now.

fmoraes74 commented 2 years ago

@kshired This will be the strings used:

"Battlegrounds_Game_Ordinal_1" = "1st";
"Battlegrounds_Game_Ordinal_2" = "2nd";
"Battlegrounds_Game_Ordinal_3" = "3rd";
"Battlegrounds_Game_Ordinal_4" = "4th";
"Battlegrounds_Game_Ordinal_5" = "5th";
"Battlegrounds_Game_Ordinal_6" = "6th";
"Battlegrounds_Game_Ordinal_7" = "7th";
"Battlegrounds_Game_Ordinal_8" = "8th";

I just need to test it out

kshired commented 2 years ago

@fmoraes74

"Battlegrounds_Game_Ordinal_1" = "1등";
"Battlegrounds_Game_Ordinal_2" = "2등";
"Battlegrounds_Game_Ordinal_3" = "3등";
"Battlegrounds_Game_Ordinal_4" = "4등";
"Battlegrounds_Game_Ordinal_5" = "5등";
"Battlegrounds_Game_Ordinal_6" = "6등";
"Battlegrounds_Game_Ordinal_7" = "7등";
"Battlegrounds_Game_Ordinal_8" = "8등";

U can use this translation for testing.

fmoraes74 commented 2 years ago

@kshired I have made the change and tested in English. There is patch today, so I will make a new release later once HDT is done