Skip to content
Snippets Groups Projects
Commit 042c491a authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

[omemo] Make some strings translatable

parent 5e31aefe
No related branches found
No related tags found
No related merge requests found
......@@ -144,8 +144,8 @@ class FileDecryption:
file.filepath = os.path.join(DIRECTORY, newfilename)
def finished(self, file):
question = 'Do you want to open %s' % file.filename
YesNoDialog('Open File', question,
question = _('Do you want to open %s') % file.filename
YesNoDialog(_('Open File'), question,
transient_for=self.window,
on_response_yes=(self.open_file, file.filepath))
return False
......@@ -169,18 +169,18 @@ class Download:
self.download()
def download(self):
GLib.idle_add(self.progressbar.set_text, 'Downloading...')
GLib.idle_add(self.progressbar.set_text, _('Downloading...'))
data = self.load_url()
if isinstance(data, str):
GLib.idle_add(self.progressbar.close_dialog)
GLib.idle_add(self.error, data)
return
GLib.idle_add(self.progressbar.set_text, 'Decrypting...')
GLib.idle_add(self.progressbar.set_text, _('Decrypting...'))
decrypted_data = self.aes_decrypt(data)
GLib.idle_add(
self.progressbar.set_text, 'Writing file to harddisk...')
self.progressbar.set_text, _('Writing file to harddisk...'))
self.write_file(decrypted_data)
GLib.idle_add(self.progressbar.close_dialog)
......
......@@ -493,8 +493,8 @@ class OMEMOConnection:
event.msg_iq.addChild(node=eme_node)
# Add Message for devices that dont support OMEMO
support_msg = 'You received a message encrypted with ' \
'OMEMO but your client doesnt support OMEMO.'
support_msg = _('You received a message encrypted with ' \
'OMEMO but your client doesnt support OMEMO.')
event.msg_iq.setBody(support_msg)
# Store Hint for MAM
......
......@@ -192,10 +192,10 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
fpr = fpr[31:-12]
YesNoDialog(
'Delete Fingerprint?',
'Do you want to delete the '
'fingerprint of <b>{}</b> on your account <b>{}</b>?'
'\n\n<tt>{}</tt>'.format(jid, account, fpr),
_('Delete Fingerprint?'),
_('Do you want to delete the '
'fingerprint of <b>{jid}</b> on your account <b>{account}</b>?'
'\n\n<tt>{fingerprint}</tt>').format(jid=jid, account=account, fingerprint=fpr),
on_response_yes=on_yes, transient_for=self)
def trust_button_clicked_cb(self, button, *args):
......@@ -223,10 +223,10 @@ class OMEMOConfigDialog(GajimPluginConfigDialog):
identity_key = record.getSessionState().getRemoteIdentityKey()
YesNoDialog(
'Trust / Revoke Fingerprint?',
'Do you want to trust the fingerprint of <b>{}</b> '
'on your account <b>{}</b>?\n\n'
'<tt>{}</tt>'.format(jid, account, fpr),
_('Trust / Revoke Fingerprint?'),
_('Do you want to trust the fingerprint of <b>{jid}</b> '
'on your account <b>{account}</b>?\n\n'
'<tt>{fingerprint}</tt>').format(jid=jid, account=account, fingerprint=fpr),
on_response_yes=(on_yes, identity_key),
on_response_no=(on_no, identity_key),
transient_for=self)
......@@ -365,7 +365,7 @@ class FingerprintWindow(Gtk.Dialog):
self.omemostate = self.plugin.get_omemo(self.account)
self.own_jid = app.get_jid_from_account(self.account)
Gtk.Dialog.__init__(self,
title=('Fingerprints for %s') % contact.jid,
title=(_('Fingerprints for %s')) % contact.jid,
parent=parent,
flags=Gtk.DialogFlags.DESTROY_WITH_PARENT)
close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
......@@ -432,10 +432,10 @@ class FingerprintWindow(Gtk.Dialog):
identity_key = record.getSessionState().getRemoteIdentityKey()
YesNoDialog(
'Trust / Revoke Fingerprint?',
'Do you want to trust the fingerprint of <b>{}</b> '
'on your account <b>{}</b>?\n\n'
'<tt>{}</tt>'.format(jid, self.account, fpr),
_('Trust / Revoke Fingerprint?'),
_('Do you want to trust the fingerprint of <b>{jid}</b> '
'on your account <b>{account}</b>?\n\n'
'<tt>{fingerprint}</tt>').format(jid=jid, account=self.account, fingerprint=fpr),
on_response_yes=(on_yes, identity_key),
on_response_no=(on_no, identity_key),
transient_for=self)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment