You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Mola-maker (via GitHub)" <gi...@apache.org> on 2026/09/30 08:10:29 UTC

[PR] Add missing zh-CN translations for new UI strings [airflow]

Mola-maker opened a new pull request, #73943:
URL: https://github.com/apache/airflow/pull/73943

   Several recent UI PRs added English strings without zh-CN counterparts, so Simplified Chinese users see those labels in English. They sit on the Dag bundles browse page, the instance health view on the dashboard, the log level toggle in the log viewer, the task group default-expansion setting, the multi-column sort hint, and the per-try log viewer hints.
   
   This adds the 38 missing keys to the zh-CN locale. Terminology follows the existing zh-CN locale conventions and the guide in ``.agents/skills/airflow-translations/locales/zh-CN.md`` (e.g. `套件包` for bundle, `触发器` for triggerer, full-width punctuation for Chinese sentences, half-width spaces between Chinese and English words or placeholders).
   
   Verified by comparing key sets against the ``en`` locale (the same comparison the translation completeness check performs): 0 missing keys remain in the six touched files.
   
   related: #73744
   
    <!-- SPDX-License-Identifier: Apache-2.0
         https://www.apache.org/licenses/LICENSE-2.0 -->
   
   <!--
   Thank you for contributing!
   
   Please provide above a brief description of the changes made in this pull request.
   Write a good git commit message following this guide: https://chris.beams.io/posts/git-commit/
   
   Please make sure that your code changes are covered with tests.
   And in case of new features or big changes remember to adjust the documentation.
   
   For user-facing UI changes, please attach before/after screenshots (or a short
   screen recording) so reviewers can assess the visual impact.
   
   Feel free to ping (in general) for the review if you do not see reaction for a few days
   (72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
   
   In case of an existing issue, reference it using one of the following:
   
   * closes: #ISSUE
   * related: #ISSUE
   -->
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, please
   change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
   -->
   
   - [X] Yes (please specify the tool below): Kimi (AI coding assistant)
   
   Generated-by: Kimi (AI coding assistant) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   
   * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add missing zh-CN translations for new UI strings [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #73943:
URL: https://github.com/apache/airflow/pull/73943#issuecomment-6255282732

   ### Backport successfully created: v3-4-test
   
   Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
   the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
   
   In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
   
   <table>
           <tr>
           <th>Status</th>
           <th>Branch</th>
           <th>Result</th>
       </tr>
       <tr>
           <td>✅</td>
           <td>v3-4-test</td>
           <td><a href="https://github.com/apache/airflow/pull/75023"><img src="https://img.shields.io/badge/PR-75023-blue" alt="PR Link"></a></td>
       </tr>
   </table>


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add missing zh-CN translations for new UI strings [airflow]

Posted by "Mola-maker (via GitHub)" <gi...@apache.org>.
Mola-maker commented on PR #73943:
URL: https://github.com/apache/airflow/pull/73943#issuecomment-5912148315

   Both nits addressed: the `keepTaskState` strings now say 任务存储 (Task State Store) instead of 任务状态, and the PR body key count is updated to 41 (plus the two removed unused keys). Thanks again for the quick turnaround!


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add missing zh-CN translations for new UI strings [airflow]

Posted by "Mola-maker (via GitHub)" <gi...@apache.org>.
Mola-maker commented on PR #73943:
URL: https://github.com/apache/airflow/pull/73943#issuecomment-5911835565

   Thanks for the careful review! All addressed in the latest commits:
   
   1. `dag.json`: the four log-viewer strings now use 尝试 for "try", consistent with the rest of the locale (尝试次数 / 最大尝试次数 / 任务尝试).
   2. `browse.json`: removed the now-unused `dagBundles.bundle_one` / `bundle_other` keys.
   3. `dashboard.json`: degraded → 部分可用, down → 不可用.
   4. All six files re-ordered so their key order matches `en` again.
   
   Also picked up three `keepTaskState` strings that landed in `en` today (`settings.clearing.keepTaskState.*` in common.json, `runAndTaskActions.options.keepTaskState` in dags.json) - missing and unused counts are 0 for all six files.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add missing zh-CN translations for new UI strings [airflow]

Posted by "Andrushika (via GitHub)" <gi...@apache.org>.
Andrushika commented on code in PR #73943:
URL: https://github.com/apache/airflow/pull/73943#discussion_r4142847183


##########
airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json:
##########
@@ -101,7 +101,11 @@
     },
     "settings": "日志设置",
     "viewInExternal": "在 {{name}} 中查看日志(重试 {{attempt}})",
-    "warning": "WARNING"
+    "warning": "WARNING",
+    "tryNotStarted": "此次重试尚未开始。",
+    "viewFailedTry": "查看第 {{tryNumber}} 次失败重试的日志",
+    "viewPreviousTry": "查看上一次重试(第 {{tryNumber}} 次)的日志",
+    "waitingToRetry": "第 {{tryNumber}} 次重试正在等待执行。"

Review Comment:
   These four use 重试 for "try", but the rest of the zh-CN locale uses 尝试 (`tryNumber` 尝试次数, `maxTries` 最大尝试次数, `taskTryPlaceholder` 任务尝试). `stateReasonSummary` in this PR uses 尝试 too.
   
   For example: with `retries=1`, try 1 fails and the task goes to `up_for_retry` with try 2 pending. The log tab then shows "第 2 次重试正在等待执行", but this is the first retry. The button says "查看第 1 次失败重试的日志", but try 1 was the first run, not a retry. And for a task that has not run yet, "此次重试尚未开始" shows up when there is no retry at all.
   
   Maybe something like this:
   ```suggestion
       "tryNotStarted": "此次尝试尚未开始。",
       "viewFailedTry": "查看第 {{tryNumber}} 次失败尝试的日志",
       "viewPreviousTry": "查看上一次尝试(第 {{tryNumber}} 次)的日志",
       "waitingToRetry": "第 {{tryNumber}} 次尝试正在等待重试。"
   ```



##########
airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json:
##########
@@ -558,5 +568,12 @@
     "tooltip": "按 {{hotkey}} 切换换行",
     "unwrap": "不换行",
     "wrap": "换行"
+  },
+  "dagBundle_one": "Dag 套件包",

