Skip to content

i18n: add Polish (pl) locale (#216) - #220

Merged
shockalotti merged 1 commit into
mainfrom
i18n/polish-locale
Nov 4, 2026
Merged

shockalotti merged 1 commit into
mainfrom
i18n/polish-locale

Conversation

@shockalotti

Copy link
Copy Markdown
Contributor

Closes #216. Translation by @kybeq — thanks, this was a complete file and only needed mechanical fixes to satisfy the repo's guards.

What this adds

internal/i18n/locales/pl.json, plus corrected locale lists in CLAUDE.md and ARCHITECTURE §23.

No code change. init() globs internal/i18n/locales, so the footer switcher, the operator's fallback dropdown and the public API payload all pick pl up automatically.

Three changes from the reported file

Key parity (169/169) and printf verbs already passed. These did not:

1. Date tables — all 19 keys. The guard said:

pl.json: dow_short_mon = "Pon", CLDR says "pon."
pl.json: month_short_jan = "Sty", CLDR says "sty"

Every weekday and month was capitalised, and the weekdays dropped the Polish trailing dot. This matters visibly: booking.css applies no text-transform, so the calendar renders the JSON value verbatim — the page would have shown "Pon Sty" where CLDR/Intl says "pon. sty". Fixed to CLDR for all 7 + 12.

2. Typo, twice. "ponowanie" → "ponownie" in email_rebook_intro and email_manage_link_intro_reschedule. "ponowanie" is not a Polish word.

3. Grammar. others changed from "inni" to "innych". hostsLabel renders "… i 3 innych", and Polish takes the genitive plural after a numeral, so nominative "inni" read wrong in that slot. other = "inny" is correct for the 1 case and is unchanged.

That last one is the only edit I'm not fully certain of as a non-speaker — @kybeq, if you'd say "3 inni" there, say so and I'll revert it.

Docs

CLAUDE.md and ARCHITECTURE §23 both said "9 locales", which was already stale — el had shipped without updating either. Both now list 11: en es fr fr-CA de el it nl pl pt sv.

Verification

  • go test ./internal/i18n/ green, including TestDateTablesMatchCLDR, TestAllLocalesHaveTheSameKeys and TestAllLocalesHaveMatchingFormatVerbs.
  • Running instance, GET /book/<slug>?lang=pl: page renders in Polish, switcher lists polski and selects it, <html lang="pl">, and the embedded payload carries month_short_jan:"sty", dow_short_mon:"pon.".

Standing caveat

Per the repo's own note, non-English locales are unreviewed unless a native speaker has checked them. This one is from a Polish speaker in #216, which is better provenance than the LLM-drafted set — but the two edits above are mine, so a quick native read of #216's thread is still worth it.

🤖 Generated with Claude Code

Adds internal/i18n/locales/pl.json, contributed by kybeq in #216. No code
change is needed: init() globs the directory, so the switcher, the fallback
dropdown and the public API payload pick it up.

Adapted from the report so the repo's three guards pass:

- Date tables now match CLDR/Intl for pl. The proposed values were capitalised
  and dropped the Polish weekday dot ("Pon", "Sty"); CLDR has "pon." and
  "sty", and the calendar renders these raw (booking.css applies no
  text-transform). All 7 weekdays and 12 months changed.
- "ponowanie" -> "ponownie" in email_rebook_intro and
  email_manage_link_intro_reschedule ("ponowanie" is not a Polish word).
- others "inni" -> "innych": hostsLabel renders "… i 3 innych", and Polish
  takes the genitive plural after a numeral. Worth a native re-check.

Also corrects the shipped-locale lists in CLAUDE.md and ARCHITECTURE §23, which
were already stale: they said 9 locales while el had shipped, and now pl as well.

Verified against a running instance: /book/<slug>?lang=pl renders in Polish, the
switcher lists "polski" and selects it, html lang="pl", and the embedded i18n
payload carries the CLDR values (month_short_jan="sty", dow_short_mon="pon.").

Credits kybeq for the translation.
This was referenced Nov 4, 2026

@pullfrog pullfrog Bot 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.

ℹ️ No critical issues — the locale file is sound; the docs list is still stale in three places.

Reviewed changes

  • Added internal/i18n/locales/pl.json (169 keys, identical key set/order to en.json), with CLDR-corrected weekday/month abbreviations, two ponowanie → ponownie typo fixes, and others changed to genitive innych.
  • Updated the locale lists in CLAUDE.md and docs/ARCHITECTURE.md §23 to 11 locales, adding el and pl.
  • Verified go test ./internal/i18n/ passes; the CLDR cross-check runs under node and agrees with the date tables.

ℹ️ Three locale lists still say 9 and omit el and pl

The PR fixes the stale count in CLAUDE.md and ARCHITECTURE §23, but the same statement survives unchanged in three other places, so the repo now contradicts itself (11 vs 9). Since correcting stale docs is part of this PR's scope, these should land with it.

Technical details
# Stale locale lists after adding `pl`

## Affected sites
- `README.md:203-206` — bullet says "**9 languages**" and enumerates English…Swedish; missing Greek and Polish.
- `CONTRIBUTING.md:77` — "Calnode ships 9 locales (`en es fr fr-CA de it pt nl sv`)…".
- `docs/ARCHITECTURE.md:990` — §1 says the booking surfaces "ship in 9 languages (§23)", while §23 now says 11.

## Required outcome
- All three state 11 locales and include `el` and `pl`, matching `CLAUDE.md:143` and `docs/ARCHITECTURE.md:1232`.

## Suggested approach
- README: bump the count and append "Greek · Polish" to the name list.
- CONTRIBUTING: bump the count and extend the code list to include `el` and `pl`.
- ARCHITECTURE:990: change 9 → 11; the existing §23 cross-reference already points at the updated list, so no other text changes.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash | 𝕏

@shockalotti
shockalotti merged commit 0817f8f into main Nov 4, 2026
11 checks passed
edimitchel pushed a commit to edimitchel/calnode that referenced this pull request Nov 4, 2026
Calnode#220 corrected the locale list in CLAUDE.md and ARCHITECTURE §23 but missed three
other places that still claimed 9 languages, and left two claims that shipping
Polish has now falsified:

- README.md and CONTRIBUTING.md both still said 9 locales and listed 9. Both now
  say 11 and include Greek and Polish. Greek had already shipped without either
  file being updated, so this drift predates Polish.
- ARCHITECTURE's LiveKit limitation repeated "9 languages".
- ARCHITECTURE's "Plural rules are 2-form only" bullet said shipping Polish
  correctly needs a CLDR plural-category selector first. Polish now ships and does
  not need one: its plural-bearing keys dodge the missing categories (durations use
  the invariant abbreviations godz./min, and hostsLabel's inny/innych reads
  correctly at every count). Russian and Arabic still do need the selector.
- "Every non-English locale is an LLM draft" is no longer true of pl, which was
  contributed and grammar-checked by a native speaker. Reworded to "most", with
  the exception stated and its two developer edits named.
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.

Polish translation

1 participant