Skip to content

fix(curated-corpus): add Polish to the language picker#1276

Merged
mmiermans merged 2 commits into
mainfrom
fix/add-pl-language
Jun 11, 2026
Merged

fix(curated-corpus): add Polish to the language picker#1276
mmiermans merged 2 commits into
mainfrom
fix/add-pl-language

Conversation

@mmiermans

@mmiermans mmiermans commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Problem

#1274 added Poland (NEW_TAB_PL_PL) as a scheduled surface, but Polish is missing from the language picker, so curators cannot set or see PL on corpus items and sections.

Change

  • Add Polish to the languages dropdown options (definitions.ts).
  • Add Pl = 'PL' to the generated CorpusLanguage enum (generatedTypes.ts).

The enum value comes from the backing schema change in Pocket/content-monorepo#391, which is now deployed. generatedTypes.ts was updated by running api:generate-types.

#1274 added Poland (NEW_TAB_PL_PL) as a scheduled surface, but the
language picker still omits Polish, so curators can't set/see PL on
corpus items and sections.

- Add Polish to the `languages` dropdown options (definitions.ts).
- Add `Pl = 'PL'` to the generated `CorpusLanguage` enum so the code
  compiles. This is a manual stopgap: codegen reproduces it once the
  curated-corpus-api schema change (Pocket/content-monorepo#391) is
  deployed and `api:generate-types` is re-run against admin-api.
@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown

Claude finished @mmiermans's task in 51s —— View job


PR Review — add Polish to the language picker

  • Read PR diff
  • Review definitions.ts change
  • Review generatedTypes.ts change
  • Post review feedback

Verdict: LGTM ✅ — small, correct, and consistent with the existing pattern. One observation worth a look before merge.

definitions.ts

  • { code: CorpusLanguage.Pl, name: 'Polish' } matches the shape and style of the surrounding entries exactly.
  • The comment update (// Language codes for the curation tool's language picker.) is a nice fix — the old "Currently only English and German are needed" was already stale.
  • I checked the other consumers of CorpusLanguage and nothing else needs touching: the only language-specific branching is applyTitleFormattingByLanguage in helperFunctions.ts:246/266, which is gated on CorpusLanguage.De (German-only capitalization) — Polish correctly falls through to the default path, same as ES/FR/IT.

generatedTypes.ts⚠️ unrelated codegen changes bundled in

The Pl = 'PL' enum entry is correct: alphabetical order (De, En, Es, Fr, It, Pl), /** Polish */ doc comment, and trailing-comma style all match codegen output exactly.

However, the diff also pulls in schema changes unrelated to this PR's stated purpose — the PR body says only the Pl entry was added, but the file also gains:

  • updateSectionItem on Mutation
  • MutationUpdateSectionItemArgs
  • UpdateSectionItemInput

These are legitimate codegen drift (the dev schema picked up the SectionItem mutation since the file was last generated), so they're not wrong — but bundling them into a "add Polish" PR makes the diff harder to reason about and couples this change to a backend feature that may not be in use by this frontend yet.

Suggestion: This is fine to merge as-is if you're comfortable that the SectionItem mutation is deployed on every environment this UI targets (not just dev). If you'd prefer a minimal, focused diff, you could hand-edit generatedTypes.ts to add only the Pl enum entry and drop the three SectionItem-related blocks. Just flagging it so it's a conscious decision rather than an accidental inclusion. Fix this →

Notes

  • No test changes are needed for this — the language list isn't snapshot-tested, and the prospects.test.ts language table only covers de/en/es/fr/it. Optionally you could add a pl row there for completeness, but it's not required.
    · fix/add-pl-language

Comment thread src/api/generatedTypes.ts
/** The updated rank of the SectionItem in relation to its siblings. */
rank: Scalars['Int'];
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Generated from dev schema.

@mmiermans mmiermans marked this pull request as ready for review June 11, 2026 18:25
@mmiermans mmiermans requested a review from a team as a code owner June 11, 2026 18:25
@mmiermans mmiermans merged commit 8bfaa1a into main Jun 11, 2026
7 checks passed
@mmiermans mmiermans deleted the fix/add-pl-language branch June 11, 2026 19:00
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.

2 participants