diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2020-06-02 13:58:07 +0200 |
---|---|---|
committer | Romain Bouvier <skunnyk@alteroot.org> | 2020-06-04 19:54:45 +0200 |
commit | bc9a62e08bdbd1460917e2eb44577ad472026738 (patch) | |
tree | 0fcac6801142fee30476c098b7e69880745aa767 /m4macros | |
parent | 0628ba009c530cb0a0d1440ea4ebb551a6425103 (diff) | |
download | xfce4-dev-tools-bc9a62e08bdbd1460917e2eb44577ad472026738.tar.gz |
Let XDT_I18N automatically find the po/*.po as default
Make the LINGUAS argument optional and let it be auto generated from
po/*.po if is not specified.
Diffstat (limited to 'm4macros')
-rw-r--r-- | m4macros/xdt-i18n.m4 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/m4macros/xdt-i18n.m4 b/m4macros/xdt-i18n.m4 index b296647..4335dd6 100644 --- a/m4macros/xdt-i18n.m4 +++ b/m4macros/xdt-i18n.m4 @@ -23,10 +23,13 @@ dnl Internalization M4 macros. dnl -dnl XDT_I18N(LINGUAS [, PACKAGE]) +dnl XDT_I18N([LINGUAS][, PACKAGE]) dnl dnl This macro takes care of setting up everything for i18n support. dnl +dnl If LINGUAS isn't specified, it will automatically extract the linguas +dnl from po/*.po. +dnl dnl If PACKAGE isn't specified, it defaults to the package tarname; see dnl the description of AC_INIT() for an explanation of what makes up dnl the package tarname. Normally, you don't need to specify PACKAGE, @@ -40,7 +43,10 @@ AC_DEFUN([XDT_I18N], AC_SUBST([GETTEXT_PACKAGE]) dnl gettext and stuff - ALL_LINGUAS="$1" + ALL_LINGUAS="m4_ifblank( + [$1], + [esyscmd([echo $(for i in po/*.po; do test -e "$i" && basename -- "$i" .po; done) | tr -d '\n'])], + [$1])" AM_GLIB_GNU_GETTEXT() dnl This is required on some Linux systems |