Add pre-translate option to Phrase plugin - #4820
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 17562b1
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Incremental Code Review Summary
The latest PR update adds the 0.0.18-0 package version and synchronizes the corresponding package-lock entries. The existing pre-translate implementation remains internally consistent: the checkbox defaults off, its value is returned by the dialog, passed through the plugin, and included in the Phrase job payload.
Risk assessment: Standard. This is a scoped plugin UI/API integration change with a version bump and no authentication, billing, destructive, or schema changes.
Two independent incremental review passes found no genuinely new confirmed issues. The package metadata and lockfile versions match, and no regressions were identified in the translation flow. No comments are being submitted.
🧪 Browser testing: Skipped — dev server unavailable on HEAD while dependency setup is still failing/blocked during yarn install (including TypeScript patch errors); will retry on the next incremental review.
Description
Added a "Pre-translate" checkbox option to the Phrase plugin's job creation dialog, allowing users to opt in to using approved translations from Phrase Translation Memory to pre-fill a job.
Changes include:
preTranslatefield (defaulting tofalse) to the configuration editor's local store.FormControlLabelwith aCheckboxUI control insnackbar-utils.tsxto let users toggle the pre-translate option, with a description explaining its behavior.getLangPicksreturn type andonChoosecallback to includepreTranslate.preTranslatevalue throughplugin.tsxwhen creating a job.PhraseApi.createJobto accept and send thepreTranslateflag in the job creation request body.Link to JIRA ticket (if applicable):
https://builder-io.atlassian.net/browse/ENG-13444
To clone this PR locally use the Github CLI with command
gh pr checkout 4820You can tag me at @BuilderIO for anything you want me to fix or change
Note
Low Risk
Scoped plugin UI and job-creation payload with default false; behavior unchanged unless users opt in, though the backend must accept the new field.
Overview
Adds an optional Pre-translate control to the Phrase connector’s translate dialog so editors can request Translation Memory pre-fill when starting a job.
The language picker dialog now includes a checkbox (default off) with copy explaining that approved TM matches can pre-fill the job. That choice is carried through
getLangPicks→createJobas apreTranslateboolean onPOST /api/v1/memsource/job. Package version is bumped to0.0.18-0.Reviewed by Cursor Bugbot for commit 17562b1. Bugbot is set up for automated code reviews on this repo. Configure here.