You can accomplish this by modifying your message variable in a way that it allows it to change it’s message through the use of a regular string.
# String can be modified in the editor
@editable
MyText : string = ""
# Note that we add an argument Text, allowing us to pass a string
TitleMessage<localizes>(Text : string) : message = "{Text}"
This way, you can now pass in the MyText variable whenever you use the TitleMessage anywhere in your code. For example, setting a text_block text
# Some text block widget
TextBlock : text_block = text_block{}
# Setting the text block message
TextBlock.SetText(TitleMessage(MyText))