0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

build: add translation support to build system

This commit is contained in:
MusiKid 2022-01-23 14:21:08 +01:00 committed by musikid
parent a12908e7e8
commit 9d61c0bc20
No known key found for this signature in database
GPG key ID: 7567D43648C6E2F4
4 changed files with 14 additions and 0 deletions

View file

@ -5,6 +5,9 @@ inih_cpp = dependency('INIReader', fallback: ['inih', 'INIReader_dep'])
libpam = meson.get_compiler('cpp').find_library('pam')
threads = dependency('threads')
# Translations
subdir('po')
shared_library(
'pam_howdy',
'main.cc',

0
src/pam/po/LINGUAS Normal file
View file

1
src/pam/po/POTFILES Normal file
View file

@ -0,0 +1 @@
main.cc

10
src/pam/po/meson.build Normal file
View file

@ -0,0 +1,10 @@
i18n = import('i18n')
# define GETTEXT_PACKAGE and LOCALEDIR
gettext_package = '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name())
localedir = '-DLOCALEDIR="@0@"'.format(get_option('prefix') / get_option('localedir'))
add_project_arguments(gettext_package, localedir, language: 'cpp')
i18n.gettext(meson.project_name(),
args: [ '--directory=' + meson.source_root(), '--keyword=S:1' ]
)