Tencent / Tencent/tdesign-flutter

feat: 支持资源文案的 Material 本地化兜底

Open
#994 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
1.2k
Forks
182
Avg merge
2d 2h
Merged PRs (30d)
88

Description

背景

TResourceDelegate 的默认实现固定返回中文文案。组件资源代理目前建议使用 MaterialLocalizations 作为备用,但默认实现尚未根据当前 Locale 提供本地化兜底。

期望

  • 评估 TDesign 资源代理与 Flutter MaterialLocalizations 的优先级;
  • 在未显式提供 TResourceDelegate 时支持合理的本地化兜底;
  • 覆盖中文、英文及自定义资源代理场景。

相关代码

  • tdesign-component/lib/src/theme/resource_delegate.dart

该事项原先由 TODO 文档说明,属于仍有行为影响的国际化缺口。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading tdesign-component/lib/src/theme/resource_delegate.dart and trace how TResourceDelegate and Flutter MaterialLocalizations are selected. Define the fallback behavior for Chinese, English, and a custom resource delegate, then add or update coverage for those cases. Done means the default path follows the current locale while an explicitly provided delegate retains priority.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
internationalization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.