New translation lines

This commit is contained in:
2ndbeam 2024-05-23 01:47:18 +03:00
commit b68215a710
8 changed files with 41 additions and 7 deletions

View file

@ -5,12 +5,14 @@ class_name MessageSenderAction
var dialogue
## Message which will be send on click
var msg: Message
## Additional formatting which can be applied by menu
var format = {}
## Gets message and translates it on display.
## Shown message should end with _LOCAL
func _ready():
var item_id = get_parent().menu.item_ids[id]
msg = Message.create(item_id, tr(item_id + "_LOCAL"))
msg = Message.create(item_id, tr(item_id + "_LOCAL").format(format))
text = msg.shown
super._ready()