fix(i18n): use a real newline in comment dialog tooltip string - #70
Merged
Merged
Conversation
The tooltip in src/muuli_wdr.cpp:705 contained double-escaped backslashes (\\n\\n), so the string holds literal backslash-n characters and the UI shows "\n\n" as text instead of a line break. It was also the only msgid in the catalog with a literal backslash-n, which broke the gettext/Weblate round-trip: Weblate's serializer (translate-toolkit) wraps PO lines after any \n escape sequence -- including the one inside a literal backslash-n -- even in "wrap only at newlines" mode, while gettext --no-wrap keeps it on one line. Every Weblate PR rewrapped this entry in all translated languages as a result. Replace it with a real newline, migrate msgid/msgstr in-place in all catalogs (no translation goes fuzzy) and regenerate with scripts/update-po.sh. Rendering verified with wxGTK 3.2.10.
ngosang
force-pushed
the
fix/i18n-literal-backslash-n
branch
from
June 11, 2026 05:31
959e4c3 to
4a4d40a
Compare
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
The comment-dialog tooltip in
src/muuli_wdr.cpp:705contained double-escaped backslashes (\\n\\n), so the string holds literal backslash-n characters and the UI shows\n\nas plain text instead of a line break.It was also the only msgid in the whole catalog with a literal backslash-n, and it is the root cause of the line-rewrapping churn in Weblate PRs (e.g. #66): Weblate's PO serializer (translate-toolkit
quoteforpo) breaks lines after any\nescape sequence — including the one inside a literal backslash-n — even with the "wrap lines only at newlines" add-on setting, whilegettext --no-wrapkeeps it on one line. So every Weblate sync rewrapped this entry in every translated language, and the next repo-sideupdate-po.shrun unwrapped it again (ping-pong).Changes
src/muuli_wdr.cpp:\\n\\n→\n(a real line break in the tooltip).po/*.po+po/amule.pot: migrated the affected msgid/msgstr in-place (this entry is the only occurrence of a literal backslash-n) so no translation goes fuzzy, then regenerated withscripts/update-po.sh.Verification
msgfmt -cpasses on all 37 catalogs.--no-wrapoutput, including a forced re-quote of the affected unit — Weblate will no longer rewrap it.TTM_SETMAXTIPWIDTH), and aMule already ships another\ntooltip since 3.0.0 (src/muuli_wdr.cpp:1567).POT-Creation-Dateheader.Note: this touches the same lines as the pending Weblate PR #66, so merge order matters — easiest is to merge #66 first, lock the Weblate components, rebase this branch (the conflict resolution is trivial), merge, then unlock.