1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-13 20:35:54 +01:00

configure: rewrote the support for option '--with-menu-textdomain'

The idea is to include consistency check to warn the user if he is not
using it properly, instead of silently misbehaving;

Updated code style to use Autoconf macros for consistency.

Took opportunity to remove the hacky setting inside 'config-paths.h' where
it is a bit out of place, in favour of a standard DEFINE in the 'config.h'.

Include in the i18n documentation the explanation on how Window Maker
translates the menus, both when the 'menu-textdomain' option is used and
when it is not.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2015-01-20 22:04:02 +01:00
committed by Carlos R. Mafra
parent bf6bc120a5
commit f222a319b1
4 changed files with 60 additions and 17 deletions

View File

@@ -113,3 +113,25 @@ AS_IF([test "x$XGETTEXT" != "x"],
XGETTEXT=""]))
AM_CONDITIONAL([HAVE_XGETTEXT], [test "x$XGETTEXT" != "x"])dnl
])
# WM_I18N_MENUTEXTDOMAIN
# ----------------------
#
# This option allows user to define a special Domain for translating
# Window Maker's menus. This can be useful because distributions may
# wish to customize the menus, and thus can make them translatable
# with their own po/mo files without having to touch WMaker's stuff.
AC_DEFUN_ONCE([WM_I18N_MENUTEXTDOMAIN],
[AC_ARG_WITH([menu-textdomain],
[AS_HELP_STRING([--with-menu-textdomain=DOMAIN],
[specify gettext domain used for menu translations])],
[AS_CASE([$withval],
[yes], [AC_MSG_ERROR([you are supposed to give a domain name for '--with-menu-textdomain'])],
[no], [menutextdomain=""],
[menutextdomain="$withval"])],
[menutextdomain=""])
AS_IF([test "x$menutextdomain" != "x"],
[AC_DEFINE_UNQUOTED([MENU_TEXTDOMAIN], ["$menutextdomain"],
[gettext domain to be used for menu translations]) ])
])