morningman opened a new pull request, #4350:
URL: https://github.com/apache/doris-website/pull/4350

   ## Summary
   
   Small English documentation edits currently regenerate the entire Japanese 
translation and produce large review diffs. Compare the current English source 
with the source commit recorded for the existing translation. Updates at or 
below 30% translate only changed Markdown/MDX blocks and retain the other 
Japanese blocks, including their formatting. Larger updates and new pages use 
full translation.
   
   - Calculate the ratio from non-empty English lines: sum `max(removed, 
added)` for each diff hunk, divided by the larger old/new line count. Exactly 
30% uses incremental translation.
   - Translate complete changed paragraphs, lists, tables, or metadata blocks. 
Apply code changes and deletions directly when no translation is needed. Reject 
model responses that replace a changed block with an entire document.
   - Fall back to full translation when the previous source is unavailable, 
baseline blocks cannot be aligned, or the glossary version changes. Record the 
mode, ratio, baseline hashes, and fallback reason in generation artifacts and 
PR descriptions.
   - Update existing Dev and 4.x translations against their own baselines. 
Retain the shared three-attempt validation and support legacy targets whose 
English heading IDs are supplied at render time.
   
   ## Validation
   
   - `node --test scripts/i18n/__tests__/*.test.cjs`: 144 tests passed, 
including threshold boundaries, insertions/deletions, unchanged target bytes, 
Markdown/MDX, retries, and independent Dev/4.x updates.
   - `I18N_SIM_SCENARIO=incremental node scripts/i18n/simulate-workflow.cjs`: 
passed the local scan, generation, state, syntax, internal-link, and 
publication simulation; only the changed target paragraph and its state record 
changed.
   - `I18N_SIM_SCENARIO=retry node scripts/i18n/simulate-workflow.cjs`: passed 
the full-translation retry and publication simulation.
   - `git diff --check`: passed.
   
   Both simulations use local model/GitHub mocks and a local bare Git remote.
   
   ## Versions
   
   - [x] dev
   - [x] 4.x
   - [ ] 3.x
   - [ ] 2.1 or older (not covered by version/language sync gate)
   
   ## Languages
   
   - [ ] Chinese
   - [ ] English
   - [x] Japanese translation automation
   
   This changes translation tooling and its CI tests. Documentation content, 
routes, sidebars, and English/Chinese counterparts do not need updates.
   
   ## Docs Checklist
   
   - [x] Checked by AI
   - [x] Test Cases Built
   - [x] Updated required version and language counterparts, or explained why 
not
   - [x] If only one language changed, confirmed whether source/translation 
counterparts need sync
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to