Patchwork [1,of,4] i18n: avoid substitution of PYFILES at runtime for readability of output

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Aug. 2, 2018, 5:21 p.m.
Message ID <984894e4ad78ef5799a6.1533230509@blacknile>
Download mbox | patch
Permalink /patch/33114/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Aug. 2, 2018, 5:21 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1533211650 -32400
#      Thu Aug 02 21:07:30 2018 +0900
# Node ID 984894e4ad78ef5799a6974d079d45bcf5a64f05
# Parent  2002c193f2bcb07ea898d6229835e7d61bc48aae
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r 984894e4ad78
# EXP-Topic refactor-update-pot
i18n: avoid substitution of PYFILES at runtime for readability of output

This substitution decreases readability of "make update-pot" output,
because PYFILES consists of many files.

This patch makes "make update-pot" show "find mercurial hgext doc
-name '*.py'" instead of many *.py files at runtime.
Yuya Nishihara - Aug. 3, 2018, 1:05 p.m.
On Fri, 03 Aug 2018 02:21:49 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1533211650 -32400
> #      Thu Aug 02 21:07:30 2018 +0900
> # Node ID 984894e4ad78ef5799a6974d079d45bcf5a64f05
> # Parent  2002c193f2bcb07ea898d6229835e7d61bc48aae
> # Available At https://bitbucket.org/foozy/mercurial-wip
> #              hg pull https://bitbucket.org/foozy/mercurial-wip -r 984894e4ad78
> # EXP-Topic refactor-update-pot
> i18n: avoid substitution of PYFILES at runtime for readability of output

Queued 1, 3, 4, thanks.

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@  PYTHON=python
 $(eval HGROOT := $(shell pwd))
 HGPYTHONS ?= $(HGROOT)/build/pythons
 PURE=
-PYFILES:=$(shell find mercurial hgext doc -name '*.py')
+PYFILESCMD=find mercurial hgext doc -name '*.py'
+PYFILES:=$(shell $(PYFILESCMD))
 DOCFILES=mercurial/help/*.txt
 export LANGUAGE=C
 export LC_ALL=C
@@ -145,7 +146,7 @@  i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n
         # parse them even though they are not marked for translation.
         # Extracting with an explicit encoding of ISO-8859-1 will make
         # xgettext "parse" and ignore them.
-	echo $(PYFILES) | xargs \
+	$(PYFILESCMD) | xargs \
 	  xgettext --package-name "Mercurial" \
 	  --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
 	  --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \