locheck icon indicating copy to clipboard operation
locheck copied to clipboard

Detect when base text is used for other languages

Open taher-mosbah opened this issue 3 years ago • 4 comments

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 !

taher-mosbah avatar Feb 18 '22 10:02 taher-mosbah

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.

stevelandeyasana avatar Feb 18 '22 19:02 stevelandeyasana

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

JacobHearst avatar Feb 22 '22 16:02 JacobHearst

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.

alex-hunsley-nl avatar Sep 12 '22 19:09 alex-hunsley-nl

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

stevelandeyasana avatar Sep 12 '22 19:09 stevelandeyasana