| status | stable | ||||
|---|---|---|---|---|---|
| last_updated | 2026-06-28 | ||||
| owner | jer | ||||
| tags |
|
This workflow describes the process for translating access_script content from English to French. Since automated translation APIs are not used in production, CareConnect uses a semi-automated batch process assisted by developer scripts, review, and data validation.
The workflow is translation-only. Do not add service facts, eligibility, fees, hours, crisis advice, URLs, phone numbers, or verification metadata during translation review.
We have added helper scripts to package.json to streamline this process:
npm run translate:prompt <input-batch>: Generates a prompt file for the translation workflow.npm run translate:parse <input-batch> <response-file>: Parses the returned translation output into a JSON batch.npm run translate:validate <batch-path>: Validates the structure and quality of the batch.npx tsx scripts/merge-ai-enrichment.ts <output-batches...>: Merges reviewedaccess_script_frvalues intodata/services.json.
First, export the fields that need translation into a batch file.
npm run export:access-script-frThis creates JSON files in docs/audits/v17-5/ai-results/access-script-fr/input.
Generate a formatted prompt for your translation workflow.
npm run translate:prompt docs/audits/v17-5/ai-results/access-script-fr/input/batch-001.input.jsonThis will output a batch-001.prompt.md file in the prompts/ directory (adjacent to input/).
- Open the generated prompt file.
- Submit the prompt to your approved translation workflow.
- Copy the returned translation output into a new file, e.g.,
response-001.txt.
Convert the returned text response back into structured JSON.
npm run translate:parse docs/audits/v17-5/ai-results/access-script-fr/input/batch-001.input.json response-001.txtThis creates a completed release batch in docs/audits/v17-5/ai-results/access-script-fr/output/batch-001.output.json.
Validate every reviewed output batch before merging.
npm run translate:validate docs/audits/v17-5/ai-results/access-script-fr/output/batch-001.output.jsonRepeat validation for each output batch. If a permanently closed or otherwise excluded record requires translation, place the reviewed record in a clearly named supplemental output batch and validate it the same way.
Merge only after review confirms meaning preservation and token preservation for phone numbers, URLs, email addresses, emergency numbers, addresses, fees, and eligibility wording.
npx tsx scripts/merge-ai-enrichment.ts docs/audits/v17-5/ai-results/access-script-fr/output/*.output.jsonAfter merging, confirm the service-data diff is limited to access_script_fr, then run:
npm run validate-data
npm run bilingual-check
npm run audit:access-scripts
npm run search:qaCommit the reviewed output batches, review checklist or summary, refreshed audit report, and data/services.json together so the audit trail matches the data merge.