Skip to content

feat(dialtesting): preserve workspace language codes#193

Merged
coanor merged 1 commit into
GuanceCloud:mainfrom
zhengb-gc:fix-dialtesting-workspace-language
Jul 8, 2026
Merged

feat(dialtesting): preserve workspace language codes#193
coanor merged 1 commit into
GuanceCloud:mainfrom
zhengb-gc:fix-dialtesting-workspace-language

Conversation

@zhengb-gc

Copy link
Copy Markdown
Contributor

Summary

This PR fixes workspace language normalization for dialtesting tasks.

Previously, GetWorkspaceLanguage() only preserved en; every other value was forced to zh. This caused valid workspace language codes such as Indonesian and Traditional Chinese variants to be lost.

Changes

  • Add NormalizeWorkspaceLanguage() to centralize workspace language handling.
  • Preserve supported language codes:
    • en
    • id
    • zh-hant
  • Normalize common Chinese variants:
    • zh-CN, zh-Hans -> zh
    • zh-Hant, zh-TW, zh-HK -> zh-hant
  • Normalize casing, surrounding spaces, and _ separators.
  • Keep existing fallback behavior: empty or unknown language values still resolve to zh.

@zhengb-gc zhengb-gc closed this Jun 26, 2026
@zhengb-gc zhengb-gc reopened this Jul 8, 2026
@coanor
coanor merged commit c9f4aa1 into GuanceCloud:main Jul 8, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants