Dash in villager/trader UI is hardcoded / untranslatable
The Bug
The dash / separator between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resource packs are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Expected Result
The dash / separator would be translatable.
Note:
Even better: "<profession> - <career level>" should be translatable (%s - %s), so that languages can change the word order and spacing if needed
Code analysis (tentative)
... private static final Component LEVEL_SEPARATOR = new TextComponent(" - "); ... protected void renderLabels(PoseStack poseStack, int a, int b) { int traderLevel = ((MerchantMenu)this.menu).getTraderLevel(); if (traderLevel > 0 && traderLevel <= 5 && ((MerchantMenu)this.menu).showProgressBar()) { MutableComponent traderLabel = this.title.copy().append(LEVEL_SEPARATOR).append(new TranslatableComponent("merchant.level." + traderLevel)); ... } ... } ...
LEVEL_SEPARATOR should be a TranslatableComponent instead of a hardcoded TextComponent.
Linked Issues
relates to4
- Fixed
Kyle Cuthbert
[Mojang] slicedlime- 18
- 9
- Confirmed
Low
- Internationalisation Text
- gui text trade-gui
1.15.2 - 23w33a
1.15.2 20w14a 20w15a 20w16a 20w17a 20w18a 20w19a 20w20a 20w20b 20w21a 20w22a 1.16-pre1 1.16-pre2 1.16-pre3 1.16-pre4 1.16-pre5 1.16-pre6 1.16-pre7 1.16-pre8 1.16-rc1 1.16 1.16.1 1.16.2 1.16.3-rc1 1.16.3 1.16.4-pre1 1.16.4-pre2 1.16.4 20w45a 20w46a 20w48a 20w49a 20w51a 21w03a 21w05a 21w06a 21w07a 21w08a 21w08b 21w10a 21w11a 21w13a 21w14a 21w16a 21w17a 21w18a 21w19a 21w20a 1.17-pre1 1.17-pre2 1.17-pre3 1.17-pre4 1.17-rc1 1.17 1.17.1-pre1 1.17.1-pre2 1.17.1-pre3 21w37a 21w38a 21w40a 21w41a 21w42a 21w43a 21w44a 1.18-pre1 1.18-pre4 1.18-rc3 1.18 1.18.1-rc2 1.18.1 22w03a 22w05a 22w06a 22w07a 1.18.2-pre2 1.18.2-pre3 1.18.2-rc1 1.18.2 22w11a 22w13a 22w15a 22w17a 22w18a 22w19a 1.19-pre1 1.19-pre2 1.19-pre3 1.19 1.19.1-pre2 1.19.1-rc2 1.19.2 22w44a 1.19.4-pre3 1.19.4 23w12a 23w13a 23w18a 1.20-pre1 1.20-pre4 1.20-pre5 1.20-pre6 1.20-pre7 1.20-rc1 1.20 1.20.1-rc1 1.20.1 23w31a 23w32a 23w33a- 1.20.2-pre1
Created Issue:
Dash in Villager Trade UI is Untranslatable
The Dash between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resourcepacks are unable to alter this part of the interface. This is particularly jarring packs which recolour text.
The
Dash between the villager's profession and level is untranslatable in the trade GUI.Among other things, this means resourcepacks are unable to alter this part of the interface. This is particularly jarring packs
whichrecolour text.The dash between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resourcepacks are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Dash in Villager Trade UI is Hardcoded/Untranslatable
The Bug
The dash / separator between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resource packs are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Expected Result
The dash / separator would be translatable.
Code analysis (tentative)
net.minecraft.client.gui.screens.inventory.MerchantScreen.java (Mojang mappings, 1.18, variable renaming)... private static final Component LEVEL_SEPARATOR = new TextComponent(" - "); ... protected void renderLabels(PoseStack poseStack, int a, int b) { int traderLevel = ((MerchantMenu)this.menu).getTraderLevel(); if (traderLevel > 0 && traderLevel <= 5 && ((MerchantMenu)this.menu).showProgressBar()) { MutableComponent traderLabel = this.title.copy().append(LEVEL_SEPARATOR).append(new TranslatableComponent("merchant.level." + traderLevel)); ... } ... }LEVEL_SEPARATOR should be a TranslatableComponent instead of a hardcoded TextComponent.
Dash inVillager Trade UI isHardcoded/UntranslatableDash in trader UI is hardcoded / untranslatable
Dash in villager/trader UI is hardcoded / untranslatable
The Bug
The dash / separator between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resource packs are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Expected Result
The dash / separator would be translatable.
Code analysis (tentative)
net.minecraft.client.gui.screens.inventory.MerchantScreen.java (Mojang mappings, 1.18, variable renaming)... private static final Component LEVEL_SEPARATOR = new TextComponent(" - "); ... protected void renderLabels(PoseStack poseStack, int a, int b) { int traderLevel = ((MerchantMenu)this.menu).getTraderLevel(); if (traderLevel > 0 && traderLevel <= 5 && ((MerchantMenu)this.menu).showProgressBar()) { MutableComponent traderLabel = this.title.copy().append(LEVEL_SEPARATOR).append(new TranslatableComponent("merchant.level." + traderLevel)); ... } ... } ... }LEVEL_SEPARATOR should be a TranslatableComponent instead of a hardcoded TextComponent.
The Bug
The dash / separator between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resource packs are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Expected Result
The dash / separator would be translatable.
Code analysis (tentative)
net.minecraft.client.gui.screens.inventory.MerchantScreen.java (Mojang mappings, 1.18, variable renaming)... private static final Component LEVEL_SEPARATOR = new TextComponent(" - "); ... protected void renderLabels(PoseStack poseStack, int a, int b) { int traderLevel = ((MerchantMenu)this.menu).getTraderLevel(); if (traderLevel > 0 && traderLevel <= 5 && ((MerchantMenu)this.menu).showProgressBar()) { MutableComponent traderLabel = this.title.copy().append(LEVEL_SEPARATOR).append(new TranslatableComponent("merchant.level." + traderLevel)); ...}...}... }LEVEL_SEPARATOR should be a TranslatableComponent instead of a hardcoded TextComponent.
The Bug
The dash / separator between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resource packs are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Expected Result
The dash / separator would be translatable.
Code analysis (tentative)
net.minecraft.client.gui.screens.inventory.MerchantScreen.java (Mojang mappings, 1.18, variable renaming)... private static final Component LEVEL_SEPARATOR = new TextComponent(" - "); ... protected void renderLabels(PoseStack poseStack, int a, int b) { int traderLevel = ((MerchantMenu)this.menu).getTraderLevel(); if (traderLevel > 0 && traderLevel <= 5 && ((MerchantMenu)this.menu).showProgressBar()) { MutableComponent traderLabel = this.title.copy().append(LEVEL_SEPARATOR).append(new TranslatableComponent("merchant.level." + traderLevel)); ... } ... } ...LEVEL_SEPARATOR should be a TranslatableComponent instead of a hardcoded TextComponent.
relates to
The Bug
The dash / separator between the villager's profession and level is untranslatable in the trade GUI.
Among other things, this means resource packs are unable to alter this part of the interface. This is particularly jarring with packs that recolour text.
Expected Result
The dash / separator would be translatable.
Note:
Even better: "<profession> - <career level>" should be translatable (%s - %s), so that languages can change the word order and spacing if needed
Code analysis (tentative)
net.minecraft.client.gui.screens.inventory.MerchantScreen.java (Mojang mappings, 1.18, variable renaming)... private static final Component LEVEL_SEPARATOR = new TextComponent(" - "); ... protected void renderLabels(PoseStack poseStack, int a, int b) { int traderLevel = ((MerchantMenu)this.menu).getTraderLevel(); if (traderLevel > 0 && traderLevel <= 5 && ((MerchantMenu)this.menu).showProgressBar()) { MutableComponent traderLabel = this.title.copy().append(LEVEL_SEPARATOR).append(new TranslatableComponent("merchant.level." + traderLevel)); ... } ... } ...LEVEL_SEPARATOR should be a TranslatableComponent instead of a hardcoded TextComponent.
I've reported this because MC-177172, (which is a report about the hyphen within the villager trading GUI not being translatable), is considered a valid problem by Mojang Studios, therefore leading me to believe that the hyphen within the statistics menu used to show a null value, should be translatable as well.

