diff options
-rw-r--r-- | Makefile.in | 11 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | build-aux/lookup-locale | 18 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | help2man.PL | 2 |
5 files changed, 36 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index bd5d18d..52ac86f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,13 +33,14 @@ LINGUAS_TEXI = $(basename $(notdir $(wildcard $(srcdir)/po-texi/*.po))) CC = @CC@ PERL = @PERL@ LIBS = @LIBS@ -FIND_VPATH = $(auxdir)/find-vpath +FIND_VPATH = $(auxdir)/find-vpath # locate a file in $VPATH MKINSTALLDIRS = $(auxdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ +LOOKUP_LOCALE = $(auxdir)/lookup-locale # get full locale from extension MAKEINFO = @MAKEINFO@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ @@ -174,8 +175,7 @@ $(target).%.1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL \ $(target).%.h2m: $(srcdir)/$(target).h2m.PL $(srcdir)/po/%.po set -e; \ lang=$(patsubst $(target).%.h2m,%,$@); \ - locale=$$(echo $$lang $$lang | \ - sed -n "/^$$lang"'\s/{s/^\S\+\s\+//p; q}' $(srcdir)/locales -); \ + locale=$$($(LOOKUP_LOCALE) $$lang $(srcdir)/locales); \ $(MAKE) localetmp/$$lang/LC_MESSAGES/$(target).mo; \ $(PERL) $(srcdir)/$(target).h2m.PL --locale="$$locale" \ --message-dir=localetmp --output=$@ @@ -186,7 +186,10 @@ $(target).info: $(srcdir)/$(target).texi info_l10n: $(addprefix $(target)-,$(addsuffix .info,$(LINGUAS_TEXI))) $(target)-%.info: $(target)-%.texi - $(MAKEINFO) $? -o $@.tmp + set -e; \ + lang=$(patsubst $(target)-%.info,%,$@); \ + locale=$$($(LOOKUP_LOCALE) $$lang $(srcdir)/locales); \ + $(MAKEINFO) --output=$@.tmp --document-language="$$locale" $? $(FIXUP_TEXI_TRANS) -o $@ $@.tmp rm -f $@.tmp @@ -1,3 +1,7 @@ +Version 1.47 June 8, 2015 + + * Set document language for localised info pages. + Version 1.46 July 7, 2014 * Add German, Ukranian and Polish translations of info documentation. diff --git a/build-aux/lookup-locale b/build-aux/lookup-locale new file mode 100755 index 0000000..2909f6a --- /dev/null +++ b/build-aux/lookup-locale @@ -0,0 +1,18 @@ +#!/bin/sh + +# Return the full locale using the $(srcdir)/locales map. + +case $# in + 1) MAP=locales;; + 2) MAP="$2";; + *) echo "Usage: lookup-locale ABBR [MAP]" >&2; exit 2 +esac + +while read abbr locale +do + [ x"$abbr" = "x$1" ] && exec echo "$locale" +done < "$MAP" + +# Punt. +echo "$1" + diff --git a/debian/changelog b/debian/changelog index 80fa32f..7cc832d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +help2man (1.47.1) unstable; urgency=medium + + * Set document language for localised info pages. + + -- Brendan O'Dea <bod@debian.org> Mon, 08 Jun 2015 19:58:54 +1000 + help2man (1.46.6) unstable; urgency=medium * Add Danish translation (thanks to Joe Hansen). diff --git a/help2man.PL b/help2man.PL index cefed06..664cc47 100755 --- a/help2man.PL +++ b/help2man.PL @@ -16,7 +16,7 @@ use 5.008; use Config; use Getopt::Long; -my ($program, $version) = ('help2man', '1.46.6'); +my ($program, $version) = ('help2man', '1.47.1'); my %opts; die "Usage: $0 [--quiet] [--stdout] [--with-gettext] [--name] [--version]\n" |