aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/ui/manage_key_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/manage_key_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/manage_key_dialog.vala')
-rw-r--r--plugins/omemo/src/ui/manage_key_dialog.vala12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/omemo/src/ui/manage_key_dialog.vala b/plugins/omemo/src/ui/manage_key_dialog.vala
index bf003c41..663b8b7f 100644
--- a/plugins/omemo/src/ui/manage_key_dialog.vala
+++ b/plugins/omemo/src/ui/manage_key_dialog.vala
@@ -6,6 +6,7 @@ namespace Dino.Plugins.Omemo {
[GtkTemplate (ui = "/im/dino/Dino/omemo/manage_key_dialog.ui")]
public class ManageKeyDialog : Gtk.Dialog {
+ [GtkChild] private HeaderBar headerbar;
[GtkChild] private Stack manage_stack;
[GtkChild] private Button cancel_button;
@@ -19,6 +20,7 @@ public class ManageKeyDialog : Gtk.Dialog {
[GtkChild] private Label confirm_desc_label;
[GtkChild] private Label verify_label;
+ [GtkChild] private Label compare_fingerprint_label;
[GtkChild] private Button verify_yes_button;
[GtkChild] private Button verify_no_button;
@@ -28,6 +30,16 @@ public class ManageKeyDialog : Gtk.Dialog {
private bool return_to_main;
private int current_response;
+ construct {
+ // If we set the strings in the .ui file, they don't get translated
+ headerbar.title = _("Manage Key");
+ compare_fingerprint_label.label = _("Compare the fingerprint, character by character, with the one shown on your contacts device.");
+ verify_no_button.label = _("Not matching");
+ verify_yes_button.label = _("Matching");
+ cancel_button.label = _("Cancel");
+ ok_button.label = _("Confirm");
+ }
+
public ManageKeyDialog(Row device, Database db) {
Object(use_header_bar : Environment.get_variable("GTK_CSD") != "0" ? 1 : 0);