Skip to content

Commit

Permalink
Fix locale generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakan Erduman committed Jan 15, 2021
1 parent 968e715 commit 89464f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 31 deletions.
22 changes: 0 additions & 22 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,6 @@ if test x$enable_debug_trace = xyes; then
AC_DEFINE([DEBUG_TRACE], [1], [Set this to 1 to enable full trace debugging.])
fi

AC_DEFUN([ABOOK_EXPAND_PREFIX], [
$1=$2
dnl expanding twice, since from autoconf 2.60 on, $datadir refers to
dnl $datarootdir which in turn refers to $prefix
$1=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix"
eval tmp_abook_prefix=\""[$]$1"\"
eval echo $tmp_abook_prefix
)`
])

ABOOK_EXPAND_PREFIX(abook_localedir, "$datadir/locale")
localedir="\$(datadir)/locale"

AC_ARG_WITH(localedir,
[ --with-localedir=PATH Where the locale files are installed ])
if test "x$with_localedir" != "x"; then
abook_localedir="$with_localedir"
localedir="$with_localedir"
fi

AC_DEFINE_UNQUOTED(LOCALEDIR, "$abook_localedir", [locale directory])
AC_SUBST(localedir)
AM_GLIB_GNU_GETTEXT
# Checks for programs.
AC_PROG_CC
Expand Down
1 change: 1 addition & 0 deletions panel-plugin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ libhamster_la_SOURCES = $(THIRD_PARTY_CODE) $(OWN_CODE)
libhamster_la_CFLAGS = -Wall \
-I$(top_builddir) \
-I$(top_srcdir) \
-DLOCALEDIR=\"$(localedir)\" \
$(GIO_CFLAGS) \
$(GIO_UNIX_CFLAGS) \
$(GLIB_CFLAGS) \
Expand Down
18 changes: 9 additions & 9 deletions po/Makefile.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
DATADIRNAME = @DATADIRNAME@
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
localedir = @localedir@
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
Expand All @@ -46,11 +45,12 @@ INSTALL_DATA = @INSTALL_DATA@

GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
XGETTEXT_ARGS = @XGETTEXT_ARGS@
XGETTEXT = @XGETTEXT@ $(XGETTEXT_ARGS)
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
MSGMERGE = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot

ALL_LINGUAS = @ALL_LINGUAS@

Expand Down Expand Up @@ -80,7 +80,7 @@ INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;

.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
$(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox

.po.mo:
$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
Expand Down Expand Up @@ -108,7 +108,7 @@ install-data-no: all
install-data-yes: all
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
Expand Down Expand Up @@ -142,8 +142,8 @@ install-exec installcheck:
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done

check: all $(GETTEXT_PACKAGE).pot
Expand Down

0 comments on commit 89464f4

Please sign in to comment.