dhis2 / notes

:memo: Memos, proposals, agendas and meeting minutes
19 stars 8 forks source link

Interpolations with i18n and RTL #103

Open ismay opened 4 years ago

ismay commented 4 years ago

See this slack thread: https://dhis2.slack.com/archives/C0BP0RABF/p1589358350014700

My question was:

I remember asking a while ago about interpolations with i18n, and I believe the recommendation then was to not do it because it could mess up RTL translations. But we're using it in several areas, so I'm wondering if this just creeped in, or if the recommendations have changed.

@amcgee and I weren't sure, so I've done some testing with the scheduler. I think the issue was the mixing of RTL and LTR characters. This {{ placeholder }} is all LTR chars, and in the translations it'll be mixed with the translation's RTL chars. That gets a bit weird.

You can try it for yourself with this string: سسٹم جابز دیکھا و. Copy it, and paste it in your browser's address bar. Now try typing this sequence in the middle of that string: {{ placeholder }}. It works, but at times, the complete Urdu string reversed for me, which seems like a problem. I will test further and see if mixing RTL and LTR actually results in problems, beyond just a weird editing experience for the translators.

ismay commented 4 years ago

I've done some further testing, and it does seem to interpolate correctly. Seems, because I don't speak the language that we're translating, so it'd be good to verify this with someone that speaks one of the languages that's written right-to-left, and verify that the whole translation workflow isn't broken by this.

amcgee commented 4 years ago

Relates to dhis2/app-platform#369