-
Notifications
You must be signed in to change notification settings - Fork 86
feat(translations): added i18n cli tools #1902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
06b8735 to
4385805
Compare
da5198d to
213a163
Compare
effaf47 to
59a7a6d
Compare
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
09cdfa7 to
41fa2a8
Compare
2f23006 to
bc222d8
Compare
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
…epo support
- Add download command to fetch completed translations from Memsource
- Support downloading all completed jobs or specific job IDs
- Support filtering by languages
- Auto-detects repo type and filters files accordingly
- Add deploy command to deploy translations to TypeScript files
- Universal deployment script supporting rhdh-plugins, community-plugins, and rhdh
- Auto-detects repository structure and plugin locations
- Handles different file naming conventions ({lang}.ts vs {plugin}-{lang}.ts)
- Correctly handles import paths (./ref, ./translations, external @backstage packages)
- Updates existing files and creates new translation files
- Automatically updates index.ts files to register translations
- Add comprehensive documentation
- Complete workflow guide for download and deployment
- Multi-repo deployment documentation
- Step-by-step instructions for all three repositories
- Update yarn.lock with latest dependencies
…sues - Replace execSync with safe spawnSync to prevent command injection - Create safeExecSync, commandExists, and safeExecSyncOrThrow utilities - Use separate command and args arrays for safer execution - Cross-platform support (Windows/Unix) for command existence checks - Applied to upload, download, deploy, and config commands - Remove code duplication to improve maintainability - Extract key counting logic to countTranslationKeys() utility - Extract download command args to buildDownloadJobArgs() helper - Extract job listing args to buildListJobsArgs() helper - Extract job download logic to downloadJob() helper function - Fix regex operator precedence in PO file parsing - Group alternation explicitly: /(^["']|["']$)/g - Makes operator precedence clear for SonarQube compliance - Applied to 3 locations in loadFile.ts All changes are refactoring only - no functional changes to workflow. Build and lint checks pass successfully.
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
Signed-off-by: Yi Cai <yicai@redhat.com>
08bbacb to
a966a57
Compare
Signed-off-by: Yi Cai <yicai@redhat.com>
|



Hey, I just made a Pull Request!
For RHIDP-9806
✔️ Checklist