feat(i18n): add per-repo dynamic-prefixes allowlist for check-keys.py - #335
Merged
Conversation
Stem mirror of niac-go#732. Drops the unused-key warning count from
499 → 0 by allowlisting prefixes for keys consumed via dynamic
lookups the static regex can't see:
- settings.tests.* — TestsTab iterates the test catalog and looks up
t(`settings:tests.${test.id}.title`) for 27 tests
- cli.* — consumed by the Go CLI's --help output, not the React TS
frontend; whole namespace is data
- params.<standard>.* — ParamHelpPanel resolves t(`params:${standard}.
${param.name}`) inside a standard → params subtree mapping
- modules.* — ModuleCard renders t(`modules:${module.id}.${field}`)
for Reflector/Benchmark/ServiceTest/TrafficGen/Measure/Certify
- errors.<category>.* — error mapper resolves t(`errors:${category}.
${code}`) keyed by daemon error classification
- common.{buttons,labels,status,results,time,units}.* — UI primitive
reserve
- recovery.* / security.* / setup.* — multi-step flows reading copy
via current-step state
- settings.{general,advanced,interface,license,mode,reflector,sections,
testing}.* — Settings drawer field-schema lookups
Two changes:
- check-keys.py: reads optional scripts/i18n/dynamic-prefixes.txt,
matches both bare paths and namespace-qualified forms (identical
to niac PR #732 patch)
- scripts/i18n/dynamic-prefixes.txt: stem's allowlist documenting
each entry's WHY for future cleanup confirmation
Validator now reports:
- ✓ every t() call has a matching EN locale key
- ✓ every EN locale key is referenced by at least one t() call
Once seed gets the same treatment (sibling PR pending) and all 3
repos hit 0 unused warnings, promote check-keys.py's unused-key
check from warn-only to fail.
krisarmstrong
enabled auto-merge (squash)
May 27, 2026 15:51
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
This was referenced Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stem mirror of niac-go#732. Drops the unused-key warning count from
499 → 0 by allowlisting prefixes for keys consumed via dynamic
lookups the static regex can't see.
What was actually unused vs. dynamic
Two changes
`scripts/i18n/dynamic-prefixes.txt`, matches both bare paths and
namespace-qualified forms. Identical to niac PR #732 patch.
documenting each entry's WHY for future cleanup confirmation.
Test plan
key is referenced by at least one t() call`
Cross-product backfill