
Disclaimer: I am no gettext/translation specialist but want to create the best code for supporting our translators :-) What is the correct Python code snippet to create a new string by concatenating two (or more) strings while ensuring that the final result is translated correctly? Example (may not work): msg_prefix = "Hello" msg_body = "world" msg = _(msg_prefix + msg_body) or msg_prefix = _("Hello") msg_body = _("world") msg = msg_prefix + msg_body or ... ? And even more complicated if I want to insert a formatted variable too...: msg_prefix = _("Welcome {name}".format(name=login_name)) msg_body = _("at {location}".format(name=address)) msg = msg_prefix + msg_body or ... ? I think we should collect some code snippets for these common cases (e.g. in our discussed new repo "dev-tools")