Initialize gettext
This commit is contained in:
@ -36,8 +36,6 @@ add_project_arguments(
|
|||||||
|
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
|
|
||||||
conf_data = configuration_data()
|
|
||||||
|
|
||||||
if get_option('buildtype').startswith('debug')
|
if get_option('buildtype').startswith('debug')
|
||||||
add_project_arguments('-DDEBUG=1', language : 'c')
|
add_project_arguments('-DDEBUG=1', language : 'c')
|
||||||
endif
|
endif
|
||||||
@ -63,6 +61,7 @@ endif
|
|||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
bindir = join_paths(prefix, get_option('bindir'))
|
bindir = join_paths(prefix, get_option('bindir'))
|
||||||
datadir = join_paths(prefix, get_option('datadir'))
|
datadir = join_paths(prefix, get_option('datadir'))
|
||||||
|
localedir = join_paths(prefix, get_option('localedir'))
|
||||||
desktopdir = join_paths(datadir, 'applications')
|
desktopdir = join_paths(datadir, 'applications')
|
||||||
pkgdatadir = join_paths(datadir, meson.project_name())
|
pkgdatadir = join_paths(datadir, meson.project_name())
|
||||||
if get_option('depdatadir') == ''
|
if get_option('depdatadir') == ''
|
||||||
@ -72,6 +71,10 @@ else
|
|||||||
endif
|
endif
|
||||||
dbusdir = join_paths(depdatadir, 'dbus-1/interfaces')
|
dbusdir = join_paths(depdatadir, 'dbus-1/interfaces')
|
||||||
|
|
||||||
|
conf_data = configuration_data()
|
||||||
|
conf_data.set_quoted('GETTEXT_PACKAGE', 'squeekboard')
|
||||||
|
conf_data.set_quoted('LOCALEDIR', localedir)
|
||||||
|
|
||||||
summary = [
|
summary = [
|
||||||
'',
|
'',
|
||||||
'------------------',
|
'------------------',
|
||||||
@ -114,6 +117,7 @@ cargo_script = find_program('cargo.sh')
|
|||||||
cargo_build = find_program('cargo_build.py')
|
cargo_build = find_program('cargo_build.py')
|
||||||
|
|
||||||
subdir('data')
|
subdir('data')
|
||||||
|
subdir('po')
|
||||||
subdir('protocols')
|
subdir('protocols')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('tools')
|
subdir('tools')
|
||||||
|
|||||||
0
po/LINGUAS
Normal file
0
po/LINGUAS
Normal file
1
po/POTFILES.in
Normal file
1
po/POTFILES.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
data/popup.ui
|
||||||
2
po/meson.build
Normal file
2
po/meson.build
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
i18n = import('i18n')
|
||||||
|
i18n.gettext('squeekboard', preset : 'glib')
|
||||||
@ -2,3 +2,9 @@
|
|||||||
* Autogenerated by the Meson build system.
|
* Autogenerated by the Meson build system.
|
||||||
* Do not edit, your changes will be lost.
|
* Do not edit, your changes will be lost.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#mesondefine GETTEXT_PACKAGE
|
||||||
|
|
||||||
|
#mesondefine LOCALEDIR
|
||||||
|
|||||||
@ -326,6 +326,10 @@ main (int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
|
|
||||||
if (!gtk_init_check (&argc, &argv)) {
|
if (!gtk_init_check (&argc, &argv)) {
|
||||||
g_printerr ("Can't init GTK\n");
|
g_printerr ("Can't init GTK\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|||||||
Reference in New Issue
Block a user