Skip to content

Commit

Permalink
gettext build rules tweaks
Browse files Browse the repository at this point in the history
* Add --qt to xgettext options so that %1, %2 etc are recognised in format strings
  (as used by Glib::ustring::format)
* Remove references to non-existent sed script from darkradiant.pot-update
  rules.
  • Loading branch information
Matthew Mott committed Nov 9, 2010
1 parent e97380c commit d125760
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions install/i18n/Makefile.in.in
Expand Up @@ -66,7 +66,7 @@ POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
DISTFILES.common = Makefile.in.in \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
Expand Down Expand Up @@ -137,7 +137,7 @@ stamp-po: $(srcdir)/$(DOMAIN).pot

# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in
if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
package_gnu='GNU '; \
else \
Expand Down Expand Up @@ -168,8 +168,8 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
esac
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
cat < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
cat < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
Expand Down Expand Up @@ -335,7 +335,6 @@ check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:

mostlyclean:
rm -f remove-potcdate.sed
rm -f stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
Expand Down
2 changes: 1 addition & 1 deletion install/i18n/Makevars
Expand Up @@ -8,7 +8,7 @@ subdir = install/i18n
top_builddir = ../..

# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --qt

# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
Expand Down

0 comments on commit d125760

Please sign in to comment.