mojira.dev
MC-162441

"translate" in JSON text on signs does not update as expected

The issue:

“translate” components in JSON text format on signs do not get updated if the language is changed. (This worked in older versions Minecraft e.g. 1.10.)

Reloading the chunks does not help. But save and quitting and reopening the world and moving far away from the sign does.

(This is especially troublesome for translatable custom maps: the signs' text gets loaded before resources.zip, thus it is impossible to let them display custom translated text properly.)

The text doesn't have to be updated immediately, but having an option like reloading the chunks or resource packs to trigger the update would be nice.

 

How to reproduce:

  1. Place a sign on the ground with the following command: (1st screenshot)

setblock ~ ~ ~ minecraft:oak_sign{Text2:'[{"translate":"block.minecraft.oak_sign"}]'}
  1. Change the language. (2nd screenshot)
    The text on the sign does not change.

  2. “Save and Quit to title” and reopen the world. (3rd screenshot)
    Now the text has been updated.
     

Linked issues

Attachments

Comments 8

Same issue is present in the chat: MC-212304 

Can confirm in 1.19.3 and 23w03a

As a workaround, you can run data merge block x y z {NonexistentTag:1b} on the sign every tick to force the client to update translations. However, this is not a desirable solution due to the constant performance cost per sign associated with block NBT modification; ideally, signs would update by themselves upon resource pack reload.

Confirmed in 1.19.4 and also affects text displays' text component.

It also affects hover events in the chat: MC-266603

can confirm in 1.20.4

update the command for sign data changed

setblock ~ ~ ~ minecraft:oak_sign{front_text:{messages:['""','{"translate":"block.minecraft.oak_sign"}','""','""']}}

Syntax changed again:

/setblock ~ ~ ~ minecraft:oak_sign{front_text:{messages:["",{"translate":"block.minecraft.oak_sign"},"",""]}}

Polymehr

(Unassigned)

Confirmed

Platform

Normal

UI

block, json-text, rendering, sign, translate

1.14.4, 19w39a, 19w40a, 19w41a, 19w42a, ..., 21w11a, 1.19.3, 23w03a, 1.19.4, 1.21

Retrieved