po: adopt --no-wrap policy for all translation catalogs - #61
Merged
Conversation
Author
|
@ngosang I will wait for your green signal before merging. |
|
I think #60 Introduced conflicts. |
Adopt --no-wrap as the project-wide formatting policy for translation catalogs, per the discussion in amule-project#59. xgettext / msgmerge / po4a / msgcat all get the appropriate equivalent flag so a local regen produces no-wrap output and the CI drift check normalises the same way. The pot-sync drift comparison in i18n.yml stays wrap-policy-agnostic by design (it normalises both sides through msgcat first); switching from --width=79 to --no-wrap just aligns the knob with the policy. The companion one-shot regeneration of po/*.po and the pot files follows in the next commit.
Output of ./scripts/update-po.sh + (cd docs/man && touch po/manpages-*.po && po4a po4a.config) with the new --no-wrap tooling defaults from the previous commit. Formatting-only change: each msgid/msgstr collapses from multi-line continuation strings to a single line. No translations gained or lost, no fuzzy or obsolete markings introduced, and the rendered docs/man/*.1.in / src/utils/**/*.1.in files are unchanged. docs/man/po/manpages-*.po were already in no-wrap-equivalent form on master, so on the manpages side only docs/man/po/manpages.pot is touched. Drive-by: po/gl.po was 100755 on master (the only .po file with the executable bit set, an old accidental mode). The regen writes through a tempfile + mv and reseats it to 100644, matching every other catalog.
got3nks
force-pushed
the
feat/po-no-wrap-policy
branch
from
June 10, 2026 15:44
99b1aae to
ede3644
Compare
Author
Yes I know, fixed. ;) |
Member
|
Go go go! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopts
--no-wrapas the project-wide formatting policy for all translation catalogs, following the discussion in #59 (@ngosang, @mrjimenez, me — all in agreement). The default 77-char wrap is a TTY-era convention; nobody hand-edits raw.pofiles anymore for a Weblate-managed project, and the wrap mostly buries real translation changes under reflow noise — PR #59's own diff is the canonical example.This PR makes the switch coherent end-to-end on the repo side. The remaining piece — flipping the Weblate components to "Do not wrap long lines" — is on @ngosang after this lands.
Rebased onto master after #60. The pre-#60 version of this PR had identical scope and content.
Tooling changes (commit 1, +24/-7)
scripts/update-po.sh— pass--no-wraptoxgettextandmsgmerge, and rewrite each.povia--output-file=$tmp && mv $tmp $originstead of--update.msgmerge --updatetreats a .po as up-to-date when only the pot's wrap (not its content) has changed and silently skips rewriting, which defeats--no-wrapon any catalog previously committed in wrapped form. The tempfile pattern always rewrites.po/Makevars— add--no-wraptoXGETTEXT_OPTIONSfor symmetry with the legacy autotoolsupdate-potarget (CMake doesn't currently invoke it, but the values stay consistent).docs/man/po4a.config— add--wrap-po noto the global[options]line; po4a's equivalent of gettext's--no-wrapfor the manpages catalogs. Rendered.1.inoutput is unaffected (po4a's content reflow is governed by--width, which we don't touch)..github/workflows/i18n.ymlpot-syncdrift check — simplify the comparison normalisation frommsgcat --width=79tomsgcat --no-wrap. The check stays wrap-policy-agnostic by design (it normalises both sides), but--no-wrapnow matches the policy and is one knob simpler.One-shot normalisation (commit 2, +7626/-21227)
Regenerated
po/amule.pot+ allpo/*.powith the new script (bulk of the diff). Each msgid/msgstr collapses from multi-line continuation strings to a single line. No translations gained or lost, no fuzzy or obsolete markings introduced. Thedocs/man/po/manpages-*.pofiles were already in no-wrap-equivalent form on master, so onlydocs/man/po/manpages.potwas rewritten by the po4a pass; no rendered.1.infile changed.Drive-by:
po/gl.powas 100755 on master (the only.powith the executable bit set, an old accidental mode). The regen writes through a tempfile + mv and reseats it to 100644, matching every other catalog.The drift check (
msgcat --no-wrap, strip volatile headers +#:source refs) passes cleanly across all catalogs locally.Test plan
pofiles,pot-sync,manpages-sync).application+application-man-pagescomponents to "Do not wrap long lines"; next bot PR should be content-only.