diff options
author | Vika <vika@fireburn.ru> | 2024-09-01 19:04:08 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-09-04 19:51:50 +0300 |
commit | 237c09966cc05f5aeeedfd93ef342dc8ff52eba2 (patch) | |
tree | f59bfe86bbec5c92056f0a8f27e46073e10792af /src/main.rs | |
parent | f8d61d957d4a2d086f4b97f2e3d7d19d0bb35f13 (diff) | |
download | bowl-237c09966cc05f5aeeedfd93ef342dc8ff52eba2.tar.zst |
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/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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); |