1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-01 21:45:45 +01:00

WRaster: Create structure to make the library translatable

The library did not propose the mechanisms to be translated, this patch is
creating the structure in autoconf/automake and the translation directory
so its messages can be also translated.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2021-05-17 16:32:10 +02:00
committed by Carlos R. Mafra
parent fbec3a728f
commit aadd694a6b
6 changed files with 102 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ AC_DEFUN_ONCE([WM_I18N_LANGUAGES],
[AC_ARG_VAR([LINGUAS],
[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
[m4_esyscmd([( ls wrlib/po/ ; 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
@@ -66,6 +66,7 @@ AS_IF([test "x$LINGUAS" != "x"],
supported_locales=""
# This is the list of locales that our archive currently supports
wraster_locales=" m4_esyscmd([ls wrlib/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
wings_locales=" m4_esyscmd([ls WINGs/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' ' '])"
@@ -81,7 +82,7 @@ AS_IF([test "x$LINGUAS" != "x"],
for lang in $LINGUAS; do
found=0
wm_missing=""
m4_foreach([REGION], [WINGs, wmaker, WPrefs, util, man],
m4_foreach([REGION], [WRaster, 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],
@@ -103,6 +104,7 @@ AS_IF([test "x$LINGUAS" != "x"],
MANLANGDIRS="`echo $MANMOFILES | sed -e 's,\.mo,,g' `"
],
[INTLIBS=""
WRASTERMOFILES=""
WINGSMOFILES=""
WMAKERMOFILES=""
WPREFSMOFILES=""
@@ -112,6 +114,7 @@ AS_IF([test "x$LINGUAS" != "x"],
dnl
dnl The variables that are used in the Makefiles:
AC_SUBST([INTLIBS])dnl
AC_SUBST([WRASTERMOFILES])dnl
AC_SUBST([WINGSMOFILES])dnl
AC_SUBST([WMAKERMOFILES])dnl
AC_SUBST([WPREFSMOFILES])dnl