From 237c09966cc05f5aeeedfd93ef342dc8ff52eba2 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 1 Sep 2024 19:04:08 +0300 Subject: Gettextize and add Russian translation This is a very shitty translation, but it can be improved later. I added it mostly as a test for translations working correctly, since I know Russian and might as well translate the app into the language. --- src/components/smart_summary.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components/smart_summary.rs') diff --git a/src/components/smart_summary.rs b/src/components/smart_summary.rs index fbfc80b..9da67af 100644 --- a/src/components/smart_summary.rs +++ b/src/components/smart_summary.rs @@ -1,4 +1,5 @@ use adw::prelude::*; +use gettextrs::*; use relm4::{gtk, prelude::{Component, ComponentParts}, ComponentSender}; #[derive(Debug, Default)] @@ -42,7 +43,8 @@ impl Component for SmartSummaryButton { connect_clicked => Input::ButtonPressed, #[watch] set_sensitive: !model.busy, - set_tooltip_markup: Some("Smart Summary\nAsk a language model for a single-sentence summary."), + // TRANSLATORS: please keep the newline and `` tags + set_tooltip_markup: Some(gettext("Smart Summary\nAsk a language model for a single-sentence summary.")).as_deref(), if model.busy { gtk::Spinner { set_spinning: true } -- cgit 1.4.1