Skip to content

Guess whether an organizer's signups look Swedish from their titles - #932

Closed
richshaw wants to merge 2 commits into
claude/issue-637-stale-checkfrom
claude/issue-640-looks-swedish
Closed

richshaw wants to merge 2 commits into
claude/issue-637-stale-checkfrom
claude/issue-640-looks-swedish

Conversation

@richshaw

@richshaw richshaw commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Part of #640: the guess only. A pure function that says whether an organizer's signups look written in a language, and Swedish's word table. Nothing calls it yet: the notice on Your signups that uses it (its two buttons, telemetry and the SHIPPED gate) comes in a later PR.

Merge after #930. It's built on #930's branch. It touches none of the files that #930, or the two PRs built beside it on the same base (the Swedish translation and #639's post-save prompts), change.

The stack

PR 40 of the localization stack (#619). Based on #930 (claude/issue-637-stale-check); review against that branch.

The problem

When Swedish ships, organizers who already write their signups in Swedish but whose browser says English won't hear about it. #640 shows them a notice when their browser's first language is Swedish or their signups look Swedish. This PR is the second test: a guess from text the Your signups page already loads, so it costs no query.

The fix

signupsLookWrittenIn(locale, signups) in src/i18n/written-in.ts.

  • Input: the rows listSignupSummariesForWorkspace returns, or anything with a title (a test passes SignupSummary rows as they are). The title is the only text those rows hold: the slug is the title with its accents stripped (toKebab), so it adds nothing.

  • A table per language (WRITING) holds four things for each language:

    • the letters it writes and English doesn't;
    • the alphabet its own words use;
    • a list of its common words that English doesn't have;
    • a short list of its common words that English has too.

    The next language adds an entry and no code. English has none, so the function never says signups look English: there's nothing to offer.

  • Swedish's words (66): small words (och, att, inte, för, är, från, på, som, det, hos, ett, efter, utan, nästa, varje, år, åk, …), days, times and seasons (måndag to söndag, helgen, vecka, kväll, kvällen, augusti, sommar, hösten, våren, julen, påsk), and signup words (anmälan, skjuts, skolan, förskolan, kakor, kaffe, bullar, maten, barnen, föräldrar, hjälp, välkommen, behöver, loppis, julfest, sommarfest, matchen, laget, kiosken). Many are Danish or Norwegian too; that's deliberate (below).

  • Left out because English has them, each pinned by an English title that stays no: av (AV club), vi, om, den, barn, fest, mat, jul (Jul 4), tack, under, vid, mot, ska, kan, du, schema and match. Also fika and midsommar, which English has borrowed.

  • Words English shares (sharedWithEnglish): till and med. One counts as a listed word only in a title that also has a word spelled with å, ä or ö. So "Kör till bortamatchen" says yes and "Open till noon" no.

  • Words are runs of letters, lower-cased by the language's rules after NFC, so "STÄDDAG" matches and so does an a typed with a separate combining diaeresis. Matching is by whole word ("Ochre" isn't "och"). One-letter words are skipped: Swedish "i", "å" and "ö" can't be told from English "a" and "I".

  • Server-only: like everything in src/i18n/ except config.ts, opensignup/no-catalogs-in-client refuses it in a 'use client' file (I checked with a throwaway client file). It takes CatalogLocale with import type and adds nothing to config.ts, so it stays clear of the webpack split wall. No catalog keys: it shows no text.

  • No CHANGELOG entry, since nothing calls it yet.

How it weighs the letters and words

Each title is one of:

When For example
strong it has a listed word, or till or med beside a word spelled with å, ä or ö "Vem tar med vad?", "Kiosken på lördag", "Tränare till F12"
weak every word in it is spelled with å, ä or ö, and with no letter Swedish never writes (æ, ø, ü, ß and the rest) "Föräldramöte", "Ridläger", but also "Malmö"
none anything else, so any ordinary title with an English word in it "Carpool to Malmö", "Potluck at Åsa's"
empty no word of two letters or more; left out of the count "", "2026", "🎉"

Signups look Swedish when any title is strong, or when weak titles make up at least half of the titles that aren't empty.

