1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 20:07:36 +00:00

Add i18n basic structure

Closes #3.
This commit is contained in:
Claude Paroz 2018-09-07 09:47:52 +02:00
parent d25101db4a
commit f45e4d613f
6 changed files with 37 additions and 0 deletions

View file

@ -28,9 +28,11 @@ project('call', 'c',
calls_id = 'sm.puri.Calls' calls_id = 'sm.puri.Calls'
calls_homepage = 'https://source.puri.sm/Librem5/calls' calls_homepage = 'https://source.puri.sm/Librem5/calls'
calls_name = meson.project_name()
calls_version = meson.project_version() calls_version = meson.project_version()
subdir('libgdbofono') subdir('libgdbofono')
subdir('po')
subdir('src') subdir('src')
subdir('doc') subdir('doc')
subdir('data') subdir('data')

0
po/LINGUAS Normal file
View file

25
po/POTFILES.in Normal file
View file

@ -0,0 +1,25 @@
src/calls-call-data.c
src/calls-call-display.c
src/calls-call-holder.c
src/calls-call-selector-item.c
src/calls-dummy-call.c
src/calls-dummy-origin.c
src/calls-encryption-indicator.c
src/calls-main-window.c
src/calls-mm-call.c
src/calls-mm-origin.c
src/calls-mm-provider.c
src/calls-new-call-box.c
src/calls-ofono-call.c
src/calls-ofono-object.c
src/calls-ofono-origin.c
src/calls-ofono-provider.c
src/calls-party.c
src/ui/call-display.ui
src/ui/call-selector-item.ui
src/ui/call-window.ui
src/ui/encryption-indicator.ui
src/ui/history-header-bar.ui
src/ui/main-window.ui
src/ui/new-call-box.ui
src/ui/new-call-header-bar.ui

2
po/meson.build Normal file
View file

@ -0,0 +1,2 @@
i18n = import('i18n')
i18n.gettext(calls_name, preset : 'glib')

View file

@ -22,6 +22,7 @@
* *
*/ */
#include <glib/gi18n.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#define HANDY_USE_UNSTABLE_API #define HANDY_USE_UNSTABLE_API
@ -85,6 +86,10 @@ main (int argc,
GtkApplication *app; GtkApplication *app;
int status; int status;
textdomain (GETTEXT_PACKAGE);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
app = gtk_application_new (APP_ID, G_APPLICATION_FLAGS_NONE); app = gtk_application_new (APP_ID, G_APPLICATION_FLAGS_NONE);
g_set_prgname (APP_ID); g_set_prgname (APP_ID);
g_signal_connect (app, "activate", G_CALLBACK (show_window), NULL); g_signal_connect (app, "activate", G_CALLBACK (show_window), NULL);

View file

@ -60,8 +60,11 @@ calls_dummy_sources = ['calls-dummy-call.c', 'calls-dummy-call.h',
'calls-dummy-provider.c', 'calls-dummy-provider.h', 'calls-dummy-provider.c', 'calls-dummy-provider.h',
] ]
prefix = get_option('prefix')
config_data = configuration_data() config_data = configuration_data()
config_data.set_quoted('APP_ID', calls_id) config_data.set_quoted('APP_ID', calls_id)
config_data.set_quoted('GETTEXT_PACKAGE', calls_name)
config_data.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
config_data.set_quoted('PACKAGE_URL', calls_homepage) config_data.set_quoted('PACKAGE_URL', calls_homepage)
config_data.set_quoted('PACKAGE_VERSION', calls_version) config_data.set_quoted('PACKAGE_VERSION', calls_version)
config_data.set_quoted('VCS_TAG', '@VCS_TAG@') config_data.set_quoted('VCS_TAG', '@VCS_TAG@')