1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-26 08:22:37 +01:00
Files
wmaker/po/Makefile.am
Christophe CURIS 80e00c3521 configure: rewrote the support for languages in localisation
The code was moved to a dedicated file (wm_i18n.m4) to reduce the size of
configure.ac;

It now searches for gettext+libintl only if LINGUAS is specified, because
there is no need for them otherwise;

The list of supported locales is created automatically from the list of
files present in the source tree, so there won't be problem forgetting to
update the variables when a new language is added, or removed because
one is considered outdated;

The new syntax is now using as much as possible Autoconf's syntax to ensure
consistency and better portability;

Took opportunity to improve the language check loop to make it smaller and
to tell when a locale that the user asked for is not fully supported.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00

106 lines
3.1 KiB
Makefile

DOMAIN = WindowMaker
nlsdir = $(NLSDIR)
CATALOGS = @WMAKERMOFILES@
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
# Please keep this sorted in alphabetic order!
EXTRA_DIST = be.po bg.po bs.po ca.po cs.po da.po de.po el.po es.po et.po \
fi.po fr.po gl.po hr.po hu.po hy.po it.po ja.po ko.po ms.po nl.po \
no.po pl.po pt.po ro.po ru.po sk.po sv.po tr.po zh_CN.po zh_TW.po
POTFILES = \
$(top_srcdir)/src/actions.c \
$(top_srcdir)/src/appicon.c \
$(top_srcdir)/src/application.c \
$(top_srcdir)/src/appmenu.c \
$(top_srcdir)/src/balloon.c \
$(top_srcdir)/src/client.c \
$(top_srcdir)/src/colormap.c \
$(top_srcdir)/src/cycling.c \
$(top_srcdir)/src/defaults.c \
$(top_srcdir)/src/dialog.c \
$(top_srcdir)/src/dock.c \
$(top_srcdir)/src/dockedapp.c \
$(top_srcdir)/src/event.c \
$(top_srcdir)/src/framewin.c \
$(top_srcdir)/src/geomview.c \
$(top_srcdir)/src/icon.c \
$(top_srcdir)/src/main.c \
$(top_srcdir)/src/menu.c \
$(top_srcdir)/src/misc.c \
$(top_srcdir)/src/monitor.c \
$(top_srcdir)/src/motif.c \
$(top_srcdir)/src/moveres.c \
$(top_srcdir)/src/osdep_bsd.c \
$(top_srcdir)/src/osdep_darwin.c \
$(top_srcdir)/src/osdep_linux.c \
$(top_srcdir)/src/osdep_stub.c \
$(top_srcdir)/src/pixmap.c \
$(top_srcdir)/src/placement.c \
$(top_srcdir)/src/properties.c \
$(top_srcdir)/src/resources.c \
$(top_srcdir)/src/rootmenu.c \
$(top_srcdir)/src/screen.c \
$(top_srcdir)/src/session.c \
$(top_srcdir)/src/shutdown.c \
$(top_srcdir)/src/stacking.c \
$(top_srcdir)/src/startup.c \
$(top_srcdir)/src/superfluous.c \
$(top_srcdir)/src/switchpanel.c \
$(top_srcdir)/src/switchmenu.c \
$(top_srcdir)/src/texture.c \
$(top_srcdir)/src/usermenu.c \
$(top_srcdir)/src/wcore.c \
$(top_srcdir)/src/wdefaults.c \
$(top_srcdir)/src/window.c \
$(top_srcdir)/src/winmenu.c \
$(top_srcdir)/src/winspector.c \
$(top_srcdir)/src/wmspec.c \
$(top_srcdir)/src/workspace.c \
$(top_srcdir)/src/wsmap.c \
$(top_srcdir)/src/xdnd.c \
$(top_srcdir)/src/xinerama.c \
$(top_srcdir)/src/xmodifier.c \
$(top_srcdir)/src/xutil.c
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
all-local: $(CATALOGS)
$(DOMAIN).pot: $(POTFILES)
xgettext --default-domain=$(DOMAIN) \
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
rm -f $(DOMAIN).po; \
else \
mv -f $(DOMAIN).po $(DOMAIN).pot; \
fi
install-data-local: $(CATALOGS)
$(mkinstalldirs) $(DESTDIR)$(nlsdir)
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
fi; \
done
# Create a 'silent rule' for our make check the same way automake does
AM_V_CHKTRANS = $(am__v_CHKTRANS_$(V))
am__v_CHKTRANS_ = $(am__v_CHKTRANS_$(AM_DEFAULT_VERBOSITY))
am__v_CHKTRANS_0 = @echo " CHK translations" ;
am__v_CHKTRANS_1 =
# 'make check' will make sure the tranlation sources are in line with the compiled source
check-local:
$(AM_V_CHKTRANS)$(top_srcdir)/script/check-translation-sources.sh \
"$(srcdir)" -s "$(top_srcdir)/src/Makefile.am" -v wmaker_SOURCES