It's 3.30.2 release day, upload a tarball and fix that hidden pesky bug that you missed in .1 🦛

Commit ea0dfa00 authored by Eisha Chen-yen-su's avatar Eisha Chen-yen-su

App: Add the definition of the text domain

This adds the definition of the text domain used by gettext to
translate the strings of the user interface. gettext will search for
a package named "fractal" in the directory "./fractal-gtk/po". Thus
MO files containing the translations must be found in
"./fractal-gtk/po/[LANG]/LC_MESSAGES/fractal.mo".

Closes World/fractal#89
parent 60367530
extern crate gtk;
extern crate gdk;
extern crate gettextrs;
use self::gtk::prelude::*;
use self::gettextrs::{setlocale, LocaleCategory, bindtextdomain, textdomain};
use std::env;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::channel;
......@@ -79,6 +81,12 @@ impl App {
let bk = Backend::new(tx);
let apptx = bk.run();
// Set up the textdomain for gettext
setlocale(LocaleCategory::LcAll, "");
bindtextdomain("fractal", "./fractal-gtk/po");
textdomain("fractal");
let ui = uibuilder::UI::new();
let window: gtk::Window = ui.builder
.get_object("main_window")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment