Skip to content

fix(i18n): improve Simplified Chinese translations - #43813

Open
liang-wenjie wants to merge 5 commits into
apache:masterfrom
liang-wenjie:2dev/feat/superset-translations-zh-fix
Open

fix(i18n): improve Simplified Chinese translations#43813
liang-wenjie wants to merge 5 commits into
apache:masterfrom
liang-wenjie:2dev/feat/superset-translations-zh-fix

Conversation

@liang-wenjie

Copy link
Copy Markdown
Contributor

SUMMARY

Improve Simplified Chinese translations in messages.po by fixing untranslated English fragments, incorrect terminology, and awkward UI messages across chart configuration, archive/recovery workflows, SQL Lab, and validation errors.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable: translation-only change.

TESTING INSTRUCTIONS

Review the updated entries in superset/translations/zh/LC_MESSAGES/messages.po.
Run the translation catalog validation/build checks in the normal CI workflow.

ADDITIONAL INFORMATION

  • Has associated issue: Fixes #' + $issue.number + @'
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review

bito-code-review Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #7c80d1

Actionable Suggestions - 0
Additional Suggestions - 8
  • Dockerfile - 1
    • Unused build deps in lean · Line 233-237
      These Debian packages are unused in the lean lineage: `requirements/base.txt` contains no `mysqlclient`, the superset default deps exclude the `mysql` extra, and the `ci`/`showtime` stages derived from `lean` only add `postgres`/`duckdb` extras. The comment claims they build mysqlclient, but nothing here builds it, so they only bloat the image. Remove them, or add `.[mysql]` to the install step if MySQL support is intended.
  • superset/translations/zh/LC_MESSAGES/messages.po - 4
    • Missing python-format flag · Line 5478-5484
      These two plural entries still contain the `%(num)d` format specifier, but the diff removed the `#, python-format` flag. All sibling entries in this block (`rules`, `saved query`, `css template`, `dashboard`, `dataset`) retain it. Without the flag, msgfmt no longer validates that `msgstr` preserves the specifier, so a future mistranslation would go undetected. Restore `#, python-format` on both entries.
    • Remove machine-translation marker · Line 16097-16097
      This entry's `msgstr` is finalized in this PR, but the `# Machine-translated via backfill_po.py` marker above the `msgid` remains. Per the documented translation workflow, machine-translation markers must be removed once a translator has verified the translation. Please delete the marker comment.
    • Inaccurate date translation · Line 13866-13866
      `Start date` is a date placeholder (paired with `End date` in `AnnotationModal.tsx`), so "开始时间" (start time) is inaccurate. Use "开始日期" (start date), consistent with the adjacent "Start date included in time range" = "开始日期包含在时间范围内".
    • Translation adds source content · Line 7064-7064
      The translation "加载前 N 个值失败" adds "N" (top N values) that is not present in the source msgid "Failed to load top values" (used at `MatrixifyDimensionControl.tsx:265`). This introduces content absent from the source and could mislead users. Suggest "加载顶部值失败".
  • docker/pythonpath_dev/superset_config.py - 1
    • Env var naming inconsistency · Line 47-48
      The env var name `SQLALCHEMY_DATABASE_URI` diverges from the `SUPERSET__` convention used for this exact setting: `superset/config.py:3338` and `docker-init.sh:44`/`docker-bootstrap.sh:41` use `SUPERSET__SQLALCHEMY_DATABASE_URI`, and line 59 of this file uses `SUPERSET__SQLALCHEMY_EXAMPLES_URI`. A user following the documented convention won't have their var honored here. Consider `os.getenv("SUPERSET__SQLALCHEMY_DATABASE_URI", ...)`.
  • .github/actions/chart-releaser-action - 1
    • Orphaned submodule pointer · Line 1-1
      This re-introduces an orphaned submodule pointer. Commit 3692ac5 (ci: de-vendor helm/chart-releaser-action #42506) removed this exact gitlink and its `.gitmodules` entry, and the helm release workflow now uses `helm/chart-releaser-action@cae68fef...` directly. With no `.gitmodules` entry, `git submodule update` cannot populate it and nothing references it. Please drop this line.
  • .github/actions/file-changes-action - 1
Review Details
  • Files reviewed - 7 · Commit Range: 76d0a60..8b80250
    • .github/actions/chart-releaser-action
    • .github/actions/file-changes-action
    • Dockerfile
    • docker/pip-install.sh
    • docker/pythonpath_dev/superset_config.py
    • superset-frontend/webpack.config.js
    • superset/translations/zh/LC_MESSAGES/messages.po
  • Files skipped - 5
    • DEV.md - Reason: Filter setting
    • docker-compose-prod-export.yml - Reason: Filter setting
    • docker-compose.backend-local.yml - Reason: Filter setting
    • docs/developer_docs/contributing/howtos.md - Reason: Filter setting
    • superset-frontend/package-lock.json - Reason: Filter setting
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Eslint (Linter) - ✖︎ Failed
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@github-actions github-actions Bot added i18n Namespace | Anything related to localization i18n:chinese Translation related to Chinese language doc Namespace | Anything related to documentation dependencies:npm github_actions Pull requests that update GitHub Actions code labels Sep 3, 2026
Comment thread Dockerfile Outdated
Comment on lines +234 to +237
RUN /app/docker/apt-install.sh \
build-essential \
pkg-config \
default-libmysqlclient-dev

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The lean image keeps the compiler and development packages because pip-install.sh sees build-essential as preinstalled and does not remove them, bloating the runtime image. [performance]

Assessment: 🟠 Major · 🔁 Occurrence: Often

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** Dockerfile
**Line:** 234:237
**Comment:**
	*Performance: The lean image keeps the compiler and development packages because `pip-install.sh` sees `build-essential` as preinstalled and does not remove them, bloating the runtime image.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@bito-code-review

Copy link
Copy Markdown
Contributor

The suggestion to remove build-essential and development packages from the lean Docker image is correct. These packages are only required during the build phase to compile dependencies like mysqlclient and should be removed in the final image to reduce its size and improve security.

To resolve this, you should use a multi-stage Docker build. In the first stage (builder), install the necessary build tools and compile the dependencies. In the second stage (runtime), copy only the necessary artifacts (like the installed Python packages) from the builder stage, ensuring that the build tools are not included.

Would you like me to fetch all the comments and validate the rest of the PR to implement a comprehensive fix?

@liang-wenjie
liang-wenjie force-pushed the 2dev/feat/superset-translations-zh-fix branch from 8b80250 to 0813388 Compare September 3, 2026 06:07
@github-actions github-actions Bot removed doc Namespace | Anything related to documentation dependencies:npm github_actions Pull requests that update GitHub Actions code labels Sep 3, 2026
@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 239859d
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a9a22da2067df0008b835ee
😎 Deploy Preview https://deploy-preview-43813--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.40%. Comparing base (765a4ec) to head (2abb0a8).
⚠️ Report is 43 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43813      +/-   ##
==========================================
- Coverage   79.42%   79.40%   -0.02%     
==========================================
  Files        2895     2892       -3     
  Lines      167947   167821     -126     
  Branches    38896    38782     -114     
==========================================
- Hits       133386   133259     -127     
- Misses      32061    32062       +1     
  Partials     2500     2500              
Flag Coverage Δ
hive 37.69% <ø> (-0.10%) ⬇️
mysql 57.34% <ø> (-0.17%) ⬇️
postgres 57.37% <ø> (-0.17%) ⬇️
presto 39.58% <ø> (-0.10%) ⬇️
python 83.94% <ø> (+0.07%) ⬆️
sqlite 57.06% <ø> (-0.17%) ⬇️
unit 74.53% <ø> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread superset/translations/zh/LC_MESSAGES/messages.po Outdated
@liang-wenjie

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I addressed the translation-related suggestions in commit 91cf7694d8:

  • Translated Start date as 开始日期.
  • Restored the python-format flags for the semantic view and theme plural entries.
  • Removed the machine-translation marker from the verified password message.
  • Changed Failed to load top values to 加载顶部值失败 without adding content not present in the source.

The PR still contains only superset/translations/zh/LC_MESSAGES/messages.po.

@bito-code-review

bito-code-review Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #982abf

Actionable Suggestions - 0
Additional Suggestions - 4
  • superset/translations/zh/LC_MESSAGES/messages.po - 4
    • Remove stale fuzzy flag · Line 17025-17025
      The "Upload Columnar" `msgstr` was corrected here, but the entry still carries the `#, fuzzy` flag (line 17021). Fuzzy entries are excluded from compiled `.mo` files, so this fix won't take effect at runtime and users will still see the English string. Remove the fuzzy marker once the translation is verified.
    • Untranslated English word · Line 10452-10452
      The new translation leaves the English word "other" untranslated ("我们支持的 other 数据库"). For complete localization, translate it as "其他": "或者从我们支持的其他数据库列表中选择:". This string appears in the database-selection UI shown to all Chinese users.
    • Translation term inconsistency · Line 13204-13204
      The control is `start_date_offset` (time comparison offset), and "Time shift" is already translated as "时间偏移" (lines 16264/16352). Using "平移" (pan/translate) here is inconsistent and may mislead users about the control's purpose. Consider "偏移开始日期" for terminology consistency.
    • Leftover machine-translation marker · Line 7902-7902
      The msgstr for "How many top values to select" was corrected from machine-translated garbage to a proper translation, but the `# Machine-translated via backfill_po.py` marker comment (lines 7899-7900) above it was left in place. Per the translation review workflow, remove the marker once a translator has verified the msgstr.
Review Details
  • Files reviewed - 1 · Commit Range: 0813388..91cf769
    • superset/translations/zh/LC_MESSAGES/messages.po
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

- Remove stale fuzzy flag on 'Upload Columnar'
- Translate 'other' in database selection message
- Use '偏移开始日期' for consistency with '时间偏移'
- Remove leftover machine-translation marker on 'How many top values to select'
@bito-code-review

bito-code-review Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #923d8c

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 91cf769..4b8a169
    • superset/translations/zh/LC_MESSAGES/messages.po
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers an incremental AI Review.

  • /review full - Manually triggers a full AI Review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

"These %(type)s will be moved to Recently Archived. You can recover them "
"there within %(days)s days."
msgstr ""
msgstr "这些 %(type)s 将被移至“最近归档”。您可以在 %(days)s 天内从那里恢复它们。"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These strings no longer match the runtime IDs—the caller includes in the Settings menu, and the POT contains only that version—so filling them leaves Chinese users on the fallback text. Could the translations be moved to the active four IDs?

The previous translations sat on stale msgids that no longer exist in
the POT - the runtime IDs include 'in the Settings menu'. Move the four
translated entries (two plural, two singular) onto the active IDs so
Chinese users actually see the translated copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n:chinese Translation related to Chinese language i18n Namespace | Anything related to localization size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants