Skip to content

[Feature] L10n 每次调用都重建 Set 和 Locale 数组,应缓存 #16

@ShadyUnderLight

Description

@ShadyUnderLight

要解决的问题

L10n.bundlelocalizations Set 和 L10n.localizationCandidates 每次 string() / format() 调用都重新创建,而 localization 在 App 生命周期内不会变。

建议方案

bundlelocalizationCandidates 结果缓存为 static lazy 变量,只在首次调用时计算。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions