TheHamester / HitIndicator

Minecraft mod that adds hit indicators.
Creative Commons Attribution Share Alike 4.0 International
5 stars 4 forks source link

zh_cn translation #4

Closed HaHaWTH closed 1 year ago

TheHamester commented 1 year ago

Provided localization is very appreciated, but since tooltips (hover over text) were hardcoded in english in the config class itself from mere neglegence of the fact somebody would pull request a localization, I made a commit that exposes tooltip lagnauge keys into the lang file as well. If that's not too big of an ask, I'd like to ask to translate the tooltips too. Thank you very much for your contribution!

TheHamester commented 1 year ago

please confirm if youre planning on translating tooltips/hover over text. in case the answer is no, hover over text will remain english in the localization. fetch the changes to see the tooltip langauge keys

TheHamester commented 1 year ago

the translation keys for enabling hit indication are hitindication.gui.config.indicators.enable_hit_indication=Enable Hit Indication and hitindication.gui.config.indicators.enable_hit_indication.tooltip=Enables hit indication.

reference to https://github.com/TheHamester/HitIndicator/issues/5

HaHaWTH commented 1 year ago

OK, this language file is for the 1.12.2branch and I'll upload other files later:)

TheHamester commented 1 year ago

theres still no all of the tooltips look at my latest commit to 1.12.2

TheHamester commented 1 year ago

also, i dont think for further versions its possible to translate config files, even tho in the config spec builder there is .translate method, it doesnt seem to do anything, correct me if im wrong

TheHamester commented 1 year ago

https://github.com/TheHamester/HitIndicator/blob/1.12.2/src/main/resources/assets/hitindication/lang/en_us.lang

theres still no all of the tooltips look at my latest commit to 1.12.2

HaHaWTH commented 1 year ago

https://github.com/TheHamester/HitIndicator/blob/1.12.2/src/main/resources/assets/hitindication/lang/en_us.lang

theres still no all of the tooltips look at my latest commit to 1.12.2

Finished!

TheHamester commented 1 year ago

ye that looks good, thank you!!

TheHamester commented 1 year ago

saying in advance, i dont think zh_cn localization goes into other versions. forge doesnt seem to support translating config files in 1.16.5 and 1.18.2, sorry.

HaHaWTH commented 1 year ago

saying in advance, i dont think zh_cn localization goes into other versions. forge doesnt seem to support translating config files in 1.16.5 and 1.18.2, sorry.

Ahh....Maybe you need to convert .lang file into .json file, Forge in newer Minecraft versions only support json as localization files:(

HaHaWTH commented 1 year ago

I put my localization file into the jar file of this mod and it works perfectly :)

TheHamester commented 1 year ago

i did use json files. thing is you see, in further versions an external mod is required to generate config screens. and while i did find actual localization for froge configs in files, even they work really inconsistantly. i did try the same way they implemented it for my own config, it doesnt seem to work, thich is reaaaaally weird image

TheHamester commented 1 year ago

but 1.12 works perfectly ye

TheHamester commented 1 year ago

oh, ok, got it to work in 1.18.2, they just dont support tooltips

TheHamester commented 1 year ago

ill make json files myself

HaHaWTH commented 1 year ago

Wait.....Newer versions of Forge does not support tooltips?! I know little about modern Minecraft versions🧐

TheHamester commented 1 year ago

translated tooltips for configs, ye