Would LOVE to see this fixed. You should probably reword this and say that the dash in the villager GUI is hardcoded
What you mean with this issue?
I mean:
Most in-game text is "translatable", which is to say: There are text files (language files), which tell the game what word to put there. So if you set your language to Russian, the text in the screenshot would say "Картограф - Новичок" instead of "Cartographer - Novice". You can make your own language files for your own language if it isn't supported, or you just want to change a couple things. Maybe for a resource pack that changes hoes to scythes, you could change the translation to "wooden scythe". You can even change the colour in these files, so the text at the top of the trade GUI would look blue for example, instead of Grey.
Now the problem: "Cartographer" can be translated (just by changing "merchant.level.1" to whatever you want in the file), and "Novice" can be translated ("entity.minecraft.villager.cartographer"). The dash that separates them however, cannot be.
What this means: If for some reason, a language used hyphens diferently, they would be unable to change this part of the text. Furthermore, if you want to make the text in the trade UI green, there would be no way to change the hyphen, and it would say "Cartographer - Novice" (The colour thing can be important for resource packs that change the colour of this GUI, as dark grey might not be as visible.)
Can confirm.
Can confirm in 1.18.1.
Just a note for Mojang so that they can fix it properly: the complete string "<profession> - <career level>" should be translatable (%s - %s), so that languages can change the word order or spacing if needed. You might want to write that in the OP.
Can confirm in 1.19.
Can confirm in 1.19.2.