Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

l10n: Setup locales correctly #393

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
l10n: Setup locales correctly
ryonakano committed Oct 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ae816ae9d1f1eba5312daff49875eddd1ea1c572
5 changes: 5 additions & 0 deletions src/Application.vala
Original file line number Diff line number Diff line change
@@ -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);
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(