po: Add basic translation support

The messages in the polkit policy file need translating.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23858
This commit is contained in:
Philip Withnall 2018-09-24 15:41:10 +01:00
parent 79a4c41eee
commit b97d101db6
6 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,10 @@
install_data('com.endlessm.ParentalControls.policy', i18n.merge_file('com.endlessm.ParentalControls.policy',
install_dir: polkitpolicydir) input: 'com.endlessm.ParentalControls.policy.in',
output: 'com.endlessm.ParentalControls.policy',
po_dir: po_dir,
install: true,
install_dir: polkitpolicydir,
)
install_data('com.endlessm.ParentalControls.AppFilter.xml', install_data('com.endlessm.ParentalControls.AppFilter.xml',
install_dir: dbusinterfacesdir) install_dir: dbusinterfacesdir)

View File

@ -9,9 +9,11 @@ project('eos-parental-controls', 'c',
] ]
) )
i18n = import('i18n')
pkgconfig = import('pkgconfig') pkgconfig = import('pkgconfig')
meson_make_symlink = join_paths(meson.source_root(), 'tools', 'meson-make-symlink.sh') meson_make_symlink = join_paths(meson.source_root(), 'tools', 'meson-make-symlink.sh')
po_dir = join_paths(meson.source_root(), 'po')
prefix = get_option('prefix') prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir')) datadir = join_paths(prefix, get_option('datadir'))

0
po/LINGUAS Normal file
View File

3
po/POTFILES.in Normal file
View File

@ -0,0 +1,3 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
accounts-service/com.endlessm.ParentalControls.policy

1
po/meson.build Normal file
View File

@ -0,0 +1 @@
i18n.gettext('eos-parental-controls', preset: 'glib')