slang-i18n/slang
在 GitHub 查看`analyze` does not detect translation key usage when keys are accessed via intermediate variables
Open
#310 创建于 2025年7月10日
bughelp wanted
仓库指标
- Star
- (606 star)
- PR 合并指标
- (PR 指标待抓取)
描述
Describe the bug
When running the analyze --full command, the tool fails to recognize translation key usage if keys are accessed through intermediate variables.
To Reproduce
-
Access a translation key with chained access (works fine):
context.t.section.subsection.key -
Assign intermediate variables:
final tSection = context.t.section; final tSub = tSection.subsection;Then use:
tSub.key -
The
analyze --fullcommand incorrectly marks the key as unused.
Expected behavior Keys accessed via intermediate variables are not detected and are incorrectly flagged as unused.