Skip to content
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

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

Closed
Greg-21 opened this issue Sep 30, 2024 · 4 comments

Comments

@Greg-21
Copy link
Contributor

Greg-21 commented Sep 30, 2024

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",
@mezz
Copy link
Owner

mezz commented Sep 30, 2024

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.

@mezz mezz closed this as completed in 40f7fbd Oct 1, 2024
@Greg-21
Copy link
Contributor Author

Greg-21 commented Oct 2, 2024

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?

@Greg-21
Copy link
Contributor Author

Greg-21 commented Oct 3, 2024

@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.)

@mezz
Copy link
Owner

mezz commented Oct 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants