FTBTeam / FTB-Mods-Issues

Any mod issues, be it FTB Teams, Quests or any other of our mods can be reported here!
21 stars 1 forks source link

[Feature Request]: FTBquest localization #647

Closed nageih closed 2 months ago

nageih commented 1 year ago

Mod

FTB Quest

Description

For modpacker,quest localization is hard,because it doesn't has lang file

Describe the solution you'd like

After using FTBquest can automatically generate lang files, which will be very convenient for translators

Describe alternatives you've considered

Convert the text in the file stored in config into a string, and then generate the string into a language file. Just like this mod:https://www.curseforge.com/minecraft/mc-mods/ftb-quests-localization-keys But this mod still has limitations, so I hope ftb quest natively supports localization

nageih commented 1 year ago

The stoneblock 3 modpack does just that

desht commented 1 year ago

This is something we have been discussing internally and definitely want to do. But it's a complex task, since quest text can be a mixture of text, raw json text, FTB-style text markup, images, etc. The mod you linked is good, but as you noted has its limitations.

So yes it will hopefully happen, but needs to be done right...

nageih commented 1 year ago

I think you can release a test version with the base localization and then improve the functionality step by step with feedback from the authors of the modpacks and issues

nageih commented 2 months ago

After a year, this issue seems to have been resolved, but unfortunately it doesn't work on lower versions. Finally I have a question about the text in the Item Stack Component, such as minecraft:custom_name and lore, and whether it's possible to support localization?

nageih commented 2 months ago

@desht

desht commented 2 months ago

Finally I have a question about the text in the Item Stack Component, such as minecraft:custom_name and lore, and whether it's possible to support localization?

Not quite clear what you mean here, can you provide an example?

nageih commented 2 months ago

For example,I have a item which have custom name "test" , it will be stored in snbt file like this PixPin_2024-06-28_21-12-15.png The custom name cann't be translated,but as long as I use the Text Component including a translation key, I can translate it like this.It's similar for lore component PixPin_2024-06-28_21-22-05.png In fact,it's just like NBT. I know FTB Quests as a quest mod shouldn't have the ability to modify items like this, but it would be more helpful for translation, and would it be possible to add an optional option?

desht commented 2 months ago

The custom_name data component is already a text component - https://minecraft.wiki/w/Data_component_format#custom_name

Which means you can define its text as raw json text, as that Wiki link mentions. And raw text already allows for translations: https://minecraft.wiki/w/Raw_JSON_text_format#Translated_Text

So isn't any need for any special support in FTB Quests for this.