Skip to content

Commit

Permalink
Deals with differing Windows/Linux directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
amkillam committed Mar 14, 2023
1 parent 244071a commit 6d1158e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/config.rs.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pub static VERSION: &str = @VERSION@;
pub static GETTEXT_PACKAGE: &str = @GETTEXT_PACKAGE@;
pub static LOCALEDIR: &str = @LOCALEDIR@;
pub static PKGDATADIR: &str = @PKGDATADIR@;
pub static LOCALEDIR: &str = "./locale";
pub static PKGDATADIR: &str = "./amberol";
pub static APPLICATION_ID: &str = @APPLICATION_ID@;
pub static PROFILE: &str = @PROFILE@;
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ mod window;

use std::env;

use config::{APPLICATION_ID, GETTEXT_PACKAGE, LOCALEDIR, PKGDATADIR, PROFILE};
use gettextrs::{bind_textdomain_codeset, bindtextdomain, setlocale, textdomain, LocaleCategory};
use config::{APPLICATION_ID, GETTEXT_PACKAGE, PKGDATADIR, PROFILE};
use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
use gtk::{gio, glib, prelude::*};
use log::{debug, error, LevelFilter};

Expand All @@ -39,7 +39,6 @@ fn main() {
debug!("Setting up locale data");
setlocale(LocaleCategory::LcAll, "");

// bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect("Unable to bind the text domain");
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8")
.expect("Unable to set the text domain encoding");
textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain");
Expand Down

0 comments on commit 6d1158e

Please sign in to comment.