mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-02 20:04:15 +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
@@ -1,6 +1,7 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
SUBDIRS = build sk cs ru
|
SUBDIRS = build @MANLANGDIRS@
|
||||||
|
DIST_SUBDIRS = build cs ru sk
|
||||||
|
|
||||||
dist_man_MANS = \
|
dist_man_MANS = \
|
||||||
geticonset.1 \
|
geticonset.1 \
|
||||||
|
|||||||
25
doc/build/Translations.texi
vendored
25
doc/build/Translations.texi
vendored
@@ -448,6 +448,31 @@ You may find some information on working with @code{po} file in the
|
|||||||
@uref{https://www.gnu.org/software/gettext/manual/html_node/Editing.html,GNU gettext documentation}.
|
@uref{https://www.gnu.org/software/gettext/manual/html_node/Editing.html,GNU gettext documentation}.
|
||||||
|
|
||||||
|
|
||||||
|
@c --------------------------------------------------------------------- Translate the Man Pages ---
|
||||||
|
@section Translate the Man Pages
|
||||||
|
|
||||||
|
You may want to extend the translation to the documentation that is provided to users in the form
|
||||||
|
of Unix @i{man pages}.
|
||||||
|
The sources of the man pages are located in the @file{doc/} directory;
|
||||||
|
the translation should be placed in the directory @file{doc/@i{lang}/} with the same file name.
|
||||||
|
|
||||||
|
The directory will also need a file @file{Makefile.am} which provides the list of man pages to be
|
||||||
|
included in the distribution package and to be installed.
|
||||||
|
You can probably get inspiration from an existing one from another language;
|
||||||
|
if you do not feel confident about it do not hesitate to ask on the project's mailing list
|
||||||
|
(@value{emailsupport}), either for help or to ask someone to make it for you.
|
||||||
|
|
||||||
|
Please note that although most man pages sources are directly in man page format
|
||||||
|
(@emph{nroff}, the file extension being a number), a few of them are processed by a script
|
||||||
|
(those with the @file{.in} extension, like @file{wmaker.in}).
|
||||||
|
This is done because in some case we want the man page to reflect the actual compilation options.
|
||||||
|
|
||||||
|
You may not want to bother with this hassle, in which case you can simply name your translation
|
||||||
|
file with the @file{.1} and remove the special @code{@@keyword@@} marks.
|
||||||
|
If you are sure you want to keep that processing but do not feel confident about hacking the
|
||||||
|
@file{Makefile.am} do not hesitate to ask on the project's mailing list (@value{emailsupport}).
|
||||||
|
|
||||||
|
|
||||||
@c ------------------------------------------------------------------------- Checking the Result ---
|
@c ------------------------------------------------------------------------- Checking the Result ---
|
||||||
@section Checking the Result
|
@section Checking the Result
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ AS_IF([test "x$LINGUAS" != "x"],
|
|||||||
wmaker_locales=" m4_esyscmd([ls po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
|
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' ' '])"
|
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' ' '])"
|
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
|
# 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
|
# 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
|
for lang in $LINGUAS; do
|
||||||
found=0
|
found=0
|
||||||
wm_missing=""
|
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],
|
[AS_IF([echo "$[]m4_tolower(REGION)[]_locales" | grep " $lang " > /dev/null],
|
||||||
[m4_toupper(REGION)MOFILES="$[]m4_toupper(REGION)MOFILES $lang.mo"
|
[m4_toupper(REGION)MOFILES="$[]m4_toupper(REGION)MOFILES $lang.mo"
|
||||||
found=1],
|
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 in $wm_missing])]) ],
|
||||||
[AC_MSG_WARN([locale $lang is not supported at all, ignoring])])
|
[AC_MSG_WARN([locale $lang is not supported at all, ignoring])])
|
||||||
done
|
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=""
|
[INTLIBS=""
|
||||||
WINGSMOFILES=""
|
WINGSMOFILES=""
|
||||||
WMAKERMOFILES=""
|
WMAKERMOFILES=""
|
||||||
WPREFSMOFILES=""
|
WPREFSMOFILES=""
|
||||||
UTILMOFILES=""
|
UTILMOFILES=""
|
||||||
|
MANLANGDIRS=""
|
||||||
supported_locales=" disabled"])
|
supported_locales=" disabled"])
|
||||||
dnl
|
dnl
|
||||||
dnl The variables that are used in the Makefiles:
|
dnl The variables that are used in the Makefiles:
|
||||||
@@ -110,6 +116,7 @@ AC_SUBST([WINGSMOFILES])dnl
|
|||||||
AC_SUBST([WMAKERMOFILES])dnl
|
AC_SUBST([WMAKERMOFILES])dnl
|
||||||
AC_SUBST([WPREFSMOFILES])dnl
|
AC_SUBST([WPREFSMOFILES])dnl
|
||||||
AC_SUBST([UTILMOFILES])dnl
|
AC_SUBST([UTILMOFILES])dnl
|
||||||
|
AC_SUBST([MANLANGDIRS])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user