Review Comment:
   This key replaces `dagBundles.bundle_one` / `bundle_other` in `browse.json`. `en` no longer has those two, but zh-CN still keeps them (`browse.json` lines 15-16).
   
   For example: `breeze ui check-translation-completeness --language zh-CN` on this branch shows 0 missing keys, but lists both under "Unused keys".
   
   Could you remove them in this PR? They are in the same `dagBundles` block you already edit.



##########
airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json:
##########
@@ -295,7 +295,11 @@
         "helper": "未单独设置布局方向的 Dag 和资源图表所使用的方向。",
         "label": "默认图表方向"
       },
-      "title": "图表"
+      "title": "图表",
+      "taskGroupsExpanded": {

Review Comment:
   Nit: the new keys are added at the end of each block, so the order no longer follows `en` (here `taskGroupsExpanded` comes after `title`). Before this PR, the zh-CN order matched `en` in all five of these files. The JSON hook does not sort keys, so this only helps when diffing against `en`.



##########
airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json:
##########
@@ -35,7 +35,22 @@
     "scheduler": "调度器",
     "status": "状态",
     "triggerer": "触发器",
-    "unhealthy": "健康状态异常"
+    "unhealthy": "健康状态异常",
+    "degraded": "降级",

Review Comment:
   Nit, and I am not fully sure: 降级 often reads as a planned service downgrade. Here the badge means some bundles or teams have no running instance, so 部分可用 might be clearer. Same for 宕机 on line 44, where 不可用 is a bit more formal. 
   
   Happy to leave this to a native zh-CN speaker.
   
   



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add missing zh-CN translations for new UI strings [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #73943:
URL: https://github.com/apache/airflow/pull/73943


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org