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

   Follow-up to #75669, which documented the zh-TW plural convention but did 
not say where to look before translating a string. Documentation only — no 
locale files change.
   
   This replaces `## Terminology Reference` with `## Translation Workflow`. The 
steps come from cases that came up while translating the zh-TW locale.
   
   ### The same English word can denote different things
   
   `pendingDagRun` (`en/common.json`) counts the Dag runs an asset schedule has 
queued but not yet created, so zh-TW can be specific: 待執行. 
`common:states.pending` is one value in a shared state vocabulary — 
`common:states` also holds `queued`, `running`, `success`, and `failed` — and 
appears in status badges where it means "not handled yet", so it has to stay 
neutral: 待處理.
   
   ### A key is not always searchable by name
   
   `common:states.pending` has exactly one match under `ui/src` — a test 
assertion in `pages/Run/Callbacks.test.tsx`. The real call sites compose the 
key at runtime, for example `` translate(`common:states.${state}`) `` in 
`pages/Jobs.tsx` and `pages/DagRuns/DagRuns.tsx`. Searching the static prefix 
and working out which values `state` can hold leads back to the component; 
searching the full key suggests the string is unused. The commit that added the 
key to `en/` is the other way in — it carries the component change that first 
used it.
   
   ### A label can name something the backend defines differently
   
   The deadline filter option `pending` does not mean "waiting to run". 
`airflow-core/src/airflow/models/deadline.py` stores `Deadline.missed` as a 
boolean, so a pending deadline is one that has not been missed yet. The wording 
has to follow that definition rather than the label.
   
   The section now states the order to follow:
   
   1. what the string denotes — an action, an object, a status, or a field 
value; state and field names are checked against the backend definition
   2. where it is used — the component that renders it, the commit that added 
it to `en/`, and the values behind a runtime-composed key
   3. reuse the established zh-TW wording from the locale files
   4. translate from the English source in `en/`
   5. compare with other locales as a cross-check — a different approach there 
is not a reason to switch on its own, but it is a reason to re-read the English 
string
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — OpenCode (DeepSeek V4.1 Flash Free)
   
   Generated-by: OpenCode (DeepSeek V4.1 Flash Free) 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