Skip to content

Conversation

@ciiay
Copy link
Member

@ciiay ciiay commented Dec 4, 2025

Hey, I just made a Pull Request!

For RHIDP-9806

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@ciiay ciiay requested review from a team, debsmita1 and karthikjeeyar as code owners December 4, 2025 21:18
@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Dec 4, 2025

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-translations-test
  • @red-hat-developer-hub/backstage-plugin-translations

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/translations-cli workspaces/translations/packages/cli none v0.1.0
@red-hat-developer-hub/backstage-plugin-translations-test workspaces/translations/plugins/translations-test none v0.2.1
@red-hat-developer-hub/backstage-plugin-translations workspaces/translations/plugins/translations none v0.2.1

@ciiay ciiay force-pushed the rhidp-9806-add-i18n-cli-tools branch 2 times, most recently from 06b8735 to 4385805 Compare December 12, 2025 05:34
@ciiay ciiay force-pushed the rhidp-9806-add-i18n-cli-tools branch from da5198d to 213a163 Compare December 12, 2025 20:09
@ciiay ciiay force-pushed the rhidp-9806-add-i18n-cli-tools branch from effaf47 to 59a7a6d Compare December 23, 2025 23:22
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

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!

@github-actions github-actions bot added the stale label Jan 7, 2026
@ciiay ciiay force-pushed the rhidp-9806-add-i18n-cli-tools branch from 09cdfa7 to 41fa2a8 Compare January 13, 2026 03:55
@github-actions github-actions bot removed the stale label Jan 13, 2026
@ciiay ciiay force-pushed the rhidp-9806-add-i18n-cli-tools branch 4 times, most recently from 2f23006 to bc222d8 Compare January 15, 2026 21:02
ciiay added 13 commits January 15, 2026 16:11
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>
ciiay added 8 commits January 15, 2026 16:11
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>
@ciiay ciiay force-pushed the rhidp-9806-add-i18n-cli-tools branch from 08bbacb to a966a57 Compare January 15, 2026 21:11
Signed-off-by: Yi Cai <yicai@redhat.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant