-
Notifications
You must be signed in to change notification settings - Fork 603
Translation: Auto-generate po4a config file #2351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
.. whenever a new squid package is distributed. This fixes issues with outdated config files missing languages to translate and deprecated package name/version details. The file can be regenerated manually with: make -C doc/manuals manuals.conf Used by running po4a in the top-level directory from a git checkout, or release tarball: po4a [--verbose] doc/manuals/manuals.conf
| manuals.conf: Makefile | ||
| ( \ | ||
| echo "[po4a_langs] $(LANGUAGE_FILES)" | sed -e 's%[.]lang%%g'; \ | ||
| echo -n "[options] --no-translations -o groff_code=verbatim "; \ |
There was a problem hiding this comment.
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.
doc/manuals/Makefile.am
Outdated
| echo -n "[options] --no-translations -o groff_code=verbatim "; \ | ||
| echo " --package-name=$(PACKAGE) --package-version=$(VERSION) "; \ | ||
| 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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does make dist already depend on being run from a git repository? If not, please do not introduce that dependency.
| ( \ | ||
| echo "[po4a_langs] $(LANGUAGE_FILES)" | sed -e 's%[.]lang%%g'; \ | ||
| echo -n "[options] --no-translations -o groff_code=verbatim "; \ | ||
| echo " --package-name=$(PACKAGE) --package-version=$(VERSION) "; \ |
There was a problem hiding this comment.
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?
|
|
||
| ## po4a conversion of all doc/manuals man files... | ||
| po4a --no-translations -o groff_code=verbatim --verbose po4a.conf | ||
| po4a --verbose doc/manuals/manuals.conf |
There was a problem hiding this comment.
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.
Co-authored-by: Alex Rousskov <[email protected]>
.. whenever a new squid package is distributed.
This fixes issues with outdated config files
missing languages to translate and deprecated
package name/version details.
The file can be regenerated manually with:
make -C doc/manuals manuals.conf
Used by running po4a in the top-level directory
from a git checkout, or release tarball:
po4a [--verbose] doc/manuals/manuals.conf