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

Detect when base text is used for other languages #34

Open taher-mosbah opened 2 years ago

taher-mosbah commented 2 years ago

Thanks for this great tool, I have an improvement suggestion but not sure if it would be useful for everyone: a common case is when developers is waiting for translation is to put the English (base) text for other languages and forget about it.

Cheers !

stevelandeyasana commented 2 years ago

Neat idea! I agree something like this would be useful, but I'm not sure it's ready to go in as-is, just because there isn't currently a way to silence specific instances of warnings. I'm imagining a case like "%d/%d", where it would be common for translations to be the same as the base language. I'm going to leave this open until we have that feature.

JacobHearst commented 2 years ago

This PR will resolve #33

Edit: This did not link the issue like I thought it would, not sure if that functionality is a repo setting or something

alex-hunsley-nl commented 1 year ago

If this feature is added, is it possible to allow it to be disabled by use of a flag? Our localization deliberately in some cases uses the same values in a translation as base. We do that because in some languages the app doesn't need translation in some areas (a feature isn't available in that country). But if we just omitted the key, locheck would complain about it being missing.

stevelandeyasana commented 1 year ago

This won't be merged until we have a general way of letting people opt out of rules, similar to what SwiftLint has.