KubeJS-Mods / KubeJS

https://kubejs.com
GNU Lesser General Public License v3.0
297 stars 87 forks source link

Implement Localization Support for CreativeTabs Titles #817

Closed Qi-Month closed 1 month ago

Qi-Month commented 3 months ago

While working on KubeJS, I encountered an issue where I couldn't modify the titles of CreativeTabs due to their titles being hard-coded. After reviewing the code, I decided to fork the repository and implement a solution that replaces the hard-coded titles with localizable key names. This modification allows the titles of CreativeTabs to be defined in localization files, enhancing flexibility and supporting multiple languages. Additionally, I have included an en_us language file to demonstrate the localization support.

Please review this change for potential inclusion in the main branch. This update should make CreativeTabs more versatile and accessible for modders looking to support multiple languages in their Minecraft mods.

Thank you for considering this pull request.

ChiefArug commented 3 months ago

Can KubeJS even be translated into other languages? Its kind of a made up word, and names of things (such as companies or mods) aren't usually translated.

EvanHsieh0415 commented 3 months ago

Can KubeJS even be translated into other languages? Its kind of a made up word, and names of things (such as companies or mods) aren't usually translated.

This can be used to rename a modpack so that the kubejs creative tab looks like it was created specifically for the modpack.

ChiefArug commented 3 months ago

If that is the reason this is being used it might be better seeing if the creative tab title can use KubeJS' display name instead, which can be modified by scripts to change the name under custom items and the like, so that you only need to change it in one place.