Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Locale files carry 2,222 obsolete keys that no longer exist in en.yaml

Open Dio77799 opened this issue 3 weeks ago • 3 comments

21 of the 23 translations still contain keys that were removed from en.yaml (about 110 per file, 2,222 entries in total), e.g. options, thread_number_hosts, ftp_connectiontimeout, viewdns_domain_404. messages() only resolves keys that exist in en.yaml, and none of these keys is referenced anywhere in the code, so they are dead entries that translators keep updating for nothing.

Proposed fix: delete only those key/value blocks (no remaining translation is changed) and add a unit test that fails if a locale defines a key that en.yaml does not, so they don't come back.

This touches every locale file, so it would conflict with open locale PRs (e.g. #1407, #1260). I'm happy to wait until those are merged and regenerate the change on top of master. Could you assign this to me?


OS: Windows

OS Version: 11 Pro

Python Version: 3.12

Dio77799 avatar Nov 08 '26 08:11 Dio77799

Hi maintainers, I'd like to work on these issues. I have PR #1874 ready with fixes. Could you please assign these issues to me so I can proceed? My commits are now GPG-signed and ready for review.

Thanks!

user-Param avatar Nov 12 '26 11:11 user-Param

@arkid15r @securestep9 Hi, I'd like to work on this issue. I have a fix ready with PR #1874 open. Could you please assign this issue to me so I can proceed? My commits are now GPG-signed and ready for review.

Thanks!

user-Param avatar Nov 12 '26 11:11 user-Param

Thanks for merging #1866 and #1867! I'd like to pick this one up, could you assign it to me?

The branch is ready. It only deletes the 2,222 orphan entries in 21 locale files, nothing else changes. I also added a test that fails if a translation has a key that en.yaml doesn't.

Noticed one thing though: #1407 and #1260 touch the same locale files. I checked with git merge-tree against master and #1407 would go from 1 to 21 conflicting files, #1260 from 2 to 12. Happy to wait if you'd rather merge those first. The removal is scripted, so redoing the branch after is quick.

Dio77799 avatar Nov 14 '26 04:11 Dio77799