locheck icon indicating copy to clipboard operation
locheck copied to clipboard

locheck detects orphan strings in base, but not in the other files

Open alex-hunsley-nl opened this issue 3 years ago • 3 comments

So if I have a Base localisation strings file with 2 entries in it, and a fr with 3 entries, and run locehck with --base Base, it doesn't see any problem. It seem like that this situation should be noticed as a warning?

As a work around, I am running locheck multiple times with every localisation file as --base, so it catches all possible orphans:

locheck ... -base Base
locheck ... -base fr

alex-hunsley-nl avatar Oct 05 '22 09:10 alex-hunsley-nl

While I agree this is technically "wrong," I'm not sure how someone would end up in a situation where this matters, since your app will never notice the extra strings. What impact does it have on your users or development process?

stevelandeyasana avatar Oct 06 '22 18:10 stevelandeyasana

It matters to us because you want to know you have cruft lying around in files that can be deleted.

The less stuff there, the easier the code base is to understand. Extraneous info make it easier to have misunderstandings about what is going on and hurts the ability of e.g. automated processes to understand what is in the files. For example, we might scan all localization files and gather the strings to do something with.

alex-hunsley-nl avatar Nov 07 '22 15:11 alex-hunsley-nl

Locheck does have enough information to check for this and I'd accept a PR that adds support for a new warning.

stevelandeyasana avatar Jan 06 '23 18:01 stevelandeyasana