On their own, å, ä and ö are weak evidence, because names ("Åsa", "Malmö") and the neighbouring languages have them too. So a title counts on letters alone only when every one of its words has them. A word with æ, ø, ü or ß rules its title out of weak evidence, however many å, ä or ö it has.

It leans towards yes, as #640 asks: "a wrong guess is cheap … so lean towards showing it", and its one hard limit is English. A listed word only has to be one English doesn't have. Words Danish and Norwegian share with Swedish are listed: a Dane or Norwegian who sees the notice dismisses it with one click, while leaving those words out would hide it from Swedes.

The one way an ordinary English title says yes: till or med beside a Swedish-lettered name, as in "Open till late in Malmö" or "Med kit for Åre trip". Both are pinned in a test. It's accepted for three reasons: such an organizer is likely in Sweden, a wrong yes costs one click on "Keep English", and till is the word that finds the most Swedish titles. Owner: this is the choice to look at when you review the notice. Besides that, English titles made up around a listed word also say yes ("Det. Smith retirement party", "Som tam dinner", "Ett Hem dinner", "Cafe Kaffe volunteers", "Sommar house cleanup"). Those words stay, because they're common in Swedish titles, and these titles are pinned too.

Other languages

Language What it does Why
German Shows only when at least half the titles are single words spelled with ä or ö ("Brötchen"). "Kuchen für das Sommerfest", "Mädchenfußball" and "Grillfest am Wochenende" say nothing. ü and ß rule a word out, German titles mostly have a plain word (für, und, am), and no German word is on the list.
Danish, Norwegian Usually shows: a title with a word Swedish shares (på, hos, som, det, fredag, kaffe) is strong, as in "Dugnad på skolen", "Fest hos Mette" and "Kaffe på fredag". A title without one says nothing ("Forældremøde", "Kage til sommerfesten", "Påskeæg"), unless it's one word with å and no æ or ø ("Påskefrokost"). Leaning towards yes for Swedes means taking these words. A wrong yes costs a Dane or Norwegian one click.
Finnish Titles of words with ä or ö ("Kesäjuhla", "Äitienpäivä") are weak, so a Finnish list shows the notice when half its titles are like that. "Talkoot lauantaina" and "Kahvi ja pulla" say nothing. Finnish writes no letter that Swedish lacks. Accepted: Swedish is taught in Finnish schools, and the answer is one click on "Keep English".

How often it shows

The 11 Swedish titles the tophat named, one at a time: 4 → 9 said yes.

I also wrote synthetic titles before choosing the words: 40 Swedish; 26 English, with Swedish names and borrowed words among them; and 10 to 12 each in German, Danish, Norwegian and Finnish. Then I drew lists from each at random. How often the notice would show, before → after this round:

Titles from 1 title 3 titles 5 titles 10 titles
Swedish 43% → 60% 60% → 85% 73% → 94% 91% → 99%
English 0% → 0% 0% → 0% 0% → 0% 0% → 0%
German 25% → 25% 16% → 16% 11% → 11% 9% → 9%
Danish 10% → 60% 3% → 88% 1% → 97% 0% → 100%
Norwegian 20% → 60% 10% → 82% 5% → 92% 3% → 99%
Finnish 45% → 45% 43% → 43% 42% → 42% 50% → 50%

Titles alone are still thin. What's still missed is compounds with no listed word beside a plain word ("Grillkväll i parken", "Julpyssel", "Pantinsamling"), and med with no Swedish-lettered word beside it ("Lussebak med scouterna"). These are pinned as no. An organizer whose only signups are titled like that is found by their browser or not at all.

If the notice's PR reads descriptions too, one bounded read would do: the first 300 characters of the 20 newest live signups' descriptions, in one statement. Descriptions should only add evidence: a listed word in one says yes, and they never enter the "at least half" count. Don't pass them in as extra rows. The tophat showed that rows can turn a yes into a no, because they swell the count. The tophat also found that sentences use everyday words a title list doesn't (behöver, välkommen, efter, till). The wider list now has most of them, which is what would make the read worth it. Two more things to weigh:

  • Run it only when everything else says to ask.
  • It would then run on every Your signups view for every organizer in that state, including every English-speaking organizer who never saves a language.

This PR doesn't build it.

Where the issue is out of date

Nothing found for this part. The page loads listSignupSummariesForWorkspace's rows, as #640 says, and their only text is the title.

Tests

src/i18n/written-in.test.ts (95 tests):

  • English: plain titles; titles with a Swedish place or person ("Carpool to Malmö", "Potluck at Åsa's", "Picnic at Åre", "Kräftskiva with the Andersons"); borrowed and look-alike words ("Fika Friday", "Open till noon", "Med school potluck", "Midsommar party", "Barn dance", "Jul 4 parade", "AV club", "Under 12s match", "Ochre and gold gala"); one English title for each word left out; a whole list of them; a lone name ("Malmö") among English titles. Pinned as yes: till or med beside a Swedish name, and the made-up titles above.

  • Swedish: titles with a listed word; the tophat's misses that now hit ("Fika efter gudstjänsten", "Kör till bortamatchen", "Loppis i gympasalen", "Sommarfest", "Tränare till F12"); titles of words with å, ä or ö; upper case and decomposed letters; whole words only; and the misses that remain.

  • Mixed lists: one Swedish word among many English titles shows it, as does "Städdag på förskolan" among six; letters alone need half the list; Swedish titles that say nothing count against a weak one.

  • Empty lists and untitled signups: an empty list, titles with no words ("", "2026", "🎉🎉", "chore(deps): bump nodemailer from 7.0.13 to 8.0.5 #1"), and wordless titles left out of the count.

  • Very short titles: one-letter words skipped ("Ö", "I"); "Ok" and "Te" say nothing; "Kör" is weak and "Två" strong.

  • German, Danish, Norwegian and Finnish, as in the table above.

  • The table: English never looks written in; SignupSummary rows go in unchanged.

  • Each piece is needed. I broke each one in turn and a test failed every time:

    • the alphabet check;
    • "at least half" changed to "more than half";
    • one-letter words kept;
    • no listed words;
    • wordless titles counted;
    • no NFC, and no lower-casing;
    • "any word" for "every word" in a weak title;
    • till and med never counting, or counting with no Swedish-lettered word beside them;
    • putting back any word left out because English has it.

    The first version of the module (7222d57) fails 14 of these tests.

Ran: pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test (214 files, 3122 passed, 1 expected fail). No pnpm test:db or build: no database or client code changes, and nothing imports the module yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

A pure function for the notice on Your signups (#640): given the rows the
page already loads, it says whether the titles look written in a language.
One title with a word from the language's short list settles it; titles
spelled only with its letters (å, ä, ö for Swedish) count when they make up
at least half the list, since names and the neighbouring languages write
those letters too. A word with a letter the language never writes (æ, ø, ü,
ß) is never evidence. The markers are a table per language, so the next one
adds an entry and no code. Server-only, beside the other i18n helpers; its
only caller so far is its test, and the notice that uses it comes later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
@richshaw richshaw added pipeline:tophat pipeline:working A session is working on it right now labels Nov 14, 2026 — with Claude
@richshaw
richshaw requested a balanced review from Copilot November 14, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copy link
Copy Markdown
Owner Author

Tophat: passed

Ran 7222d57 locally with pnpm exec next dev, Postgres 16, Chromium at 1280×900 and 390×844, then the same pages on the base (claude/issue-637-stale-check, a920482). Production build of 7222d57 for the chunk check.

Check Result What I saw
Nothing visible changed ✅ Your signups (desktop and phone, 16 Swedish titles), a signup's Build and Settings tabs, and its public page (desktop and phone) are pixel-identical to the base. The participant's confirmation differs only in the email typed and the new edit link. No console errors on either.
Not in any chunk ✅ pnpm build passes, pnpm budgets passes; .next/static and .next/server hold none of skjuts skolan kakor, mellan vem vad, signupsLookWrittenIn. Its only importer is its test.
Unit test ✅ src/i18n/written-in.test.ts: 52 passed.
The guess over real rows ✅ (with notes) Below.

The guess over real rows

Seven organizers made through the app (one signup in the UI, the rest through POST /api/signups); a tsx script ran listSignupSummariesForWorkspace through the real service on each workspace and gave the rows to signupsLookWrittenIn('sv', …). Single-title cases are one real row from those lists. Titles were made up for this test.

Mix Answer
All English (8: "Snack duty — Spring season", "Picnic at Åre", "Björn's farewell", "Fika Friday", "Kräftskiva with the Andersons" and others) no ✅, and no for each title alone
English plus one Swedish yes when the Swedish title holds a listed word (7 of 16: "Skjuts till bortamatchen", "Kyrkkaffe söndag", …); no for the other 9, including "Städdag på förskolan" and "Föräldramöte åk 3" (one weak title in 9). A real workspace of 6 English titles plus "Städdag på förskolan": no
All Swedish (16) yes ✅; also yes for its newest 2, 3, 5 and 10
One Swedish only yes for 9 of 16
Finnish only (6) no; alone, "Äitienpäivä" and "Joulumyyjäiset" say yes (2 of 6)
German only (6) no; alone, "Brötchendienst" says yes
Norwegian and Danish (6) no; alone, "Påskefrokost" says yes
Empty workspace no ✅

Answers I'd call wrong:

  • Swedish misses (the biggest). 7 of 16 single Swedish titles say no: "Fika efter gudstjänsten", "Kör till bortamatchen", "Lussebak med scouterna", "Loppis i gympasalen", "Sommarfest", "Grillkväll i parken", "Tränare till F12". Each has a plain-letter word (fika, efter, till, med, the compound) next to the å/ä/ö words. Of the four church-, club- and school-style titles I started from, only "Föräldramöte åk 3" and "Städdag på förskolan" are found. An organizer with one or two signups like these, and an English browser, won't see the notice.
  • English plus one weak Swedish title says no. This follows the documented rule (a lone "Malmö" mustn't count), so it's defensible, but Signups made before Swedish shipped stay in English, and nothing tells their organizers #640 leans towards showing.
  • One-word non-Swedish titles say yes. One-signup Finnish, German or Norwegian organizers get it 1 to 2 times in 6. That's cheap (one "Keep English" click) and the PR accepts it.
  • English: nothing in any real English list triggered it. Alone, a title made only of Swedish-lettered words still does ("Smörgåsbord", "Malmö 2027", "Kräftskiva" each say yes; "Midsommar", "Glögg night" and "Åre ski trip" say no). That's the documented weak case, and rare.

The PR's claims

  • Hit rates. Borne out in shape. English stayed at 0. One Swedish title found 9 of 16 here against the PR's 43%; my titles lean on short words like "för" and "söndag". The misses are the kinds the PR names. Finnish, German and Nordic singles fell within the PR's ranges or just under.
  • The description read. Two findings for the notice's PR (A41), not blockers here:
    1. "Descriptions … nearly always hold a listed word" didn't hold. I wrote 9 Swedish descriptions for the titles that missed (synthetic, passed as { title: description }), and only 3 hit. Five of seven full sentences missed, because their everyday words aren't on the 31-word list: behöver, välkommen, hjälpa, köra, lämna, kan, du, efter, till. A description read needs a longer word list made for sentences to pay off. None of 10 English, Finnish, German, Norwegian or Danish descriptions said yes, so the read itself looks safe.
    2. "They can go to this function beside the titles as they are" can turn a yes into a no. Description rows count in the weak-title denominator: titles "Föräldramöte åk 3" + "Lussebak med scouterna" → yes; the same two plus their two descriptions as rows → no. Descriptions should only add strong evidence, through a separate check, not extra rows.

Not UX: nothing calls the function yet.

Screenshots are in https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt.


Generated by Claude Code

@richshaw richshaw left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: changes needed (round 1)

The PR adds signupsLookWrittenIn(locale, signups) and Swedish's table, with nothing calling it yet. The code is sound and the tests are real. The one problem is the word list: it's too narrow for #640's "lean towards showing it", because it leaves out every word Danish or Norwegian share. Widening it is a list change plus one small table field, and it's cheaper here than after the notice is built on it.

Blocking (1):

  • src/i18n/written-in.ts lines 44 to 57: the list protects Danish and Norwegian organizers at Swedish organizers' cost. A lone Swedish title is found 43% of the time (the PR's figure). The inline comment gives the exact words, a second "shared words" field for till and med, and the numbers: 4 → 9 of the tophat's 11 Swedish titles, 5 → 16 of 30 others, English still 0 of 35.

Optional (3):

  • English titles I had to contrive to get a yes from the wider list, so the builder can decide which words to drop: "Det. Smith retirement party" (det), "Som tam dinner" (som), "Ett Hem dinner" (ett), "Cafe Kaffe volunteers" (kaffe). I'd keep all four words. The list at this commit already has one of the same kind: "Sommar house cleanup" says yes.
  • For the notice's PR, not this one: the description's "descriptions can go to this function beside the titles as they are" is wrong, as the tophat showed: extra rows count in the "at least half" rule and can turn a yes into a no. If the notice reads descriptions, they should only add evidence: a listed word in one says yes, and they never enter the count. The wider list is also what makes that read worth it (the tophat's missed description words included efter, till, behöver, välkommen).
  • src/i18n/written-in.ts line 135: once the list is wider, "leans towards yes" is true; today it oversells.

What I checked and found right:

  • Whole words, any case: "Ochre", "Attendance" and "Grillkvällen" don't match och, att or kväll; "VEM TAR MED VAD?" does.
  • Normalisation: titles and the table both go through NFC before lower-casing, so a decomposed "Städdag" counts. Taking the NFC call out fails a test.
  • Table shape: WRITING is Partial<Record<CatalogLocale, WritingMarkers>> and the code reads nothing Swedish-specific; English has no entry and always says no.
  • Server-only: opensignup/no-catalogs-in-client covers all of src/i18n/ except config, and the file isn't in CLIENT_SAFE_I18N. Its only import is a type.
  • Tests are real: I broke eight pieces in turn (NFC, lower-casing, the alphabet check, "at least half", one-letter words, wordless titles, "every word", whole-word matching) and at least one test failed each time.
  • Repo rules: no schema, service, route or client code; nothing from the checklist applies. Knip is satisfied by the test.

Earlier threads: none. Copilot couldn't review (out of quota).
Checks: CI green on 7222d57 (lint-type-test, e2e). Locally: src/i18n/written-in.test.ts, 52 passed. Tophat passed at 7222d57, and no runtime code has changed since.

Not UX and not high-risk while nothing calls it, so the gate stays automatic once this is fixed. All titles above are made up.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

Comment thread src/i18n/written-in.ts Resolved
The word list left out every word Danish or Norwegian share with Swedish,
so the commonest words in Swedish titles (på, som, det, efter, fredag,
kaffe) said nothing and a lone Swedish title was found less than half the
time. A listed word now only has to be one English doesn't have, and the
list gains small words, days and seasons and signup words. A second table
field, sharedWithEnglish, holds till and med, which English has too: one
counts only in a title that also has a word spelled with å, ä or ö, so
"Kör till bortamatchen" says yes and "Open till noon" no.

The tests pin the cost: Danish and Norwegian titles with på or hos now say
yes, and so do "Open till late in Malmö" and "Med kit for Åre trip", the
one way an ordinary English title can. Every word left out because English
has it is pinned by an English title that stays no.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

richshaw commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner Author

Tophat: passed (round 2)

Ran bae3503 locally with pnpm exec next dev, Postgres 16, Chromium at 1280×900 and 390×844. This round only redoes round 1's real-rows check on the widened word list, plus a quick look at Your signups.

Check Result What I saw
Nothing visible changed ✅ Your signups for a Swedish organizer (16 titles; desktop and phone) and an English one (22 titles) show no notice and no console errors. The module's only importer is still its test.
Unit test ✅ src/i18n/written-in.test.ts: 95 passed.
The guess over real rows ✅ (with notes) Below.
Decomposed letters (NFD) ✅ 4 titles saved through POST /api/signups with å, ä and ö decomposed. Postgres confirms they're stored that way (title <> normalize(title, NFC)). All 4 say yes alone. Two of them depend on NFC and on the new words: "Lucia på fritids" (på) and "Tränare till F12" (till beside ä).

The guess over real rows

I created ten organizers through the app (one signup in the UI, the rest through POST /api/signups). An uncommitted tsx script ran listSignupSummariesForWorkspace through the real service on each workspace, then gave the rows to signupsLookWrittenIn('sv', …). To give every new title a "before" answer, it also ran 7222d57's module on the same rows. I made all the titles up.

Mix Round 1 (7222d57) Now (bae3503)
All English (22: round 1's kind, plus loanwords "Smörgåsbord", "Smörgåsbord potluck", "IKEA run", "Saturday IKEA run for the new flat", "Fika Friday at the library", "Kanelbullar bake-off", "Semla Tuesday treats", "Lagom living workshop") no no ✅. Alone, each says no except "Smörgåsbord", as in round 1.
English plus one Swedish 7 of 16. The real workspace of 6 English titles plus "Städdag på förskolan" said no. That real workspace now says yes. The 22 English titles plus each round-1-style title: 13 of 16 (old module: 4). Plus each new title: 8 of 27 (old: 4).
All Swedish yes, and yes for the newest 2, 3, 5 and 10 yes for both lists (16 and 27), and for the newest 2, 3, 5 and 10 of each. The old module said no to my first list's newest 2 and 3.
One Swedish only 9 of 16 Round 1's 11 named titles: 4 → 9, exactly the PR's figure. My 16 round-1-style titles: 6 → 13. 27 new titles (school, club, church, sports team): 7 → 11.
Finnish only (6) no; 2 alone said yes yes, and the old module says yes too: 3 of my 6 are lone ä/ö words ("Äitienpäivä", "Joulumyyjäiset", "Kesäjuhla"), which reaches half.
German only (6) no; "Brötchendienst" alone said yes no; "Brötchendienst" alone yes. No change.
Norwegian and Danish (6) no; "Påskefrokost" alone said yes yes, through "Dugnad på skolen". Alone, 2 of 6.
Empty workspace no no ✅

Random draws from the 27 new Swedish titles (real rows, 4,000 draws each), old → new: 1 title 26% → 41%, 3 titles 42% → 69%, 5 titles 60% → 86%, 10 titles 87% → 99%.

Answers I'd call wrong:

  • Swedish misses (still the biggest). 16 of the 27 new titles say no alone, and so do 3 of the 16 round-1-style titles. They fall into four groups:

    • till with no å, ä or ö beside it: "Klassresa till Skansen", "Insamling till klasskassan", "Domare till poolspel", "Bollkallar till A-lagets matcher".
    • an inflected form of a listed word: "Simskola måndagar" (only måndag is listed), "Sekretariat hemmamatcher" (only matchen is listed).
    • no listed word, only i or av (both left out): "Skolavslutning i kyrkan", "Pepparkaksbak i 4A", "Kyrkvärdar i advent", "Grillkväll i parken", "Försäljning av Bingolotter".
    • compounds with nothing beside them: "Lagfest", "Sargvakt U11", "Kioskpass seriespel", "Funktionärer Midnattsloppet", "Fruktschema klass 2B", "Studiedag – barnvakt sökes", "Församlingens loppmarknad", and the pinned "Lussebak med scouterna".

    On titles nobody tuned the list against, a lone title is found 41% of the time, against the PR's 60% for its own synthetic set. That's the PR's "titles alone are still thin", measured.

  • A Swedish title spelled only with å, ä or ö says no beside English titles: "Matchvärdar P13", "Söndagsskolan", "Tvätta matchställ" and "Föräldramöte" each say yes alone and no beside the 22 English titles. This is the documented rule, unchanged from round 1.

  • English that says yes: the accepted till/med cost shows up in titles I didn't build around it. "Med students' trip to Göteborg" and "Stay till close at Café Åsa" both say yes, and the first is a title an English organizer could easily write. Alone, "Smörgåsbord", "Kräftskiva" and "Malmö 2027" say yes, as in round 1 (the weak case). No list of ordinary English titles said yes.

  • Neighbours: the Finnish list of 6 says yes, the Norwegian/Danish list says yes, and "Brötchendienst" alone says yes. The PR documents and accepts all three.

Optional, for the builder or the notice's PR: the cheapest gains left are inflected forms of listed words (måndagar, matcher) and till beside a plain-lettered Swedish word. The second needs a word list this design doesn't have. Neither blocks: the PR states this limit and leaves it to the browser test.

Not UX: nothing calls the function yet.

Screenshots are in https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt.


Generated by Claude Code

@richshaw richshaw left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: passed (round 2)

Round 1 asked for one change: let a listed word be any word English doesn't have, and add a second field for till and med that counts only beside a word spelled with å, ä or ö. bae3503 does both, as asked, and nothing else in the module's logic moved. The comments now say what the code does, and the tests pin both the gains and the cost.

Blocking (0).

Optional (1), for the notice's PR (#640's second part), not this one:

  • Plural and definite day names are worth adding there. The tophat suggested inflected forms of listed words. I tried them on a throwaway copy:
    • måndagar tisdagar onsdagar torsdagar fredagar lördagar söndagar, the same seven ending in -en (lördagen), and veckor kvällar: 12 of 12 recurring-day titles I made up move from no to yes ("Simskola måndagar", "Fika fredagar", "Bakning veckor 12-14"), and none of 16 English titles changes.
    • On the tophat's own 16 misses the gain is 1 ("Simskola måndagar"). So it's small, but free.
    • Leave out matcher (an English word, like match) and helger (a surname: "Helger family reunion" would say yes). "Sekretariat hemmamatcher" wouldn't be found by matcher anyway: matching is by whole word.
    • Why not here: it's a runtime change, so this PR would go back through tophat and review for one title in 16. The notice's PR changes this area's caller and is tophatted and read by the owner anyway. Pin each new word with a Swedish title that says yes.
    • I'm not suggesting i or av as shared words. Both would widen the one way English says yes ("Åsa and I", "AV team for Malmö").

What I checked this round:

  • Round 1's finding is handled. Every word I named is in the list (66 words, counted), sharedWithEnglish is a table field, and titleEvidence reads it with no Swedish-specific code. The check order is right: a listed word first, then a shared word beside a Swedish-lettered word, then the letters rule.
  • The tests are real. I ran the first version of the module (7222d57) against this test file: 14 fail, as the reply says. Then, on this version:
    • letting till or med count on its own fails 4 tests; never counting them fails 4;
    • putting back any one of the 19 left-out words (av, vi, om, den, barn, fest, mat, jul, tack, under, vid, mot, ska, kan, du, schema, match, fika, midsommar) fails at least one test, each time.
  • The comments tell the truth. The words comment says "English doesn't have", names the Danish and Norwegian overlap and why. The left-out comment lists English words, not Danish ones. The function's comment says what "leans towards yes" rests on, and names the till/med exception to "an English title with a Swedish name counts for nothing".
  • The cost is pinned and stated. "Open till late in Malmö" and "Med kit for Åre trip" are tested as yes, and the description tells the owner this is the choice to look at with the notice. The tophat's "Med students' trip to Göteborg" is the same edge, not a new one.
  • The description's claims: 95 tests (ran: 95 passed), 4 → 9 on the tophat's titles (the tophat measured the same), English at 0 over every list the tophat tried.

Earlier threads: all resolved (1). Copilot couldn't review (out of quota).
Checks: CI green on bae3503 (lint-type-test, e2e). Locally: src/i18n/written-in.test.ts, 95 passed, plus the runs above. Tophat round 2 passed at bae3503, and no code has changed since.

Not UX and not high-risk: nothing calls the function yet, so the gate is automatic. Merge after #930, as the description says. All titles above are made up.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

Closing without merging, at the owner's decision.

OpenSignup won't guess a language from what organizers write. Each organizer has a stored language: the browser's language when the account is created, if OpenSignup has it, and changeable in account Settings. Each signup has its own language, which starts as the organizer's and can be changed in its Settings tab. With #934 closed too, the word list has no caller.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

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.

3 participants