Which demo project is affected: Translation Demo
Description:
The Translation demo should include an example of handling translation changes for a custom control in a script.
See https://godotforums.org/discussion/27323/acessing-translations-and-new-scenes where I had to devise some custom code for this, but I don't know if it actually works. Cross-posting it here for posterity:
# Stores the text that is displayed to the user.
var text = "" setget set_text
# Stores the translation key.
var original_text = ""
func set_text(p_text):
text = tr(p_text)
original_text = p_text
func _notification(what):
if what == NOTIFICATION_TRANSLATION_CHANGED:
self.text = tr(original_text)