Files
httrack/lang
Xavier Roche 088f0711b8 Three lang/ msgids never resolve, and nothing checks the msgid pairing (#617)
* Fix three broken msgids in lang/ and assert the pairing in a test

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>

* Renumber the lang integrity test to 62

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>

* Note the test's physical-line assumption

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>

---------

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 07:44:19 +02:00
..

Translating HTTrack

Interface strings live here, one .txt file per language. English.txt is the reference: every other file maps each English string to its translation.

File format

Plain text, entries in consecutive pairs of lines:

<English string>
<translation>

The first line of a pair is the lookup key and must stay identical to the one in English.txt; translate only the second line. Missing entries fall back to the English text at runtime, so a partial translation works.

Preserve any \r\n, \t and printf placeholders (%s, %d, ...) in the translation.

A few LANGUAGE_* entries at the top describe the file itself:

Key Meaning
LANGUAGE_NAME Name shown in the language picker, in its own language (Deutsch, not German)
LANGUAGE_ISO ISO 639 code, with region if needed (de, pt_BR)
LANGUAGE_CHARSET Encoding the file is saved in (ISO-8859-1, windows-1251, UTF-8, ...)
LANGUAGE_AUTHOR Your name and contact
LANGUAGE_WINDOWSID Windows locale name used by WinHTTrack (German (Standard))

Save the file in exactly its declared LANGUAGE_CHARSET; an editor that rewrites it as UTF-8 will corrupt the non-ASCII bytes.

Adding or updating a language

  1. Copy English.txt to <Language>.txt, or edit the existing file.
  2. Translate each second line; leave the English keys untouched.
  3. Fill in the LANGUAGE_* header for a new file.
  4. Open a pull request, or attach the file to a GitHub issue.

When new strings land in English.txt they show up untranslated (as English) until a translator fills them in.