MahjongRepository / mahjong

Implementation of riichi mahjong related stuff (hand cost, shanten, agari end, etc.)
MIT License
377 stars 38 forks source link

Fixed bugs related to yakuhai chun & kokushi ignoring tenhou + english names for yaku #5

Closed Enerccio closed 5 years ago

Nihisil commented 5 years ago

@Enerccio Thank you for the contribution! A good catch with kokushi and tenhou/chihou. Do you mind to add a unit test that will check that behavior?

Regarding English names. I think we can implement there another way. Something like https://docs.python.org/3/library/gettext.html

We can create a folder locale and put there en.po and default.po. Also, add an attribute to library settings with the locale name. It will allow to have a more flexible approach and later we can add more supported languages.

Let me know if you want to do that, or I can process on it.

Enerccio commented 5 years ago

I can look into making the unittest. For localization, personally, I would want both language variants (at least for my uses - I am displaying it as japanese/english in my game).

Nihisil commented 5 years ago

Got it. We can postpone localization since it is only two variants now. I will wait for unit test and after that PR will be merged :)

Enerccio commented 5 years ago

Done :)

Nihisil commented 5 years ago

Thank you for the contribution!