Commit 86b73821 authored by Eisha Chen-yen-su's avatar Eisha Chen-yen-su

Initial commit

parents
/target
**/*.rs.bk
Cargo.lock
[package]
name = "gettext-gtk-rs"
version = "0.1.0"
authors = ["Eisha CHEN-YEN-SU <chenyensu0@gmail.com>"]
[dependencies]
gettext-rs = { git = "https://github.com/Koka/gettext-rs", features = ["gettext-system"] }
[dependencies.gtk]
features = ["v3_22"]
version = "0.4.0"
# French translations for PACKAGE package.
# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Eisha <eisha@ernesto>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-15 19:16+0200\n"
"PO-Revision-Date: 2018-05-15 19:17+0200\n"
"Last-Translator: Eisha <eisha@ernesto>\n"
"Language-Team: French\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: ../src/main.rs:19
msgid "A label from the source code"
msgstr "Une étiquette du code source"
#: ../ui/main_window.glade:7
msgid "A window title from Glade"
msgstr "Un titre de fenêtre de Glade"
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-15 19:16+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/main.rs:19
msgid "A label from the source code"
msgstr ""
#: ../ui/main_window.glade:7
msgid "A window title from Glade"
msgstr ""
extern crate gtk;
extern crate gettextrs;
use gtk::prelude::*;
use gettextrs::*;
fn main() {
setlocale(LocaleCategory::LcAll, "");
bindtextdomain("test", "./po");
textdomain("test");
gtk::init().unwrap();
let window: gtk::Window = gtk::Builder::new_from_file("./ui/main_window.glade")
.get_object("main_window").expect("Failed to load the main window");
// UI initialization
let label = gtk::Label::new(gettext("A label from the source code").as_str());
window.add(&label);
window.show_all();
window.connect_delete_event(|_, _| {
gtk::main_quit();
Inhibit(false)
});
gtk::main();
}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="main_window">
<property name="can_focus">False</property>
<property name="title" translatable="yes">A window title from Glade</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>
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