-
Notifications
You must be signed in to change notification settings - Fork 84
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
Open
ciiay
wants to merge
5
commits into
redhat-developer:main
Choose a base branch
from
ciiay:rhidp-9806-add-i18n-cli-tools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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>
effaf47 to
59a7a6d
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




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