mirror of
https://github.com/videolan/vlc.git
synced 2024-11-23 09:53:43 +08:00
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
This commit is contained in:
parent
8909317baf
commit
e8b6a9324d
@ -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
|
||||
|
18
po/meson.build
Normal file
18
po/meson.build
Normal file
@ -0,0 +1,18 @@
|
||||
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',
|
||||
])
|
Loading…
Reference in New Issue
Block a user