From c05bb7cc82b25ced4d33a02e9be488dd81abbe42 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sun, 18 Feb 2024 22:44:49 +0300 Subject: [PATCH] RR: Translate Language page --- po/en_US.po | 14 +++++++++++++- src/language_page/mod.rs | 14 +++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/po/en_US.po b/po/en_US.po index f72547c..6f96a30 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -136,4 +136,16 @@ msgid "fstab_bad_mountpoint" msgstr "Filesystem Table Error: Invalid mountpoint: (" msgid "fstab_bad_mountpoint_msg" -msgstr ") Is not a valid mountpoint!" \ No newline at end of file +msgstr ") Is not a valid mountpoint!" + +msgid "select_a_language" +msgstr "Select a language" + +msgid "please_select_locale" +msgstr "Please select a locale for the system to use" + +msgid "no_locale_selected" +msgstr "No locale selected" + +msgid "language" +msgid "Language" \ No newline at end of file diff --git a/src/language_page/mod.rs b/src/language_page/mod.rs index 2712301..d21373c 100644 --- a/src/language_page/mod.rs +++ b/src/language_page/mod.rs @@ -27,7 +27,7 @@ pub fn language_page(content_stack: >k::Stack) { // Next and back button let bottom_back_button = gtk::Button::builder() - .label("Back") + .label(gettext("back")) .margin_top(15) .margin_bottom(15) .margin_start(15) @@ -36,7 +36,7 @@ pub fn language_page(content_stack: >k::Stack) { .hexpand(true) .build(); let bottom_next_button = gtk::Button::builder() - .label("Next") + .label(gettext("next")) .margin_top(15) .margin_bottom(15) .margin_start(15) @@ -66,7 +66,7 @@ pub fn language_page(content_stack: >k::Stack) { // the header text for the language page let language_header_text = gtk::Label::builder() - .label("Select a language") + .label(gettext("select_a_language")) .halign(gtk::Align::End) .hexpand(true) .margin_top(15) @@ -106,7 +106,7 @@ pub fn language_page(content_stack: >k::Stack) { // text above language selection box let language_selection_text = gtk::Label::builder() - .label("Please select a locale for the system to use") + .label(gettext("please_select_locale")) .halign(gtk::Align::Center) .hexpand(true) .margin_top(15) @@ -117,11 +117,11 @@ pub fn language_page(content_stack: >k::Stack) { language_selection_text.add_css_class("medium_sized_text"); let language_selection_expander_row = adw::ExpanderRow::builder() - .title("No locale selected") + .title(gettext("no_locale_selected")) .build(); let null_checkbutton = gtk::CheckButton::builder() - .label("No locale selected") + .label(gettext("no_locale_selected")) .build(); let language_selection_expander_row_viewport = @@ -213,7 +213,7 @@ pub fn language_page(content_stack: >k::Stack) { // / Content stack appends //// Add the language_main_box as page: language_page, Give it nice title - content_stack.add_titled(&language_main_box, Some("language_page"), "Language"); + content_stack.add_titled(&language_main_box, Some("language_page"), &gettext("language")); let lang_data_buffer_clone = lang_data_buffer.clone();