-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Added translations #153
base: master
Are you sure you want to change the base?
Added translations #153
Conversation
I would like to use Config values are introduced like in the image in #120. You can seperate PR's so its easier for you to implemented, I would first begin to just use the client-side translations. You then can move on to server-side, I would also consider a better approche then reading hashmap's everytime, Im considering caching translations depending if they are loaded by players |
Added all the suggestions :> |
I think caching could be left to a config value that would be turned on automatically if the server has used it in the last 5 times it started. What would you recommend for caching? |
…nslation-patch into asodugf12/issue120
…nslation-patch into asodugf12/issue120
Finally fixed cargo fmt file diff error haizzz |
this is still not the solution i wanted, Im sorry but implementing the language system i want, im pretty sure, is more complex than you think. I would like to do it myself. We have to put all languages from Minecraft into the server and copy then over. Not only provide one single path |
I am still unsure what solution you are thinking of, but I'm okay with you finishing the rest. I'll find some more issues to work on in the meantime. Thanks for guiding me, Alex :> |
Actually you know what, I still want to see this through the end. So if it's possible to make a detailed diagram of what functionality is needed and goes where, I'd love to work on this further |
My Plan.
I would prefer if you first add the ability to use client-side translations if they are on, otherwise or if translations are off just use default en_us, Im still not 100% about copying every Minecraft translation into Pumpkin. But you can start with this |
Some questions that I am having right now:
|
|
I think the main translation logic is complete? |
Pumpkin does target only the newest Minecraft version, Which is currently 1.21.3 |
Sure then, I'll do that and finish up the pr |
…nslation-patch into asodugf12/issue120
added en_us lang files up until 1.17, will finish the rest later |
Okay, I have discovered that for versions from 1.12.2 back, minecraft uses a different format for en_us files, which would require a different parser. I'll work on it maybe tomorrow :D |
We only support the latest Minecraft version |
Oh, so that means this PR is complete? |
Please remove all those langauge files from all other versions than 1.21.3. We only need one translation file for the latest Minecraft version |
…nslation-patch into asodugf12/issue120
Alright, please list anything else that needs to be finished in this PR, because I feel like it's been lingering for too long now :D |
Finished with the suggestions :D |
Hello, any comment on the fixes? @Snowiiii |
You should use serde_json to read the JSON translation file. You can fully remove the manuel reading and parsing from the file. And also rename the static variable from |
I am using serde_json, the current implementation just reads it line by line and turn each one into a json object, thus avoids having to read the whole file into memory, since it is one big json object. |
Or actually, do we cache read it once and cache it into memory? If so do you have any suggestions? |
Translations. Checked against minecraft translation files