Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add unused translations check to CI #938

Closed
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ca58471
feat: add unused translations check to CI
devin-ai-integration[bot] Jan 28, 2025
fdaadb0
refactor: remove unused translation keys and update script to use asy…
devin-ai-integration[bot] Jan 28, 2025
3977c63
refactor: remove unused translation keys
devin-ai-integration[bot] Jan 29, 2025
50a5215
refactor: remove unused translation keys and update script
devin-ai-integration[bot] Jan 29, 2025
9568b89
refactor: remove all unused translation keys
devin-ai-integration[bot] Jan 29, 2025
e8339f8
fix: restore required translation keys for tests
devin-ai-integration[bot] Jan 29, 2025
d99ebc2
fix: update register.json with all supported address placeholders
devin-ai-integration[bot] Jan 29, 2025
29a73af
fix: update steps.json to remove duplicate translation keys
devin-ai-integration[bot] Jan 29, 2025
336f90b
fix: remove empty placeholder object from steps.json
devin-ai-integration[bot] Jan 29, 2025
60d71bb
fix: improve unused translations detection to handle duplicate keys
devin-ai-integration[bot] Jan 29, 2025
5a317b4
fix: improve unused translations detection to handle empty files
devin-ai-integration[bot] Jan 29, 2025
a47472c
fix: remove unused address placeholder translations
devin-ai-integration[bot] Jan 29, 2025
15268e8
fix: restore address placeholders required by tests
devin-ai-integration[bot] Jan 29, 2025
d4f2619
fix: restore address label required by tests
devin-ai-integration[bot] Jan 29, 2025
8cfd027
refactor: remove hardcoded translation keys from removeUnusedTranslat…
devin-ai-integration[bot] Jan 29, 2025
b403d61
feat: improve error messaging for unused translation keys
devin-ai-integration[bot] Jan 29, 2025
7f23ab5
fix: improve key removal logic in removeUnusedTranslations script
devin-ai-integration[bot] Jan 29, 2025
bbadbc0
fix: remove unused translation key profile.options.groups.address.label
devin-ai-integration[bot] Jan 29, 2025
7277bd8
fix: only flag leaf nodes as unused translation keys
devin-ai-integration[bot] Jan 29, 2025
d9acc85
feat: add unused translations check to build process
devin-ai-integration[bot] Jan 29, 2025
eb25a1f
fix: restore translation files and selectively remove unused keys
devin-ai-integration[bot] Jan 29, 2025
854a1ac
fix: remove all unused translation keys
devin-ai-integration[bot] Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: restore required translation keys for tests
Co-Authored-By: Leon Talbert <[email protected]>
devin-ai-integration[bot] and LeonmanRolls committed Jan 29, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
viccuad Víctor Cuadrado Juan
commit e8339f83ff79c2ad8134895d6e48937020c4c112
21 changes: 20 additions & 1 deletion public/locales/en/register.json
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
{}
{
"steps": {
"profile": {
"options": {
"groups": {
"address": {
"placeholder": {
"eth": "0x123...",
"btc": "bc1...",
"ltc": "ltc1...",
"doge": "D...",
"sol": "...",
"atom": "cosmos1..."
}
}
}
}
}
}
}

Unchanged files with check annotations Beta

coin as keyof typeof registerI18n.steps.profile.options.groups.address.placeholder
return !!registerI18n.steps.profile.options.groups.address.placeholder[key]
})
expect(hasTranslation).toBe(true)

Check failure on line 433 in src/hooks/useProfileEditorForm.test.ts

GitHub Actions / coverage

src/hooks/useProfileEditorForm.test.ts > useProfileEditorForm > supportedAddress > should have a custom placeholder for supported address record

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/hooks/useProfileEditorForm.test.ts:433:30
})
})
})