kopia lustrzana https://gitlab.com/sane-project/backends
po: Fix inconsistent word wrapping when using custom width
This fixes test failures run during a `make distcheck` for generated message catalogs for LINGUAS such as `en@boldquot` and `en@quot`.merge-requests/87/head
rodzic
f29e1c88de
commit
2ea6e8eaaa
|
@ -0,0 +1,27 @@
|
|||
Author: Olaf Meeuwissen
|
||||
|
||||
Add custom options to commands used for generate .po files. This
|
||||
fixes word wrapping inconsistencies when using a custom width.
|
||||
|
||||
Do NOT put this file below po/ as all Rules-* files are included
|
||||
in the po/Makefile *verbatim*!
|
||||
|
||||
--- po/Rules-quot.orig 2019-06-30 13:46:34.281392263 +0900
|
||||
+++ po/Rules-quot 2019-06-30 13:49:05.482142027 +0900
|
||||
@@ -22,13 +22,13 @@
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
|
||||
- | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
|
||||
+ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) $(MSGCONV_OPTIONS) -t UTF-8 | \
|
||||
{ case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
|
||||
- $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
|
||||
+ $(MSGFILTER) $(MSGFILTER_OPTIONS) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
|
||||
;; \
|
||||
*) \
|
||||
- $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
|
||||
+ $(MSGFILTER) $(MSGFILTER_OPTIONS) `echo $$lang | sed -e 's/.*@//'` \
|
||||
;; \
|
||||
esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
|
||||
; then \
|
|
@ -4,6 +4,8 @@ test -n "$srcdir" || srcdir=.
|
|||
|
||||
autoreconf --force --install --verbose --warnings=all "$srcdir"
|
||||
patch "$srcdir/ltmain.sh" "$srcdir/ltmain.sh.patch"
|
||||
patch "$srcdir/po/Rules-quot" "$srcdir/Rules-quot.patch"
|
||||
autoreconf "$srcdir"
|
||||
|
||||
# Taken from https://gitlab.com/utsushi/utsushi/blob/master/bootstrap
|
||||
#
|
||||
|
|
15
po/Makevars
15
po/Makevars
|
@ -1,5 +1,5 @@
|
|||
# Makevars -- snippet for inclusion in po/ -*- Makefile -*-
|
||||
# Copyright (C) 2016 Olaf Meeuwissen and the SANE developers
|
||||
# Copyright (C) 2016, 2019 Olaf Meeuwissen and the SANE developers
|
||||
#
|
||||
# This file is part of the SANE build infra-structure. See the
|
||||
# included LICENSE file for license information.
|
||||
|
@ -32,10 +32,17 @@ subdir = po
|
|||
# Options to pass to xgettext and other gettext utilities.
|
||||
# Additional options may also by specified using AM_XGETTEXT_OPTION
|
||||
# in `$(top_srcdir)/configure.ac`. See Makefile.in.in and Rules-*
|
||||
# for variables available
|
||||
XGETTEXT_OPTIONS = --keyword=SANE_I18N
|
||||
# for variables available.
|
||||
XGETTEXT_OPTIONS = $(width_options)
|
||||
XGETTEXT_OPTIONS += --keyword=SANE_I18N
|
||||
XGETTEXT_OPTIONS += --flag=SANE_I18N:1:no-c-format
|
||||
MSGMERGE_OPTIONS = --width=75
|
||||
MSGMERGE_OPTIONS = $(width_options)
|
||||
MSGINIT_OPTIONS = $(width_options)
|
||||
MSGCONV_OPTIONS = $(width_options)
|
||||
MSGFILTER_OPTIONS = $(width_options)
|
||||
# All gettext related utilities need to use the same width value in
|
||||
# order to pass a `make distcheck`.
|
||||
width_options = --width=75
|
||||
|
||||
# Locale categories, in addition to LC_MESSAGES, for which message
|
||||
# catalogs are to be used.
|
||||
|
|
Ładowanie…
Reference in New Issue