App/Build: Use env! macro to fetch the variable

env! is resolved at compile time which means we don't need to read
and set LOCALDI from build.rs
This commit is contained in:
Jordan Petridis
2018-08-28 17:22:13 +03:00
parent 0ae1eb9578
commit 15457e1db4
2 changed files with 1 additions and 19 deletions
+1 -3
View File
@@ -30,8 +30,6 @@ use i18n::i18n;
pub(crate) const APP_ID: &str = "org.gnome.Podcasts";
include!(concat!(env!("OUT_DIR"), "/build_globals.rs"));
/// Creates an action named `name` in the action map `T with the handler `F`
fn action<T, F>(thing: &T, name: &str, action: F)
where
@@ -377,7 +375,7 @@ impl App {
pub(crate) fn run() {
// Set up the textdomain for gettext
setlocale(LocaleCategory::LcAll, "");
bindtextdomain("gnome-podcasts", LOCALEDIR);
bindtextdomain("gnome-podcasts", env!("LOCALEDIR"));
textdomain("gnome-podcasts");
let application = gtk::Application::new(APP_ID, gio::ApplicationFlags::empty())