summary refs log tree commit diff
path: root/src/components/smart_summary.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-09-01 19:04:08 +0300
committerVika <vika@fireburn.ru>2024-09-04 19:51:50 +0300
commit237c09966cc05f5aeeedfd93ef342dc8ff52eba2 (patch)
treef59bfe86bbec5c92056f0a8f27e46073e10792af /src/components/smart_summary.rs
parentf8d61d957d4a2d086f4b97f2e3d7d19d0bb35f13 (diff)
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.
Diffstat (limited to 'src/components/smart_summary.rs')
-rw-r--r--src/components/smart_summary.rs4
1 files changed, 3 insertions, 1 deletions
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("<b>Smart Summary</b>\nAsk a language model for a single-sentence summary."),
+            // TRANSLATORS: please keep the newline and `<b>` tags
+            set_tooltip_markup: Some(gettext("<b>Smart Summary</b>\nAsk a language model for a single-sentence summary.")).as_deref(),
 
             if model.busy {
                 gtk::Spinner { set_spinning: true }