diff --git a/src/pam/meson.build b/src/pam/meson.build index fe2d09a..465e543 100644 --- a/src/pam/meson.build +++ b/src/pam/meson.build @@ -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', diff --git a/src/pam/po/LINGUAS b/src/pam/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/src/pam/po/POTFILES b/src/pam/po/POTFILES new file mode 100644 index 0000000..11b5c00 --- /dev/null +++ b/src/pam/po/POTFILES @@ -0,0 +1 @@ +main.cc \ No newline at end of file diff --git a/src/pam/po/meson.build b/src/pam/po/meson.build new file mode 100644 index 0000000..762f7a4 --- /dev/null +++ b/src/pam/po/meson.build @@ -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' ] +) \ No newline at end of file