aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/ui/contact_details_dialog.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-10-09 23:32:03 +0200
committerfiaxh <git@lightrise.org>2019-10-10 00:21:45 +0200
commit8e6db8859c756ef2445e1f5277103d83c735c726 (patch)
tree7ac396525e13da4ee37d7983039cafc00307586b /plugins/omemo/src/ui/contact_details_dialog.vala
parent7adb0e82fba1afc62689797be6c9491ad15d03bf (diff)
downloaddino-8e6db8859c756ef2445e1f5277103d83c735c726.tar.gz
dino-8e6db8859c756ef2445e1f5277103d83c735c726.zip
Plugins: Set UI texts in code instead of .ui files to fix translations
Co-authored-by: srgcdev <srg.dev@posteo.net>
Diffstat (limited to 'plugins/omemo/src/ui/contact_details_dialog.vala')
-rw-r--r--plugins/omemo/src/ui/contact_details_dialog.vala14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/omemo/src/ui/contact_details_dialog.vala b/plugins/omemo/src/ui/contact_details_dialog.vala
index eee06f0f..463b5cd7 100644
--- a/plugins/omemo/src/ui/contact_details_dialog.vala
+++ b/plugins/omemo/src/ui/contact_details_dialog.vala
@@ -17,7 +17,11 @@ public class ContactDetailsDialog : Gtk.Dialog {
private bool own = false;
private int own_id = 0;
+ [GtkChild] private Label automatically_accept_new_label;
[GtkChild] private Label automatically_accept_new_descr;
+ [GtkChild] private Label own_key_label;
+ [GtkChild] private Label new_keys_label;
+ [GtkChild] private Label associated_keys_label;
[GtkChild] private Box own_fingerprint_container;
[GtkChild] private Label own_fingerprint_label;
[GtkChild] private Box new_keys_container;
@@ -30,6 +34,16 @@ public class ContactDetailsDialog : Gtk.Dialog {
[GtkChild] private Image qrcode_image;
[GtkChild] private Popover qrcode_popover;
+ construct {
+ // If we set the strings in the .ui file, they don't get translated
+ title = _("OMEMO Key Management");
+ automatically_accept_new_label.label = _("Automatically accept new keys");
+ automatically_accept_new_descr.label = _("When this contact adds new encryption keys to their account, automatically accept them.");
+ own_key_label.label = _("Own key");
+ new_keys_label.label = _("New keys");
+ associated_keys_label.label = _("Associated keys");
+ }
+
public ContactDetailsDialog(Plugin plugin, Account account, Jid jid) {
Object(use_header_bar : Environment.get_variable("GTK_CSD") != "0" ? 1 : 0);
this.plugin = plugin;