Skip to content

Push only configured locales, and write new YAML plural forms in CLDR order - #132

Merged
arvida merged 4 commits into
mainfrom
fix/push-only-configured-locales
Oct 11, 2026
Merged

arvida merged 4 commits into
mainfrom
fix/push-only-configured-locales

Conversation

@arvida

@arvida arvida commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Two fixes for the next CLI release.

push sends only configured locales

push sent every locale file it found. One extra file next to the configured locales, such as pt.yml or zh.yml, made the server reject the whole push with "One or more languages are not supported".

  • Target files whose locale isn't in outputLocales are skipped, and one log line names them. The match ignores case and _/-.
  • push and the initial import share the same source/target split, so both follow one rule.
  • When every file is skipped, push returns no_changes without calling the API.

New YAML plural forms in CLDR order

New plural forms came out in arrival order, for example other: above one:. Each plural group's incoming forms are now ordered zero, one, two, few, many, other, within the slots they already occupy, so other keys stay where they are. Existing lines aren't touched.

Tests

  • New cases in import-service.test.js and yaml-plural-order.test.ts.
  • Lint, build and all 1514 tests pass.
  • Codex review: no actionable regressions.

Changelog entries are under [Unreleased].

- Skip target files whose locale is not in outputLocales, with one log line naming the skipped locales
- Share the source/target split between push and the initial import so both apply the same rule
- Keep files that match a configured locale or the source locale up to case and separator
- Return no_changes instead of calling the API when every file is skipped

Claude-Session: https://claude.ai/code/session_01K8oRHjFQaCX7h3tszmBHyB
- Order each plural group's incoming categories as zero, one, two, few, many, other before writing
- Reorder only within the slots those categories occupy, so other keys keep their position
- Applies to splices, the full rewrite and new files; existing lines are untouched

Claude-Session: https://claude.ai/code/session_01K8oRHjFQaCX7h3tszmBHyB
- splitFilesByLocale: name the skipped files instead of one long inline chain
- yaml-handler: share last-segment extraction between pluralGroupOf and cldrRank

Claude-Session: https://claude.ai/code/session_01K8oRHjFQaCX7h3tszmBHyB
- push skips locale files outside outputLocales
- New YAML plural forms written in CLDR order

Claude-Session: https://claude.ai/code/session_01K8oRHjFQaCX7h3tszmBHyB
@arvida
arvida merged commit 352a1aa into main Oct 11, 2026
1 check passed
@arvida arvida mentioned this pull request Oct 11, 2026
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