Verified Commit 159be3fa authored by André's avatar André

Fix format of translatable strings

parent bb740ca4
Pipeline #6553 passed with stages
in 4 minutes and 30 seconds
......@@ -1334,7 +1334,7 @@ def _on_ok(_contact):
_('Privacy'),
_('Warning'),
_('If you send a file to <b>%s</b>, your real XMPP '
'address will be revealed.' % gc_contact.name),
'address will be revealed.') % gc_contact.name,
[DialogButton.make('Cancel'),
DialogButton.make(
'OK',
......
......@@ -130,7 +130,7 @@ def make_bin_from_config(self, config_key, pipeline, text):
None,
conn=self.session.connection,
level='error',
pri_txt=_('%s configuration error' % text),
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') % {
......
......@@ -261,7 +261,7 @@ def connect(self, show='online', msg=''):
if result is False:
app.nec.push_incoming_event(ConnectionLostEvent(None,
conn=self, title=_('Could not start local service'),
msg=_('Unable to bind to port %d.' % self.port)))
msg=_('Unable to bind to port %d.') % self.port))
else: # result is None
app.nec.push_incoming_event(ConnectionLostEvent(None,
conn=self, title=_('Could not start local service'),
......
......@@ -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(
_('%s has been invited to this group chat' % contact_jid),
_('%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(_('Avatar upload failed: %s' % error))
self.add_info_message(_('Avatar upload failed: %s') % error)
else:
self.add_info_message(_('Avatar upload successful'))
......@@ -612,7 +612,7 @@ def _on_contact_information(self, _action, param):
def _on_kick(self, _action, param):
nick = param.get_string()
self._kick_nick = nick
self.xml.kick_label.set_text(_('Kick %s' % nick))
self.xml.kick_label.set_text(_('Kick %s') % nick)
self.xml.kick_reason_entry.grab_focus()
self.xml.kick_participant_button.grab_default()
self._show_page('kick')
......@@ -621,7 +621,7 @@ def _on_ban(self, _action, param):
jid = param.get_string()
self._ban_jid = jid
nick = app.get_nick_from_jid(jid)
self.xml.ban_label.set_text(_('Ban %s' % nick))
self.xml.ban_label.set_text(_('Ban %s') % nick)
self.xml.ban_reason_entry.grab_focus()
self.xml.ban_participant_button.grab_default()
self._show_page('ban')
......
......@@ -49,8 +49,8 @@ def __init__(self):
comments = []
comments.append(_('A GTK XMPP client'))
comments.append(_('GTK Version: %s' % gtk_ver))
comments.append(_('GLib Version: %s' % glib_ver))
comments.append(_('GTK Version: %s') % gtk_ver)
comments.append(_('GLib Version: %s') % glib_ver)
comments.append(_('PyGObject Version: %s') % gobject_ver)
comments.append(_('python-nbxmpp Version: %s') % nbxmpp.__version__)
......
......@@ -258,7 +258,7 @@ def on_add_button_clicked(self, widget):
if not jid:
ErrorDialog(
_('%s Missing') % self.uid_label.get_text(),
_('You must supply the %s of the new contact.' %
(_('You must supply the %s of the new contact.') %
self.uid_label.get_text())
)
return
......
......@@ -45,7 +45,7 @@ def __init__(self, account):
self.set_application(app.app)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_show_menubar(False)
self.set_title(_('Bookmarks for %s' % app.get_account_label(account)))
self.set_title(_('Bookmarks for %s') % app.get_account_label(account))
self.set_default_size(700, 500)
self.account = account
......
......@@ -396,7 +396,7 @@ def _on_accepted(account, contact, file_props, file_path):
file_name = GLib.markup_escape_text(
os.path.basename(file_path))
ErrorDialog(
_('Cannot overwrite existing file \'%s\'' % file_name),
_('Cannot overwrite existing file \'%s\'') % file_name,
_('A file with this name already exists and you do '
'not have permission to overwrite it.'))
return
......
......@@ -248,11 +248,11 @@ def set_fraction(self):
self.received += 1
if self.count:
self.progress.set_fraction(self.received / self.count)
self.progress.set_text(_('%(received)s of %(max)s' % {
'received': self.received, 'max': self.count}))
self.progress.set_text(_('%(received)s of %(max)s') % {
'received': self.received, 'max': self.count})
else:
self.progress.pulse()
self.progress.set_text(_('Downloaded %s messages' % self.received))
self.progress.set_text(_('Downloaded %s messages') % self.received)
def finished(self):
self.progress.set_fraction(1)
......@@ -273,7 +273,7 @@ def __init__(self, assistant):
def finished(self):
received = self.assistant.download_history.received
self.label.set_text(_('Finished synchronising chat history:\n'
'%s messages downloaded' % received))
'%s messages downloaded') % received)
def nothing_to_do(self):
self.label.set_text(_('Gajim is fully synchronised with the archive.'))
......
......@@ -194,7 +194,7 @@ def _on_accept_button_clicked(self, _widget):
count += 1
# It is selected
message = _('%s suggested me to add you to my '
'contact list.' % self.jid_from)
'contact list.') % self.jid_from
# Keep same groups and same nickname
groups = model[iter_][3].split(', ')
if groups == ['']:
......
......@@ -652,7 +652,7 @@ def __init__(self, account, contact, jid, name, show_account,
if show_account:
account_badge = generate_account_badge(account)
account_badge.set_tooltip_text(
_('Account: %s' % self.account_label))
_('Account: %s') % self.account_label)
account_badge.set_halign(Gtk.Align.END)
account_badge.set_valign(Gtk.Align.START)
account_badge.set_hexpand(True)
......
......@@ -926,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 = _('%s is calling' % contact)
text = _('%s is calling') % contact
app.notification.popup(
heading,
event.fjid,
......@@ -1983,7 +1983,7 @@ def _on_update(is_checked):
_('Update Available'),
_('Gajim Update Available'),
_('There is an update available for Gajim '
'(latest version: %s)' % str(latest_version)),
'(latest version: %s)') % str(latest_version),
_('_Do not show again'),
[DialogButton.make('Cancel',
text=_('_Later'),
......
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