Just Enough Items (JEI)

Just Enough Items (JEI)

386M Downloads

[Suggestion] Completely separate text strings for built-in tag groups from those provided by mods

Greg-21 opened this issue · 4 comments

commented

Suggestion

Since JEI 19.7.0.76, it has supported displaying all the various tag groups that exist in the game — whether built-in (currently item, block, and fluid tags) or provided by external mods — as separate recipe category tabs.

Later on, at the request of one of the translators, JEI took on the responsibility of maintaining translations for the built-in tag groups, which kind of makes sense because JEI exposes these tag groups in a way that requires them to be translated. Mojang didn't design vanilla Minecraft for this scenario, so there was no need for translation keys for the built-in tag groups until now.

One problem I see here as a translator is that the same formatting string, "%s Tags", is used for both the built-in tag groups (which are translatable and can be trusted) and external ones provided by mods (which cannot be trusted, can include nonsense like "Momoweb Festeste Tags", and are always in English (correct me if I'm wrong)).

One solution to this problem would be to separate the handling of the built-in tag groups from the external ones that we have no control over. This way, translators would have more flexibility and freedom in how they translate each of these four cases, allowing the built-in tag groups to be translated differently than the external ones provided by mods, for example.

This is what I think would get the job done:

--- a/Common/src/main/resources/assets/jei/lang/en_us.json
+++ b/Common/src/main/resources/assets/jei/lang/en_us.json
@@ -174,10 +174,10 @@
   "gui.jei.category.compostable": "Composting",
   "gui.jei.category.compostable.chance": "Chance: %s%%",
   "gui.jei.category.itemInformation": "Information",
-  "gui.jei.category.registry.block": "Block",
-  "gui.jei.category.registry.item": "Item",
-  "gui.jei.category.registry.fluid": "Fluid",
   "gui.jei.category.tagInformation": "%s Tags",
+  "gui.jei.category.tagInformation.block": "Block Tags",
+  "gui.jei.category.tagInformation.item": "Item Tags",
+  "gui.jei.category.tagInformation.fluid": "Fluid Tags",
   "gui.jei.category.recipe.crashed": "This recipe crashed. Please see the client logs for details.",

   "_comment": "Messages",
commented

Thanks for the suggestion!

Something I can do is look for specific translations like this, and then use the automatic "gui.jei.category.tagInformation" as a fallback when there is no specific translation available.

I do not want to be responsible for translating external tag categories, but this will at least allow other mods to create better translations if they want to.

commented

Looking at the source code, you've implemented much more than the minimum I originally asked for. It should work perfectly. Thank you.

Could you please backport this to 1.20.1 as well?

commented

@mezz

(I apologize for the ping, but I'm not sure if you still check old and closed tickets or if you receive notifications about any activity in them.)

commented

Hi Greg,
It's no problem, I just didn't get around to it yet.
I have backported the changes to 1.20.1 now.