Asana / locheck

Validate iOS, Android, and Mac localizations. Find errors in .strings, .stringsdict, and strings.xml files.
MIT License
96 stars 10 forks source link

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

Open alex-hunsley-nl opened 1 year ago

alex-hunsley-nl commented 1 year ago

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
stevelandeyasana commented 1 year ago

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?

alex-hunsley-nl commented 1 year ago

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.

stevelandeyasana commented 1 year ago

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