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.cu...@free.fr> --- doc/Makefile.am | 3 ++- doc/build/Translations.texi | 25 +++++++++++++++++++++++++ m4/wm_i18n.m4 | 9 ++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 500e33a..a79d68c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,7 @@ ## 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 = \ geticonset.1 \ diff --git a/doc/build/Translations.texi b/doc/build/Translations.texi index 427aec2..b2faa43 100644 --- a/doc/build/Translations.texi +++ b/doc/build/Translations.texi @@ -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}. +@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 --- @section Checking the Result diff --git a/m4/wm_i18n.m4 b/m4/wm_i18n.m4 index eb742e6..307481e 100644 --- a/m4/wm_i18n.m4 +++ b/m4/wm_i18n.m4 @@ -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 ]) -- 2.1.4 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.