Fix doc-pot-filter.sh
doc-pot-filter.sh is prepared to drop numbers from *.csv. Howover, the path of CSV files in POT files were changed from some version of Sphinx (from "doc/source/data/*.csv" to "../../source/data/*.csv") and doc-pot-filter.sh does not work expectedly. This commit adjusts the path of CSV files in POT files. The number of entries in the target POT file (atc-stats.pot) is printed before and after the filter is applied. I believe this helps us debug the similar issue in future if needed. Change-Id: I32d760a735ab1ae491d7e5efb36fd5059da0cd11
This commit is contained in:
parent
5a846dbd43
commit
66888cbd31
@ -22,10 +22,10 @@ set -xe
|
||||
# This script assumes that the script locates in /tools,
|
||||
# and project documentation sources are in /doc/source directory.
|
||||
|
||||
DIRECTORY=doc
|
||||
|
||||
# Exclude atc-stats/data/*.csv from POT file
|
||||
TARGET=doc/build/gettext/atc-stats.pot
|
||||
msgfmt --statistics -o /dev/null ${TARGET}
|
||||
TMPFILE=`mktemp -u`
|
||||
msggrep -v -N "doc/source/data/*.csv" \
|
||||
${DIRECTORY}/build/gettext/atc-stats.pot > $TMPFILE
|
||||
mv -f $TMPFILE ${DIRECTORY}/build/gettext/atc-stats.pot
|
||||
msggrep -v -N "../../source/data/*.csv" ${TARGET} > $TMPFILE
|
||||
mv -f $TMPFILE ${TARGET}
|
||||
msgfmt --statistics -o /dev/null ${TARGET}
|
||||
|
Loading…
x
Reference in New Issue
Block a user