Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ EXTRA_DIST = \
QUICKSTART \
README \
SPONSORS \
bootstrap.sh \
po4a.conf
bootstrap.sh

install-pinger:
chown root $(DESTDIR)$(DEFAULT_PINGER)
Expand Down
17 changes: 16 additions & 1 deletion doc/manuals/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,19 @@
include $(srcdir)/language.am

EXTRA_DIST = \
language.am
language.am \
manuals.conf

DISTCLEANFILES = manuals.conf

manuals.conf: Makefile
( \
echo "[po4a_langs] $(LANGUAGE_FILES)" | sed -e 's%[.]lang%%g'; \
echo -n "[options] --no-translations -o groff_code=verbatim "; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to 2024 commit 9732312 and echo manual page on MacOS, we should avoid echo -n. I recommend merging the two echo lines instead of using -n to split them. The merged echo command will be longer, of course, but not prohibitively long.

echo " --package-name=$(PACKAGE) --package-version=$(VERSION) "; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to avoid hard-coding Squid version in one more versioned controlled file (i.e. manuals.conf)? Perhaps we can keep these two options in scripts/update-pot.sh?

PR description: This fixes issues with outdated config files missing languages to translate and deprecated package name/version details.

If I change the above details (e.g., modify AC_INIT in configure.ac), bootstrap, configure, and build Squid, but do not run make dist or equivalent, then versioned manuals.conf would remain stale, right? What would prevent me from running scripts/update-pot.sh that would then use stale manuals.conf?

echo "[po4a_paths] doc/manuals/manuals.pot \$$lang:doc/manuals/\$$lang.po"; \
for fname in `cd $(top_srcdir) ; git ls-files '*.8' '*.8.in'`; do \
manp=`basename $${fname}`; \
echo "[type: man] $${fname} \$$lang:doc/manuals/\$$lang/$${manp}"; \
done \
) >$@
3 changes: 0 additions & 3 deletions doc/po4a.cnf

This file was deleted.

45 changes: 0 additions & 45 deletions po4a.conf

This file was deleted.

22 changes: 1 addition & 21 deletions scripts/update-pot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,11 @@ cd ..

## begin doc/manuals updates

# Build the po4a.conf
cat doc/po4a.cnf >po4a.conf
for f in `ls -1 \
src/*.8.in \
src/auth/*/*/*.8 \
src/acl/external/*/*.8 \
src/http/url_rewriters/*/*.8 \
src/log/*/*.8 \
src/security/*/*/*.8 \
src/security/*/*/*.8.in \
src/src/store/id_rewriters/*/*.8 \
tools/*/*.1 \
tools/*.8.in \
` ; do
echo "" >>po4a.conf
manp=`basename ${f}`
echo "[type: man] ${f} \$lang:doc/manuals/\$lang/${manp}" >>po4a.conf
done

## po4a conversion of all doc/manuals man files...
po4a --no-translations -o groff_code=verbatim --verbose po4a.conf
po4a --verbose doc/manuals/manuals.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please post a "diff" showing the differences between the old po4a.conf file and the new manuals.conf file (both generated in the same representative build environment). Please instruct diff to Ignore differences in space and empty lines.


(
cat doc/manuals/manuals.pot |
sed s/PACKAGE\ VERSION/Squid-5/ |
sed s/LANGUAGE\ \<LL\@li\.org\>/Squid\ Developers\ \<squid-dev\@lists.squid-cache\.org\>/
) >doc/manuals/manuals.pot.tmp
mv doc/manuals/manuals.pot.tmp doc/manuals/manuals.pot
Expand Down
Loading