feat(translations): remove i18n subcommand and group memsource commands into a subcommand#2418
Conversation
…ommand and moved some files for this Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
…ds into a subcommand Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
Changed Packages
|
Review Summary by QodoRestructure CLI commands: remove i18n subcommand and group memsource commands
WalkthroughsDescription• Removed i18n subcommand, promoting core commands to top level • Grouped Memsource/TMS commands under new memsource subcommand • Reorganized command files into memsource/ subdirectory • Replaced vitest with backstage-cli package test command • Updated all documentation and CLI examples to reflect new structure Diagramflowchart LR
A["Old Structure<br/>i18n [command]"] -->|Remove| B["Top-level Commands<br/>init, generate, deploy, status, clean"]
A -->|Reorganize| C["memsource [command]<br/>setup, upload, download, list, sync"]
D["Memsource Commands<br/>in src/commands/"] -->|Move| E["Memsource Commands<br/>in src/commands/memsource/"]
F["vitest"] -->|Replace| G["backstage-cli package test"]
File Changes1. workspaces/translations/packages/cli/src/commands/index.ts
|
Code Review by Qodo
1. Test scripts broken
|
|
| "test": "backstage-cli package test", | ||
| "test:quick": "./scripts/quick-test.sh", | ||
| "test:integration": "./scripts/integration-test.sh", | ||
| "test:real-repo": "./scripts/real-repo-test.sh", | ||
| "test:workflow": "tsx scripts/workflow-verification.ts", | ||
| "test:manual": "echo 'See docs/manual-test-checklist.md for manual testing steps'", |
There was a problem hiding this comment.
1. Test scripts broken 🐞 Bug ⛯ Reliability
@red-hat-developer-hub/translations-cli now invokes scripts under ./scripts/*, but those scripts still run removed translations-cli i18n ... commands and expect i18n/reference.json. As a result, yarn test:quick, test:integration, test:real-repo, and test:workflow will fail or validate the wrong behavior.
Agent Prompt
### Issue description
The CLI removed the `i18n` command group and requires `--sprint` for `generate`, but multiple repo scripts invoked by `yarn test:*` still call `translations-cli i18n ...` and check for `i18n/reference.json`. This breaks the package’s documented/release testing workflows.
### Issue Context
- `package.json` now points `test:quick`, `test:integration`, `test:real-repo`, and `test:workflow` to `./scripts/*`, so these scripts are expected to work.
- The CLI now registers `generate` as a top-level command and requires `--sprint`.
### Fix Focus Areas
- workspaces/translations/packages/cli/scripts/quick-test.sh[14-55]
- workspaces/translations/packages/cli/scripts/integration-test.sh[93-110]
- workspaces/translations/packages/cli/scripts/real-repo-test.sh[28-60]
- workspaces/translations/packages/cli/scripts/compare-reference-files.sh[41-55]
- workspaces/translations/packages/cli/scripts/workflow-verification.ts[260-280]
- workspaces/translations/packages/cli/src/commands/index.ts[44-60]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Hey, I just made a Pull Request!
First two commands are already part of #2417. This PR changes how the cli work with some opiniated renamings:
Before:
Everything is under i18n:
With this PR I removed the i18n group and grouped the memsource commands into a new subcommand:
Memsource:
✔️ Checklist