Commit 35e6548f authored by Daniel Brötzmann's avatar Daniel Brötzmann

Don’t use f-strings for translatable strings

parent 7233552e
Pipeline #6541 passed with stages
in 4 minutes and 15 seconds
......@@ -130,7 +130,7 @@ def make_bin_from_config(self, config_key, pipeline, text):
None,
conn=self.session.connection,
level='error',
pri_txt=_(f'{text} configuration error'),
pri_txt=_('%s configuration error' % text),
sec_txt=_('Couldn’t set up %(text)s. Check your '
'configuration.\nPipeline:\n%(pipeline)s\n'
'Error:\n%(error)s') % {
......
......@@ -495,7 +495,7 @@ def invite(self, contact_jid):
con = app.connections[self.account]
message_id = con.get_module('MUC').invite(self.room_jid, contact_jid)
self.add_info_message(
_(f'{contact_jid} has been invited to this group chat'),
_('%s has been invited to this group chat' % contact_jid),
message_id=message_id)
def _on_destroy_room(self, _action, _param):
......@@ -591,7 +591,7 @@ def _on_upload_avatar_result(self, task):
try:
task.finish()
except Exception as error:
self.add_info_message(_(f'Avatar upload failed: {error}'))
self.add_info_message(_('Avatar upload failed: %s' % error))
else:
self.add_info_message(_('Avatar upload successful'))
......
......@@ -389,7 +389,8 @@ def handle_event_gc_invitation(self, event):
if helpers.allow_showing_notification(event.account):
contact_name = event.get_inviter_name()
event_type = _('Group Chat Invitation')
text = _(f'{contact_name} invited you to {event.info.muc_name}')
text = _('%(contact)s invited you to %(chat)s') % {
'contact': contact_name, 'chat': event.info.muc_name}
app.notification.popup(event_type,
str(event.from_),
event.account,
......@@ -925,7 +926,7 @@ def handle_event_jingle_incoming(self, event):
if helpers.allow_showing_notification(account):
heading = _('Incoming Call')
contact = app.get_name_from_jid(account, event.jid)
text = _(f'{contact} is calling')
text = _('%s is calling' % contact)
app.notification.popup(
heading,
event.fjid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment