Improve heuristic
This commit is contained in:
parent
8695f46b43
commit
d00211964b
1 changed files with 2 additions and 2 deletions
|
@ -4,9 +4,9 @@
|
|||
#
|
||||
# Caveat emptor. Uses a heuristic grep, not perfect.
|
||||
|
||||
jq -r 'keys[]' packages/next/locales/en-US/translation.json | head | while read key
|
||||
jq -r 'keys[]' packages/next/locales/en-US/translation.json | while read key
|
||||
do
|
||||
if ! git grep --quiet --fixed 't("'$key'")' -- :^'**/translation.json'
|
||||
if ! git grep --quiet --fixed '"'$key'"' -- :^'**/translation.json'
|
||||
then
|
||||
echo "possibly unused key ${key}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue