-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 "; \ | ||
| echo " --package-name=$(PACKAGE) --package-version=$(VERSION) "; \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
If I change the above details (e.g., modify |
||
| 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 \ | ||
| ) >$@ | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please post a "diff" showing the differences between the old |
||
|
|
||
| ( | ||
| 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 | ||
|
|
||
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
echomanual page on MacOS, we should avoidecho -n. I recommend merging the twoecholines instead of using-nto split them. The mergedechocommand will be longer, of course, but not prohibitively long.