diff options
| author | srdusr <[email protected]> | 2025-12-06 00:58:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2025-12-06 00:58:00 +0200 |
| commit | 24f1eb6cc611f458c45f0ac4046efce51211d7d3 (patch) | |
| tree | 3cd2193d9439921737d57bf3c8452d275faae100 /TODO-ui-languages.md | |
| parent | 076f29369e51dfb5798f70099a330ebeb1b66a4e (diff) | |
| download | typerpunk-24f1eb6cc611f458c45f0ac4046efce51211d7d3.tar.gz typerpunk-24f1eb6cc611f458c45f0ac4046efce51211d7d3.zip | |
Fix content packs, seed the leaderboard, and add the missing site furniture
Naming
- "Typing Test" removed from the browser tab, the crate description and the
READMEs. The scope outgrew it: solo practice, live races, code drills and
adaptive weak-key training.
Content
- Movies was prose *about* film, not film quotes - the same mistake the
programming pack had. Replaced with 28 attributed lines. New anime pack,
28 lines across 24 series.
- This follows the model TypeRacer states outright ("type quotes from popular
music, songs, anime, comic books and more"): short excerpts attributed to
the work they came from. The scalable half of their approach is user
submission with moderation, which is a feature this does not have yet.
Leaderboard
- An empty board tells a new player nobody is here. Bots now race the eight
fixed-length leaderboard modes, seeded with a fortnight of backdated results
on first run and one new result every 90 seconds after.
- They are ordinary users carrying is_bot, returned by the same query and
labelled "bot" in the UI. Seeding a board is reasonable; passing synthetic
scores off as human results is not, so the flag travels with the row.
- Seeding is checked per mode. A single result from the live ticker used to
satisfy an "any bot results" guard and leave every other mode empty forever.
Stats
- The per-key accuracy data Practice mode is built on was computed, used to
generate text, and never shown. The screen now ranks your weakest keys with
the error rate and pause length behind each one.
- Added recent form against your lifetime average, best accuracy, and tests
this week.
Multiplayer standings
- Now place, racer, WPM, accuracy and time, with column labels - the columns
TypeRacer and 10FastFingers both show.
Site furniture
- Share (Web Share where available, clipboard otherwise - no third-party
button, no tracking script), a GitHub link, and a real privacy page written
from what the code actually stores rather than from a template.
Button hierarchy
- Everything was an outlined box of roughly equal weight, so a screen's one
real action, a settings toggle and a filter chip looked alike. Three tiers
now: primary (filled, one per screen), default (outlined), quiet (toggles
and filters, bordered only when hovered or active).
Diffstat (limited to 'TODO-ui-languages.md')
| -rw-r--r-- | TODO-ui-languages.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/TODO-ui-languages.md b/TODO-ui-languages.md new file mode 100644 index 0000000..f12c32b --- /dev/null +++ b/TODO-ui-languages.md @@ -0,0 +1,61 @@ +# Translate the interface + +## What exists today + +`web/src/languages.js` holds 16 **typing** languages: the vocabulary the +generated-word modes (Words, Timed, Zen, Practice) draw from. The picker in +the top-right rail sets `settings.language`, and `wordGenerator.js` reads it. + +That is the same thing MonkeyType and 10FastFingers mean by "language" - what +you type, not what the buttons say. The interface itself is English only. + +## What this task is + +Making the interface follow that picker, or a second picker beside it. + +## Why it is not a small change + +Every user-facing string is currently a literal inside the markup that renders +it. There is no catalogue, no lookup, and no plural or interpolation handling. +The work is: + +1. **Extract.** Pull every string out of `web/src/**` into a catalogue keyed by + id. Roughly 250 strings across screens, tooltips, empty states and errors. + Tooltips are the bulk of it and the easiest to miss, because they live in + `data-tooltip` attributes rather than in text nodes. +2. **A lookup with interpolation and plurals.** `"{n} racing"` and + `"{n} players racing now"` already need a plural rule, and Polish, Czech and + Romanian have more plural forms than English does. Use `Intl.PluralRules` + rather than an `n === 1` check. +3. **Decide whether the two languages are one setting.** Typing Spanish does + not mean wanting a Spanish interface, and vice versa. Two pickers is more + honest; one is fewer controls. This is a product decision, not a technical + one. +4. **Translate.** 16 locales. This is the part that cannot be done from inside + this repo with any confidence - see below. +5. **Layout.** German and Finnish compound words are long. The corner rails, + the mode picker and the end screen's stat labels are all sized to English + today; several will need to wrap or shrink. + +## The honest constraint + +Machine-translating 16 locales and shipping them as finished would put text in +front of users that nobody who speaks those languages has read. The word lists +have the same issue but a much smaller blast radius: a slightly odd word in a +typing drill is a curiosity, whereas a mistranslated button is a bug the user +cannot diagnose. + +Suggested approach: + +- Build the catalogue and lookup, with English as the only complete locale. +- Add one or two further locales fully, to prove the plumbing against real + translated text of realistic length. +- Ship the rest only as native speakers review them, with the picker listing + only locales that are actually complete. + +## Related + +- `web/src/languages.js` - typing vocabulary, and the note there about the + lists being curated rather than corpus-derived. +- The corpus question is separate and also open: real frequency lists are + mostly CC BY-SA, which does not sit cleanly in an MIT repo. |