mirror of
https://github.com/elementary/gala.git
synced 2024-11-20 11:06:59 +03:00
l10n: Correctly setup the locales
This commit is contained in:
parent
3006f63231
commit
605aa10ea2
@ -134,6 +134,11 @@ namespace Gala {
|
||||
}
|
||||
|
||||
public static int main (string[] args) {
|
||||
GLib.Intl.setlocale (LocaleCategory.ALL, "");
|
||||
GLib.Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
|
||||
GLib.Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
|
||||
GLib.Intl.textdomain (Config.GETTEXT_PACKAGE);
|
||||
|
||||
Gtk.init (ref args);
|
||||
|
||||
var ctx = new OptionContext ("Gala Daemon");
|
||||
|
@ -7,5 +7,6 @@ gala_daemon_bin = executable(
|
||||
'gala-daemon',
|
||||
gala_daemon_sources,
|
||||
dependencies: [gala_dep, gala_base_dep],
|
||||
include_directories: config_inc_dir,
|
||||
install: true,
|
||||
)
|
||||
|
@ -22,12 +22,15 @@ endif
|
||||
|
||||
vapi_dir = meson.current_source_dir() / 'vapi'
|
||||
|
||||
locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
|
||||
data_dir = join_paths(get_option('prefix'), get_option('datadir'))
|
||||
plugins_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'plugins')
|
||||
pkgdata_dir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
||||
pkglib_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||
conf.set_quoted('LOCALEDIR', locale_dir)
|
||||
conf.set_quoted('DATADIR', data_dir)
|
||||
conf.set_quoted('PKGDATADIR', pkgdata_dir)
|
||||
conf.set_quoted('PLUGINDIR', plugins_dir)
|
||||
|
@ -27,6 +27,11 @@ namespace Gala {
|
||||
}
|
||||
|
||||
public static int main (string[] args) {
|
||||
GLib.Intl.setlocale (LocaleCategory.ALL, "");
|
||||
GLib.Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
|
||||
GLib.Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
|
||||
GLib.Intl.textdomain (Config.GETTEXT_PACKAGE);
|
||||
|
||||
unowned OptionContext ctx = Meta.get_option_context ();
|
||||
ctx.add_main_entries (Gala.OPTIONS, null);
|
||||
try {
|
||||
|
@ -18,6 +18,8 @@
|
||||
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
|
||||
namespace Config
|
||||
{
|
||||
public const string GETTEXT_PACKAGE;
|
||||
public const string LOCALEDIR;
|
||||
public const string DATADIR;
|
||||
public const string PKGDATADIR;
|
||||
public const string VERSION;
|
||||
|
Loading…
Reference in New Issue
Block a user