gyli opened a new pull request, #73200:
URL: https://github.com/apache/airflow/pull/73200

   The `replace-bad-characters` pre-commit hook rewrites `“` (U+201C) and `”` 
(U+201D)
   to straight `"` quotes. Those code points are not only English "smart 
quotes" — they
   are also the full-width quotation marks that Chinese prose uses to quote 
English
   terms. The hook therefore silently corrupts Chinese translations:
   
   ```
   "“DAG” 是任务的集合"   ->   ""DAG" 是任务的集合"
   ```
   
   This blocks translators from using correct Chinese punctuation. It came up in
   #73113, which fills in the missing zh-CN translations and wants full-width
   quotation marks when quoting English text inside Chinese prose.
   
   The hook's replacement list is global with no per-character allowlist, so the
   available lever is the path `exclude`. This adds the `zh-` locale prefix, 
covering
   both `zh-CN` and `zh-TW` (and any future Chinese locale) with one entry.
   
   The substitution stays in force everywhere else — including every other 
locale and
   all source code — where curly quotes are genuinely unwanted.
   
   ### Scope note
   
   The exclude also exempts these files from the hook's other replacements (tab 
→ 4
   spaces, ` ` → space). That is harmless for these JSON translation 
files, which
   are formatted by prettier. A narrower alternative would be to teach the 
script to
   skip only the quote substitutions for locale paths, but that pushes 
locale-specific
   knowledge into a generic script; happy to switch if reviewers prefer that.
   
   related: #73113
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to