French Translation Workflow
Overview
This workflow describes the process for translating access_script content from English to French. Since automated translation APIs are not used in production, we use a semi-automated batch process assisted by developer scripts and human review.
Tools
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.
Workflow Steps
1. Export Data to Batch
First, export the fields that need translation into a batch file.
This creates JSON files in docs/audits/v17-5/ai-results/access-script-fr/input.
2. Generate Prompt
Generate a formatted prompt for your translation workflow.
This will output a batch-001-prompt.md file in the prompts/ directory (adjacent to input/).
3. Get External Translation
- 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.
4. Parse Response
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.json response-001.txt
This creates a completed release batch in docs/audits/v17-5/ai-results/access-script-fr/output/batch-001.json.
5. Validate and Commit
Validate the output before committing.
Once validated, commit the output/ batch file. It is now ready for ingestion by the backfill or import workflows.