Skip to content

fix(it-hilfe, abos): the H1 still listed keywords, and a price wrapped - #386

Closed
catomean wants to merge 1 commit into
mainfrom
fix/it-hilfe-h1-and-price
Closed

fix(it-hilfe, abos): the H1 still listed keywords, and a price wrapped#386
catomean wants to merge 1 commit into
mainfrom
fix/it-hilfe-h1-and-price

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

Both found by loading the pages at 390px, not by reading them. Follow-on to #385, which came out of the same viewport pass.

/it-hilfe kept the old headline

#382 reframed this surface off "kostenlose Community-Reparatur" — meta title, meta description, subtitle, tagline. It missed the thing a visitor actually reads first: the H1 still said "Computer reparieren, OS neu installieren, IT-Probleme lösen", a keyword list written for search engines rather than for the person holding a broken laptop.

It now reads "Jemanden finden, der es repariert" under the eyebrow "Techniker finden".

That is word-for-word the homepage pillar's link text, and deliberately so: click the pillar, land on a page whose headline is the phrase you clicked. Same sentence in two places — but as information scent between pages, which is the opposite of the duplication #385 removed, where it appeared twice within one screen.

A price wrapped

"CHF 300.00" broke across two lines on a 390px pool card — 56px tall where a one-line price is 28px. A wrapped price reads as a layout bug rather than as a number. It's whitespace-nowrap tabular-nums now; the service title beside it gives way instead, which is the right thing to yield.

Observed, deliberately not changed

The two live pools are "Claude Max" (CHF 50) and "Supergrok Heavy" (CHF 300) — both AI subscriptions — tagged Software and Sonstiges, because they predate the ai category added in #381. The filter chips derive from categories that existing pools use, so no "KI" chip renders and the page can't yet demonstrate the point its own headline makes. New pools default to ai; re-tagging those two is a one-field edit each, and it's the owner's call rather than mine.

🤖 Generated with Claude Code

Both found by loading the pages at 390px rather than by reading them.

## /it-hilfe kept the old headline

#382 reframed this surface off "kostenlose Community-Reparatur" — meta title,
meta description, subtitle, tagline. It missed the thing a visitor actually
reads first: the H1 still said "Computer reparieren, OS neu installieren,
IT-Probleme lösen", a keyword list written for search engines rather than for
the person with a broken laptop.

It now reads "Jemanden finden, der es repariert" under the eyebrow "Techniker
finden". That is word-for-word the homepage pillar's link text, deliberately:
click the pillar, land on a page whose headline is the phrase you clicked.
Same sentence in two places, but as information scent BETWEEN pages — the
opposite of the duplication being removed from the homepage, where it
appeared twice within one screen.

## A price wrapped

"CHF 300.00" broke across two lines on a 390px pool card — 56px tall where a
one-line price is 28px. A wrapped price reads as a layout bug, not as a
number. It is `whitespace-nowrap tabular-nums` now; the service title beside
it gives way instead, which is the right thing to yield.

Not changed, because it is data rather than a defect: the two live pools are
"Claude Max" (CHF 50) and "Supergrok Heavy" (CHF 300) — both AI
subscriptions — tagged `Software` and `Sonstiges`, since they predate the
`ai` category. The filter chips derive from categories that existing pools
use, so no "KI" chip renders and the page cannot yet demonstrate the point
its own headline makes. New pools default to `ai`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@catomean

Copy link
Copy Markdown
Collaborator Author

Folded into the i18n detector fix, which it deadlocked against: this PR's new Italian and Spanish headlines were flagged as wrong-language by the very detector that fix repairs, so the two could not go green independently. Both changes ship together.

@catomean catomean closed this Aug 26, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 26, 2026
…ect (#387)

Third time in three PRs that this gate flagged correct Italian and Spanish —
"Trovare un tecnico", "Encontrar a quien lo repare", "LO QUE HACEMOS" and
seven more, none of them defects. Twice I verified them by hand and bumped
the baseline. The rule says the third time you stop fixing instances and
close the class.

## Why it was wrong

Not a threshold problem — HOLES in the stop-word lists. `un` was listed only
under fr; it had `una`/`uno` but not the masculine `un`. So "Trovare un
tecnico" scored Italian 0.00, French 0.33 and got flagged. Spanish was
missing `lo` and `a` while Italian had `lo`, which is why "Encontrar a quien
lo repare" looked Italian. A hole in a list makes CORRECT text look foreign.

Filling the holes then made it worse in the other direction: teaching es the
word `su` immediately made correct Italian ("Linux su vecchi ThinkPad") look
Spanish, and `e`, `non`, `nos` did the same across the other pairs. Sibling
Romance languages share their function words. A bag-of-stop-words comparison
cannot separate them, and no amount of dictionary work will change that.

## What it does now

It detects what it CAN detect: untranslated **English or German** sitting in
a translated file. Those function words barely overlap with Romance or CJK
ones, and that is the leak that actually happens here — DE is the source
language and EN the pivot. Sibling-language comparison is dropped.

Three guards, each earned:
  - LEAK_SOURCES = ['en','de'] — only judge against languages it can tell apart.
  - MIN_TOKENS_FOR_LANGUAGE_GUESS = 6 — the heuristic's resolution is 1/N; on
    a three-word string one shared article moves the ratio by 0.33, clearing
    the threshold on its own.
  - A script guard, because \w is ASCII-ONLY in JavaScript even under /u, so
    `[^\W\d_]` counted Hangul, kana and Cyrillic as ZERO letters and my first
    attempt at this guard silently did nothing. It uses \p{L} now. Without it
    a Korean sentence containing "evig" and "Revamp-IT" scores as English on
    those crumbs.

Proved by mutation, not by assertion: 16 cases, eleven correct-language
strings (it/es/fr/ko/ja/ru, including CJK carrying Latin brand names) all
clean, five real English/German leaks all still caught.

## What the fix immediately found

**Real untranslated English shipped to five locales.** es, fr, it, ja and ko
were all rendering English inside the IT-Hilfe hub — "Describe your issue and
receive offers from technicians", "Browse profiles and contact someone
directly", "Help as a technician — requests near you", "Register as a
technician and help people nearby." — plus the privacy page's data-export
sentence in ja and ko. The KEYS existed, so the missing-key audit passed;
only the values were English, and the old detector could not see them. All
translated here.

This is the same class as itHelp.hub.subtitle in #382, which I found by
reading a rendered page. The gate finds them now.

## And a dead storefront

`shop.*` held 140 keys; three loading/error boundaries use SIX. The other 134
describe a storefront whose pages are pure `redirect()` calls to /marketplace
— product grids, cart labels, category breadcrumbs, opening hours — shipped
in every visitor's page payload in eight languages. Pruned: ~54KB of JSON,
6511 deleted lines. Liveness checked by namespace prefix, not just call
sites (the lesson from home.newsletter), then proved by typecheck.

Baseline lowered in the same commit, per the ratchet rule: 706 message
findings → 84, with 632 resolved and 0 new.

Also folded in (was #386, which deadlocked against this: its new Italian and
Spanish headlines were flagged by the very detector this fixes):

  - /it-hilfe still showed "Computer reparieren, OS neu installieren,
    IT-Probleme lösen" as its H1 — a keyword list. #382 reframed the metadata
    and subtitle and missed the line a visitor reads first. It now matches the
    homepage pillar's link text exactly, so clicking "Jemanden finden, der es
    repariert" lands on a page with that headline.
  - "CHF 300.00" wrapped onto two lines on a 390px pool card. A price must not
    wrap; the title beside it gives way instead.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant