Skip to content

Two places the app still spoke English in every language - #126

Merged
suskozaver merged 1 commit into
ArunNGun:betafrom
suskozaver:fix/the-last-english-on-two-screens
Sep 16, 2026
Merged

suskozaver merged 1 commit into
ArunNGun:betafrom
suskozaver:fix/the-last-english-on-two-screens

Conversation

@suskozaver

Copy link
Copy Markdown
Collaborator

Both were found by reading the app rather than by grepping it, which is the point of the note added to 06-traps.md. The file-level check for a component that never imports useLang cannot see either of these: both sit in files that use it everywhere else.

The add button on the water shelf

Built as Add {count > 1 ? \${count} bottles` : "bottle"}` in JSX, so a Slovenian install offered "Add 4 bottles".

Now a plural family, which it has to be. One steklenička, two steklenički, three stekleničke, five stekleničk: a number glued to a fixed noun is an English habit no Slavic language forgives. Checked against Intl.PluralRules for each form in each language rather than assumed.

The neighbouring stock_add_bottle moves from "steklenico" to "stekleničko", so the two buttons in one panel use one word for one thing.

The rescue notice

It built its sentence from RECORD_LABEL in calc/rescue.ts: an English noun and its plural for each collection, joined into "3 bottles of water, 2 vials". Untranslatable, on the one screen that only ever appears after a data loss.

That is the rule this project already wrote down after describePhase: a module under src/lib/calc may return an id, a number or a date, and if it is about to return a sentence, the sentence belongs to whoever renders it.

So describeLoss and RECORD_LABEL are gone. lostCount returns the number, and the screen holds a Record<RecordKey, PluralBase> from collection to plural family. Typed as a total record on purpose: adding a collection to RECORD_KEYS now fails to compile until it has a name, rather than printing a count with no noun at the worst possible moment.

Five of the eleven collections already had a family. Six are new, in four languages.

Checks

npx tsc --noEmit, npx next lint, npm test and TZ=America/New_York npm test: 63 files, 1643 tests, no warnings. The plural forms were also printed for 1, 2, 3 and 5 in each language and read before shipping.

The Polish forms want a native reader, as the rest of the Polish does.

Both were found by reading the app rather than by grepping it, which
is the point of the note added to 06-traps.md: the file-level check
for a component that never imports useLang cannot see either of these,
because both sit in files that use it everywhere else.

The add button on the water shelf was built as `Add ${count} bottles`
in JSX, so a Slovenian install offered "Add 4 bottles". It is now a
plural family, which it has to be: one steklenicka, two steklenicki,
three steklenicke, five steklenick, and a number glued to a noun is an
English habit that no Slavic language forgives. The neighbouring
stock_add_bottle moves from "steklenico" to "stekleničko" so the two
buttons in one panel use one word for one thing.

The rescue notice built its sentence from RECORD_LABEL in
calc/rescue.ts, an English noun and its plural per collection. That is
the rule this project wrote down after describePhase: a module under
src/lib/calc may return an id, a number or a date, and if it is about
to return a sentence, the sentence belongs to whoever renders it. So
describeLoss and RECORD_LABEL are gone, lostCount returns the number,
and the screen holds a Record<RecordKey, PluralBase> from collection
to plural family. Typed as a total record, so adding a collection to
RECORD_KEYS fails to compile until it has a name, rather than printing
a count with no noun on the one screen that only appears after a data
loss.

Five of the eleven collections already had a family. Six are new, in
four languages. The Polish forms want a native reader, as the rest of
the Polish does.
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Arun's projects Team on Vercel.

A member of the Team first needs to authorize it.

@suskozaver
suskozaver merged commit 9b188ff into ArunNGun:beta Sep 16, 2026
1 of 2 checks passed
@suskozaver
suskozaver deleted the fix/the-last-english-on-two-screens branch September 16, 2026 16:21
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