stanhebben / MineTweaker3

Tweak your minecraft experience
66 stars 32 forks source link

Unable to relocalize Strings after setting them #242

Open TechnicianLP opened 9 years ago

TechnicianLP commented 9 years ago

A way to use custom localizations would be nice

os forexample you set: game.setLocalization("zs.tooltip.bread", "Tasty!"); but then be able to use it eg. in a tooltip <minecraft:bread>.addTooltip(game.getLocalization("zs.tooltip.bread")); so you could us localized texts (in multiple languages individualy assigned) whereever needed

TechnicianLP commented 9 years ago

after pocking through the code i found a method for it game.localize("key") you should document your functions in the wiki better ....

TechnicianLP commented 9 years ago

after poking around some more in the code for localizations (after being stuck because localize("key") returned null every time) i noticed you are using reflection to put localizations into the statcollector when localizing a string you pull it from the languageregistry but those two are not connected so custom set localizations can't be localized

Dream-Master commented 9 years ago

@TechnicianLP Everyone registered to the minetweaker wiki can edit stuff. So you can help us to complete it.

ghost commented 9 years ago

another thing i noticed is you should localize closer to the top of the page and edit recipes or anything else related to that item after. doing it in reverse seems to not work.

that is if you say recipe.remove .. item recipe.add .. item localize item

it won't work or hasn't worked for me properly

you need to

localize item recipe remove item recipe add item

changes name and changes a recipe.

also you can't localize more than once

localize item localize item won't really work.. or i am doing it wrong