From 9bc83539d124f9645dc92e9e39001cb0192dae61 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 7 Apr 2017 11:09:47 +0200 Subject: Gettext support --- main/src/ui/add_conversation/chat/dialog.vala | 6 +++--- main/src/ui/add_conversation/conference/add_groupchat_dialog.vala | 4 ++-- main/src/ui/add_conversation/conference/dialog.vala | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'main/src/ui/add_conversation') diff --git a/main/src/ui/add_conversation/chat/dialog.vala b/main/src/ui/add_conversation/chat/dialog.vala index 910e7264..6873b4ca 100644 --- a/main/src/ui/add_conversation/chat/dialog.vala +++ b/main/src/ui/add_conversation/chat/dialog.vala @@ -18,7 +18,7 @@ public class Dialog : Gtk.Dialog { public Dialog(StreamInteractor stream_interactor) { Object(use_header_bar : 1); - this.title = "Start Chat"; + this.title = _("Start Chat"); this.modal = true; this.stream_interactor = stream_interactor; @@ -31,13 +31,13 @@ public class Dialog : Gtk.Dialog { header_bar.show_close_button = false; Button cancel_button = new Button(); - cancel_button.set_label("Cancel"); + cancel_button.set_label(_("Cancel")); cancel_button.visible = true; header_bar.pack_start(cancel_button); ok_button = new Button(); ok_button.get_style_context().add_class("suggested-action"); - ok_button.label = "Start"; + ok_button.label = _("Start"); ok_button.sensitive = false; ok_button.visible = true; header_bar.pack_end(ok_button); diff --git a/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala b/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala index 96d44000..10c91c70 100644 --- a/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala +++ b/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala @@ -25,7 +25,7 @@ protected class AddGroupchatDialog : Gtk.Dialog { public AddGroupchatDialog(StreamInteractor stream_interactor) { Object(use_header_bar : 1); this.stream_interactor = stream_interactor; - ok_button.label = "Add"; + ok_button.label = _("Add"); ok_button.get_style_context().add_class("suggested-action"); // TODO why doesn't it work in XML accounts_stack.set_visible_child_name("combobox"); account_combobox.initialize(stream_interactor); @@ -39,7 +39,7 @@ protected class AddGroupchatDialog : Gtk.Dialog { public AddGroupchatDialog.for_conference(StreamInteractor stream_interactor, Account account, Xmpp.Xep.Bookmarks.Conference conference) { this(stream_interactor); edit_confrence = conference; - ok_button.label = "Save"; + ok_button.label = _("Save"); ok_button.sensitive = true; accounts_stack.set_visible_child_name("label"); account_label.label = account.bare_jid.to_string(); diff --git a/main/src/ui/add_conversation/conference/dialog.vala b/main/src/ui/add_conversation/conference/dialog.vala index c035c11d..2da37c08 100644 --- a/main/src/ui/add_conversation/conference/dialog.vala +++ b/main/src/ui/add_conversation/conference/dialog.vala @@ -12,7 +12,7 @@ public class Dialog : Gtk.Dialog { private Stack stack = new Stack(); private Button cancel_button; private Button ok_button; - private Label cancel_label = new Label("Cancel") {visible=true}; + private Label cancel_label = new Label(_("Cancel")) {visible=true}; private Image cancel_image = new Image.from_icon_name("go-previous-symbolic", IconSize.MENU) {visible=true}; private SelectJidFragment select_fragment; @@ -23,7 +23,7 @@ public class Dialog : Gtk.Dialog { public Dialog(StreamInteractor stream_interactor) { Object(use_header_bar : 1); - this.title = "Join Conference"; + this.title = _("Join Conference"); this.modal = true; this.stream_interactor = stream_interactor; @@ -42,7 +42,7 @@ public class Dialog : Gtk.Dialog { cancel_button.add(cancel_label); cancel_button.clicked.disconnect(show_jid_add_view); cancel_button.clicked.connect(on_cancel); - ok_button.label = "Next"; + ok_button.label = _("Next"); ok_button.sensitive = select_fragment.done; ok_button.clicked.disconnect(on_ok_button_clicked); ok_button.clicked.connect(on_next_button_clicked); @@ -57,7 +57,7 @@ public class Dialog : Gtk.Dialog { cancel_button.add(cancel_image); cancel_button.clicked.disconnect(on_cancel); cancel_button.clicked.connect(show_jid_add_view); - ok_button.label = "Join"; + ok_button.label = _("Join"); ok_button.sensitive = details_fragment.done; ok_button.clicked.disconnect(on_next_button_clicked); ok_button.clicked.connect(on_ok_button_clicked); -- cgit v1.2.3-70-g09d2