diff --git a/data/popup.ui b/data/popup.ui index 9e76694d..214fbea6 100644 --- a/data/popup.ui +++ b/data/popup.ui @@ -1,19 +1,12 @@ - + - - - False - - - True - False - vertical - - - main - 1 - - - + +
+ + Keyboard Settings + settings + +
+
diff --git a/debian/squeekboard.install b/debian/squeekboard.install index 7f2df323..801d057c 100644 --- a/debian/squeekboard.install +++ b/debian/squeekboard.install @@ -1,2 +1,3 @@ tools/squeekboard-restyled usr/bin usr/bin/squeekboard /usr/bin +usr/share/locale/ diff --git a/meson.build b/meson.build index 342eccaa..37a3499e 100644 --- a/meson.build +++ b/meson.build @@ -36,8 +36,6 @@ add_project_arguments( i18n = import('i18n') -conf_data = configuration_data() - if get_option('buildtype').startswith('debug') add_project_arguments('-DDEBUG=1', language : 'c') endif @@ -63,6 +61,7 @@ endif prefix = get_option('prefix') bindir = join_paths(prefix, get_option('bindir')) datadir = join_paths(prefix, get_option('datadir')) +localedir = join_paths(prefix, get_option('localedir')) desktopdir = join_paths(datadir, 'applications') pkgdatadir = join_paths(datadir, meson.project_name()) if get_option('depdatadir') == '' @@ -72,6 +71,10 @@ else endif 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 = [ '', '------------------', @@ -114,6 +117,7 @@ cargo_script = find_program('cargo.sh') cargo_build = find_program('cargo_build.py') subdir('data') +subdir('po') subdir('protocols') subdir('src') subdir('tools') diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 00000000..7673daa9 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +de diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 00000000..3641d8d1 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +data/popup.ui diff --git a/po/de.po b/po/de.po new file mode 100644 index 00000000..fba9fe73 --- /dev/null +++ b/po/de.po @@ -0,0 +1,22 @@ +# German translations for squeekboard package. +# Copyright (C) 2021 THE squeekboard'S COPYRIGHT HOLDER +# This file is distributed under the same license as the squeekboard package. +# Automatically generated, 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: squeekboard\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-03 18:41+0100\n" +"PO-Revision-Date: 2021-12-03 18:41+0100\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: data/popup.ui:15 +msgid "Keyboard Settings" +msgstr "Tastatureinstellungen" diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 00000000..897abe46 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +i18n = import('i18n') +i18n.gettext('squeekboard', preset : 'glib') diff --git a/src/config.h.in b/src/config.h.in index ae878778..d7afccff 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -2,3 +2,9 @@ * Autogenerated by the Meson build system. * Do not edit, your changes will be lost. */ + +#pragma once + +#mesondefine GETTEXT_PACKAGE + +#mesondefine LOCALEDIR diff --git a/src/server-main.c b/src/server-main.c index 55d2df04..32923e8a 100644 --- a/src/server-main.c +++ b/src/server-main.c @@ -326,6 +326,10 @@ main (int argc, char **argv) return 1; } + textdomain (GETTEXT_PACKAGE); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + if (!gtk_init_check (&argc, &argv)) { g_printerr ("Can't init GTK\n"); exit (1);