zulip / zulip-mobile

Zulip mobile apps for Android and iOS.
https://zulip.com/apps/
Apache License 2.0
1.29k stars 649 forks source link

Create a pseudolocale for i18n testing purposes #4052

Open rk-for-zulip opened 4 years ago

rk-for-zulip commented 4 years ago

For context: Wikipedia's article on pseudolocalization.

Unfortunately, we don't do much in-house testing of our localization, and this can lead to issues like #4013. This could be ameliorated somewhat if we were to autogenerate translations for pseudolocale from messages_en.json, and encourage any (mostly-)monolingual Anglophones to test from within it. Any unlocalized strings would stand out as being undecorated.

agrawal-d commented 4 years ago

This is done in the zulip/zulip repository. In their tests, i18n is emulated as:

Original String: "Uploading filename..." String that appears in tests: "translated: Uploading filename..."

This was helpful, because while working on my PR and writing tests, I realised some of my code was incorrect as it left some strings un-localized.

Is above an example of pseudo-localization?

rk-for-zulip commented 4 years ago

Is above an example of pseudo-localization?

Yes – and it's also an example of pseudolocalization being useful!