Using the following script, it would appear there are a lot of i18n messages we are no longer using and so they should be removed:
find i18n -name 'en.json' -type f | while read -r file; do
echo "== Checking $file =="
for key in $(jq -r 'keys[] | select(. != "@metadata")' "$file"); do
grep -rqF "$key" --include='*.php' --include='*.js' --include='*.json' --include='*.vue' \
--exclude-dir=i18n --exclude-dir=node_modules --exclude-dir=vendor . \
|| echo "unused: $key"
done
doneThis doesn't account for dynamically constructed message keys, but those should always be documented anyway (1, 2).
The work involved here might involve tediously checking for dynamic messages, and documenting those with the usual The follow messages are used here: … comments.