-
Notifications
You must be signed in to change notification settings - Fork 80
feat(i18n): added scripts for i18n and more #1448
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
|
|
/retest |
|
The tests are getting stuck when running a template. Instead of showing the run summary it ends up on a 404 page This doesn't seem to happen on main, we tried #1460. I'm guessing it's the new dependencies somehow messing up backstage for the tests. |
| # --- Helper functions from original script ----------------------------------- | ||
| source_ts_files() { | ||
| local repo_dir="$1" | ||
| find "$repo_dir" -path "*/src/translations/ref.ts" -type f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this rhdh-plugins repo four plugins uses ref.tsand lightspeed plugin uses translationRef, since we own this repo we can rename that file to ref.ts in lightspeed plugin but in backstageconsistently usestranslation.ts as the filename and community-plugins may have different naming as well (especially this is contributed from the community), we need to come up with a strategy to cover all the scenarios to avoid missing some plugins.
3d70a1f to
aaaf49c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jrichter1 @HusneShabbir , I have verified when I remove changes in this file the e2e tests will pass. But when I remove these two dependencies, I got another CI failure as following
✘ https://google.com/#q=%40backstage%2Fno-undeclared-imports
@backstage/backend-plugin-api must be declared in dependencies of packages/backend/package.json, run 'yarn --cwd packages/backend add @backstage/backend-plugin-api' from the project root
src/extensions/PermissionPolicyExtension.ts:16:1
14 | * limitations under the License.
15 | */
> 16 | import { createBackendModule } from '@backstage/backend-plugin-api';
| ^
17 | import {
18 | PolicyDecision,
19 | isPermission,
✘ https://google.com/#q=%40backstage%2Fno-undeclared-imports
@backstage/plugin-scaffolder-backend-module-github must be declared in dependencies of packages/backend/package.json, run 'yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend-module-github' from the project root
src/index.ts:24:13
22 | backend.add(import('@backstage/plugin-proxy-backend'));
23 | backend.add(import('@backstage/plugin-scaffolder-backend'));
> 24 | backend.add(import('@backstage/plugin-scaffolder-backend-module-github'));
| ^
25 | backend.add(import('@backstage/plugin-techdocs-backend'));
26 |
27 | // auth plugin
✘ 2 problems (2 errors, 0 warnings)
When the PermissionPolicyExtension.ts got introduced, there were these two dependencies in the backend package.json, and the PR got merged. But now these two dependencies got removed from the package.json somehow and that's why it won't fail the e2e tests in main branch. Not sure why the PR didn't get the lint error when removing these two dependencies required in PermissionPolicyExtension.ts.
@karthikjeeyar I see you added this PermissionPolicyExtension.ts, do you see a workaround to avoid both ci failures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try removing the typescript dependancy in the root level package.json or match it with the typescript version used elsewhere in the project to see if that fixes this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found that if you simply add all the mentioned dependencies, everything works fine. The moment you do a yarn dedupe, the problem starts to appear. In other words, it's the yarn.lock file, rather than the new dependencies causing this. Essentially, the choice is which CI check is going to fail (tests or the lockfile check).
Now the question is, will this have any implications outside just running this plugin using yarn start?
If not, then the tests don't even need to wait for the template result screen, as long as the insights event triggers.
| "prettier": "^3.4.2", | ||
| "semver": "^7.7.2" | ||
| "semver": "^7.7.2", | ||
| "typescript": "^5.9.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt if this mismatched typescript version in the root level is causing some ci failures in this PR, in main-branch there no e2e-tests and lint errors are observed.
65f5c59 to
96617ca
Compare
664e527 to
dfefb7b
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! |
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
Signed-off-by: Yi Cai <[email protected]>
dfefb7b to
d2d416b
Compare
|



Hey, I just made a Pull Request!
For RHIDP-8763.
PR Summary: I18n Scripts Enhancement and Translation Sync Fix
Added scripts to collect and upload translation reference JSON files to TMS project
Added scripts to download and sync translations with received translation files
Added utility scripts for translation workflow management
Fixed critical path resolution issue in i18n configuration
Enhanced translation sync algorithm to prevent file corruption
Added comprehensive documentation for i18n scripts
Updated package.json with new i18n commands
Updated French translation TypeScript files in global-header plugin
Added .gitignore entries for translation backup files
✔️ Checklist
Testing Guide: I18n Scripts Workflow
Prerequisites
i18n.config.shcoordinatelyQuick Test Steps
1. Generate and upload JSON files
2. Download and sync translations
3. Verify quality
4. Test cleanup
5. Verify app runs
Success Criteria
Key Fixes Validated
{{variables}}preserved correctly