mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-06 05:44:11 +01:00
doc: do not install translated man pages if the language was not enabled in LINGUAS
When people cherry-pick the languages they want to install, they certainly do not care for man pages in other languages. So, instead of always installing them, the configure script will now automatically detect which ones need to be installed. Took opportunity to add a section in the I18N manual to invite contributors to think about the man pages if contribute to translations. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
0a009143c3
commit
d6d165c29d
@@ -70,6 +70,7 @@ AS_IF([test "x$LINGUAS" != "x"],
|
||||
wmaker_locales=" m4_esyscmd([ls po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
|
||||
wprefs_locales=" m4_esyscmd([ls WPrefs.app/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
|
||||
util_locales=" m4_esyscmd([ls util/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
|
||||
man_locales=" m4_esyscmd([ls doc/ | grep '^[a-z][a-z]\(_[A-Z][A-Z]\)*$' | tr '\n' ' '])"
|
||||
|
||||
# If the LINGUAS is specified as a simple '*', then we enable all the languages
|
||||
# we know. This is not standard, but it is useful is some cases
|
||||
@@ -80,7 +81,7 @@ AS_IF([test "x$LINGUAS" != "x"],
|
||||
for lang in $LINGUAS; do
|
||||
found=0
|
||||
wm_missing=""
|
||||
m4_foreach([REGION], [WINGs, wmaker, WPrefs, util],
|
||||
m4_foreach([REGION], [WINGs, wmaker, WPrefs, util, man],
|
||||
[AS_IF([echo "$[]m4_tolower(REGION)[]_locales" | grep " $lang " > /dev/null],
|
||||
[m4_toupper(REGION)MOFILES="$[]m4_toupper(REGION)MOFILES $lang.mo"
|
||||
found=1],
|
||||
@@ -96,12 +97,17 @@ AS_IF([test "x$LINGUAS" != "x"],
|
||||
[AC_MSG_WARN([locale $lang is not supported in $wm_missing])]) ],
|
||||
[AC_MSG_WARN([locale $lang is not supported at all, ignoring])])
|
||||
done
|
||||
#
|
||||
# Post-processing the names for the man pages because we are not expecting
|
||||
# a "po" file but a directory name in this case
|
||||
MANLANGDIRS="`echo $MANMOFILES | sed -e 's,\.mo,,g' `"
|
||||
],
|
||||
[INTLIBS=""
|
||||
WINGSMOFILES=""
|
||||
WMAKERMOFILES=""
|
||||
WPREFSMOFILES=""
|
||||
UTILMOFILES=""
|
||||
MANLANGDIRS=""
|
||||
supported_locales=" disabled"])
|
||||
dnl
|
||||
dnl The variables that are used in the Makefiles:
|
||||
@@ -110,6 +116,7 @@ AC_SUBST([WINGSMOFILES])dnl
|
||||
AC_SUBST([WMAKERMOFILES])dnl
|
||||
AC_SUBST([WPREFSMOFILES])dnl
|
||||
AC_SUBST([UTILMOFILES])dnl
|
||||
AC_SUBST([MANLANGDIRS])dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user