Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 doc/build/Translations.texi | 28 ++++++++++++++++++++++++++++
 m4/wm_i18n.m4               |  7 +++++++
 2 files changed, 35 insertions(+)

diff --git a/doc/build/Translations.texi b/doc/build/Translations.texi
index 60f705f..f7a7d66 100644
--- a/doc/build/Translations.texi
+++ b/doc/build/Translations.texi
@@ -115,6 +115,34 @@ The installation directory can be changed with the 
standard option @option{--loc
 @file{@emph{<prefix>}/share/locale/@emph{<lang>}/LC_MESSAGES}).
 
 
+@c ----------------------------------------------------------------- List of 
supported Languages ---
+@section Getting the list of supported languages
+
+The naming convention for the languages follows the @cite{ISO 639-1} standard,
+for which you can find a summary list in the
+@uref{https://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html,
 GNU gettext manual}.
+
+But as @sc{Window Maker} does not support all of them, the @command{configure} 
script will print a
+warning for each language you specify that it does not know, and sum up at the 
end the list of
+enabled languages that will be installed.
+
+There is a non-standard possibility to set @env{LINGUAS} to @code{list}, in 
which case the
+@command{configure} script will provide you the list of languages it supports, 
and stop:
+
+@example
+./configure LINGUAS="list"
+@end example
+
+There is also another non-standard possibility to enable all the languages 
that @sc{Window Maker}
+supports by setting @env{LINGUAS} to @code{*}.
+This is an internal trick implemented so the development team can have the 
command
+@command{make distcheck} include some checks on translations:
+
+@example
+./configure LINGUAS='*'
+@end example
+
+
 @c ---------------------------------------------------------------------- 
Translations for Menus ---
 @section Translations for Menus
 
diff --git a/m4/wm_i18n.m4 b/m4/wm_i18n.m4
index e7f52f8..eb742e6 100644
--- a/m4/wm_i18n.m4
+++ b/m4/wm_i18n.m4
@@ -38,6 +38,13 @@ AC_DEFUN_ONCE([WM_I18N_LANGUAGES],
     [list of language translations to support (I18N), use 'list' to get the 
list of supported languages, default: none])dnl
 AC_DEFUN([WM_ALL_LANGUAGES],
     [m4_esyscmd([( ls WINGs/po/ ; ls po/ ; ls WPrefs.app/po/ ; ls util/po/ ) | 
sed -n -e '/po$/{s,\.po,,;p}' | sort -u | tr '\n' ' '])])dnl
+dnl We 'divert' the macro to have it executed as soon as the option list have
+dnl been processed, so the list of locales will be printed after the configure
+dnl options have been parsed, but before any test have been run
+m4_divert_text([INIT_PREPARE],
+    [AS_IF([test "x$LINGUAS" = "xlist"],
+        [AS_ECHO(["Supported languages: WM_ALL_LANGUAGES"])
+         AS_EXIT([0])]) ])dnl
 AS_IF([test "x$LINGUAS" != "x"],
     [wm_save_LIBS="$LIBS"
      AC_SEARCH_LIBS([gettext], [intl], [],
-- 
2.1.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to