-
Bug
-
Resolution: Unresolved
-
None
-
1.17.1, 21w39a, 1.18.1, 1.18.2, 22w11a, 1.19, 22w24a, 1.19.2, 22w42a, 1.19.3, 1.19.4, 23w17a, 1.20.1, 1.20.2, 23w43b
-
None
-
Confirmed
-
(Unassigned)
I thought I reported this before, but guess not.
Translation keys aren't namespaced (minecraft: in front), but load from all namespaces in a resource pack.
Steps to reproduce:
- Create an empty resource pack.
- Add the file assests/testing_namespace/lang/en_us.json with the contents being
{"test_string": "Test string showing"}
and the file assests/minecraft/lang/en_us.json with the contents being
{"minecraft_string": "Test string showing"}
- Enable the resource pack
- Use the commands
/tellraw @s {"translate":"testing_namespace:test_string"} /tellraw @s {"translate":"minecraft:minecraft_string"} /tellraw @s {"translate":"test_string"} /tellraw @s {"translate":"minecraft_string"}
Observe how the last two (without namespaces) show "Test string showing", and not the others.
All but "test_string" without the namespace should show the text instead.
The fix for this should be to add the namespace to translation keys, and disallow the colon to be used in the translation keys. (Though it would be best to adapt translation keys to use the namespaced ID standard of [a-z0-9_.-] characters only.)
This would additionally help with mod compatibility, to prevent 2 mods adding strings from clashing.
When changed, the namespace will no longer need to be provided in the strings themselves (for blocks, items, entities, effects and enchantments), as it just selects the minecraft namespace string then.