Skip to content
Snippets Groups Projects
Commit e8b6a932 authored by Marvin Scholz's avatar Marvin Scholz Committed by Jean-Baptiste Kempf
Browse files

meson: add gettext support

While runtime gettext support was already working,
this adds the missing piece of build integrations.

With these changes, three new targets are now available
to manage translation files:

- vlc-pot: Regenerates the .pot files using xgettext
- vlc-update-po: Regenerates the .po files from the current .pot files
- vlc-gmo: Builds (but not installs) the translations
parent 8909317b
No related branches found
No related tags found
1 merge request!3478meson: add gettext support
Pipeline #328943 passed with stages
in 25 minutes and 7 seconds
......@@ -173,6 +173,8 @@ intl_dep = dependency('intl', required: get_option('nls'))
if intl_dep.found()
cdata.set('HAVE_GETTEXT', 1)
cdata.set('ENABLE_NLS', 1)
subdir('po')
endif
# Domain name i18n support via GNU libidn
......
i18n = import('i18n')
add_project_arguments(f'-DGETTEXT_PACKAGE="@vlc_package_name@"',
language: ['c', 'cpp', 'objc'])
i18n.gettext(vlc_package_name,
args: [
'--keyword=_',
'--keyword=N_',
'--keyword=_NS',
'--keyword=qtr',
'--keyword=Q_',
'--language=C++',
'--keyword=vlc_ngettext:1,2',
'--keyword=vlc_pgettext:1c,2',
'--keyword=_PNS:1c,2',
'--add-comments=xgettext:',
'--from-code=UTF-8',
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment