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/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index d906a66..d7dd0a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,13 @@ static GLIB_LOGGER: glib::GlibLogger = glib::GlibLogger::new( ); fn main() { + gettextrs::bindtextdomain( + env!("CARGO_PKG_NAME"), + env!("LOCALEDIR") + ).expect("failed to bind text domain"); + gettextrs::bind_textdomain_codeset(env!("CARGO_PKG_NAME"), "UTF-8").unwrap(); + gettextrs::textdomain(env!("CARGO_PKG_NAME")).unwrap(); + log::set_logger(&GLIB_LOGGER).unwrap(); log::set_max_level(log::LevelFilter::Debug); -- cgit 1.4.1