diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-03-23 20:52:55 +0100 |
|---|---|---|
| committer | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-04-05 00:31:21 +0200 |
| commit | ef32d65ac1852da581ac75d20f903dbcb2d0b5cd (patch) | |
| tree | 98cdb79c471babd906368d23171fe10168c18062 /src/i18n.rs | |
| parent | dae5942e2ad1ac59f6217ad0f8e0bd630d0b4747 (diff) | |
Use meson as a build system
Diffstat (limited to 'src/i18n.rs')
| -rw-r--r-- | src/i18n.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/i18n.rs b/src/i18n.rs index 35955a1..03c30c3 100644 --- a/src/i18n.rs +++ b/src/i18n.rs @@ -16,11 +16,9 @@ //! Internationalization support using gettext. +use crate::info; use gettextrs::{LocaleCategory, bindtextdomain, setlocale, textdomain}; -/// The gettext domain for the application. -pub const GETTEXT_DOMAIN: &str = "systems.tranquil.Map"; - /// Initializes the localization system. pub fn init() { setlocale(LocaleCategory::LcAll, ""); @@ -38,12 +36,12 @@ pub fn init() { for dir in &locale_dirs { if std::path::Path::new(dir).exists() { - let _ = bindtextdomain(GETTEXT_DOMAIN, *dir); + let _ = bindtextdomain(info::GETTEXT_DOMAIN, *dir); break; } } - textdomain(GETTEXT_DOMAIN).ok(); + textdomain(info::GETTEXT_DOMAIN).ok(); } /// Macro for translating strings at runtime. |