Closed TheWhiteDog9487 closed 3 weeks ago
Additionally, I'm going to try to see if I can move the fields in the screenshot below from the Java code to a separate JSON per language in the src\main\resources\assets\phases-discord-rich-presence\lang
folder, and then translate them using Text.translatableWithFallback()
in the Java code so that they can also be localized.
But this change would be a big one and I'm not sure if I can do it, so I wanted to ask for your opinion.
If you can do it, that would be cool and would allow for other languages to be supported. I never actually knew this was a problem, so if it's possible to do it, that would be great, but I understand if it ends up not being possible!
If you can do it, that would be cool and would allow for other languages to be supported. I never actually knew this was a problem, so if it's possible to do it, that would be great, but I understand if it ends up not being possible!
OK, I will try my best to see if I can complete it, but I don't know if it will be completed in the end, and how long it will take. Now if you think it's okay, you may merge or close this PR. If I complete this feature in the end, I will open a new pull request separately.
@ThePhaseCat
I have already completed this feature. The changes are huge. I tested it a bit and found no serious problems.
Should I push it directly to Girhub or open a new pull request after you merge it?
In addition, there is a problem I can't solve. If you switch the language in the game after turning on the advanced mode, the default values of the fields that use translations, such as mainAdvancedModeDetail
in the Mod Configuration interface, will not be changed. You must restart the game to change to the modified language. I don't know how to solve this.
Could you make a separate pull request for that?
Could you make a separate pull request for that?
If I push to this branch now, the two commits will be merged into this pull request. So I need to wait for this pull request to be merged, and the next time I open a pull request, there will only be one commit.
Could you make a separate pull request for that?
If you don't want to merge this pull request now, then I need to push it to another branch, and you will need to merge it into the other branch later.
If you give me like 5-6 hours I'll be able to merge this one if you're willing to wait
had time to merge in between classes!
had time to merge in between classes!
Thanks for help!
In the current version, if the Minecraft client is in a non-English language, when not holding any items, it will be misjudged because
client.player.getStackInHand(Hand.MAIN_HAND).getName().getString()
gets the name of the corresponding language instead of the English "Air", which actually displays "Holding Air".Screenshot