Skip to content

Commit

Permalink
Setup gettext
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Jan 7, 2016
1 parent faa99dc commit 6f4f4e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version 0.2.1 - 2016.01.07
* i18n: Setup gettext
* bugfix: Fixed installation directory for locale files

Version 0.2.0 - 2016.01.07
Expand Down
9 changes: 9 additions & 0 deletions src/peek-application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This software is licensed under the GNU General Public License
(version 3 or later). See the LICENSE file in this distribution.
*/

[CCode(cname="GETTEXT_PACKAGE")] extern const string GETTEXT_PACKAGE;

public class PeekApplication : Gtk.Application {

const string APP_ID = "de.uploadedlobster.peek";
Expand Down Expand Up @@ -44,6 +46,13 @@ public class PeekApplication : Gtk.Application {
public override void startup () {
base.startup ();

// Setup gettext
GLib.Intl.setlocale(GLib.LocaleCategory.ALL, "");
GLib.Intl.bindtextdomain (GETTEXT_PACKAGE, null);
GLib.Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
GLib.Intl.textdomain (GETTEXT_PACKAGE);

// Setup app menu
GLib.SimpleAction action;

action = new GLib.SimpleAction ("preferences", null);
Expand Down

0 comments on commit 6f4f4e0

Please sign in to comment.