From 48e828089925c8ce83ee0aff533f2f7569a50eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Thu, 8 Feb 2018 11:53:17 +0100 Subject: [PATCH] Migrate from Intltool to Gettext Recent versions of Gettext are able to translate several formats that are used in GNOME applications. This patch migrates from Intltool to Gettext by using meson's i18n features. https://bugs.freedesktop.org/show_bug.cgi?id=104273 --- data/meson.build | 4 ++-- data/org.freedesktop.accounts.policy.in | 16 ++++++++-------- meson.build | 5 ----- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/data/meson.build b/data/meson.build index 21a4dc4..aa5f303 100644 --- a/data/meson.build +++ b/data/meson.build @@ -28,11 +28,11 @@ configure_file( policy = 'org.freedesktop.accounts.policy' -custom_target( +i18n.merge_file( policy, input: policy + '.in', output: policy, - command: intltool_xml_cmd, + po_dir: po_dir, install: true, install_dir: polkit_dir ) diff --git a/data/org.freedesktop.accounts.policy.in b/data/org.freedesktop.accounts.policy.in index d149399..0169ae8 100644 --- a/data/org.freedesktop.accounts.policy.in +++ b/data/org.freedesktop.accounts.policy.in @@ -8,8 +8,8 @@ stock_person - <_description>Change your own user data - <_message>Authentication is required to change your own user data + Change your own user data + Authentication is required to change your own user data yes yes @@ -18,8 +18,8 @@ - <_description>Change your own user password - <_message>Authentication is required to change your own user password + Change your own user password + Authentication is required to change your own user password auth_admin auth_admin @@ -28,8 +28,8 @@ - <_description>Manage user accounts - <_message>Authentication is required to change user data + Manage user accounts + Authentication is required to change user data auth_admin auth_admin @@ -38,8 +38,8 @@ - <_description>Change the login screen configuration - <_message>Authentication is required to change the login screen configuration + Change the login screen configuration + Authentication is required to change the login screen configuration auth_admin auth_admin diff --git a/meson.build b/meson.build index 3af4ba3..a1c5e6d 100644 --- a/meson.build +++ b/meson.build @@ -195,11 +195,6 @@ pkg = import('pkgconfig') data_dir = join_paths(meson.source_root(), 'data') po_dir = join_paths(meson.source_root(), 'po') -intltool_merge = find_program('intltool-merge') -intltool_cache = join_paths(po_dir, '.intltool-merge-cache') -intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@'] -intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@'] - top_inc = include_directories('.') subdir('data') -- 2.16.1