Skip to content

Commit

Permalink
l10n: Setup locales correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano committed Oct 5, 2024
1 parent 692897a commit b3da2b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public class Sequeler.Application : Gtk.Application {
application_id = Constants.PROJECT_NAME;
flags |= ApplicationFlags.HANDLES_OPEN;

GLib.Intl.setlocale (LocaleCategory.ALL, "");
GLib.Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, Constants.LOCALEDIR);
GLib.Intl.bind_textdomain_codeset (Constants.GETTEXT_PACKAGE, "UTF-8");
GLib.Intl.textdomain (Constants.GETTEXT_PACKAGE);

schema = new Secret.Schema (Constants.PROJECT_NAME, Secret.SchemaFlags.NONE,
"id", Secret.SchemaAttributeType.INTEGER,
"schema", Secret.SchemaAttributeType.STRING);
Expand Down
1 change: 1 addition & 0 deletions src/config.vala.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace Constants {
public const string PROJECT_NAME = "@PROJECT_NAME@";
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string LOCALEDIR = "@LOCALEDIR@";
public const string VERSION = "@VERSION@";
}
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
conf_data = configuration_data()
conf_data.set('PROJECT_NAME', application_id)
conf_data.set('GETTEXT_PACKAGE', meson.project_name())
conf_data.set('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
conf_data.set('VERSION', meson.project_version())

config_header = configure_file(
Expand Down

0 comments on commit b3da2b6

Please sign in to comment.