diff options
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. |