Three lang/ msgids never resolve, and nothing checks the msgid pairing#617
Merged
Conversation
xroche
force-pushed
the
fix-lang-integrity
branch
from
July 17, 2026 04:48
340e017 to
55be9ba
Compare
lang/*.txt are consecutive line pairs, an English msgid then its translation, and nothing validates that shape. Finnish.txt had ended with a blank line since 2012, which was harmless while it was the last line; #588 appended new strings after it, so the blank became an interior line and knocked every pair past it out of phase. All 14 strings #588 added to Finnish, plus the CONNECT proxy one from 938a873, were keyed off a translation instead of an msgid and rendered as English. Drop the blank. Italiano and Portugues-Brasil each carry one msgid that matches nothing in English.txt ("ISO 9660" for "ISO9660", "Relative URL" for "Relative URI"), so those two entries never resolved either. The test is the point: it rebuilds the msgid set from English.txt and checks every file pairs against it, byte-wise, since each file is in its own legacy charset. It also checks lang.def's English values, which are the join key into the msgids. It fails on all three defects before this change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
The engine continues a msgid ending in \ onto the next line; the test does not. Latent today: no lang line ends in one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
xroche
force-pushed
the
fix-lang-integrity
branch
from
July 17, 2026 05:26
55be9ba to
0cd7b0b
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.
lang/*.txtare consecutive line pairs, an English msgid then its translation, and nothing validates that shape.Finnish.txthad ended with a blank line since 2012, which was harmless while it was the last line. #588 appended new strings after it, so the blank became interior and knocked every pair past it out of phase: all 14 strings #588 added to Finnish, one of which 938a873 later reworded into the CONNECT proxy string, were keyed off a translation instead of an msgid and rendered as English. Dropping the blank restores the phase. Italiano and Portugues-Brasil separately each carry one msgid that matches nothing inEnglish.txt(ISO 9660forISO9660,Relative URLforRelative URI), so those two entries never resolved either.The test matters more than the three fixes. It rebuilds the msgid set from
English.txtand checks every file against it byte-wise, since each file is in its own declared legacy charset andlang.defis CRLF. It also checkslang.def's English values, which are the join key into the msgids, so rewording one without moving the msgids no longer silently drops all 30 translations. Both parses assert a floor on what they extracted, so a parse that breaks fails instead of passing on an empty set. On unfixed master it reports all three defects with line numbers; it passes here.It does not check translation text, empty translations, or a file missing trailing entries, since a partial translation is legitimate and common. It also does not check the declared
LANGUAGE_CHARSET: Latin-1 and Latin-2 decode any byte sequence, so a decode check would pass vacuously and could never catch the known-wrong Svenska header.Context for #306 (Turkish), which needs the msgid join to be sound, but does not close it.