openzim / zimit-frontend

Zimit Public Web UI
https://zimit.kiwix.org
GNU General Public License v3.0
7 stars 8 forks source link

Emails should be internationalized #53

Open benoit74 opened 2 months ago

benoit74 commented 2 months ago

While #51 and #46 focused on the UI internationalization, it is clear that it is not sufficient, we must probably also internationalize the emails which are sent.

I suppose we should send the email in the language which was used by the user at the moment where the task was submitted.

@Popolechien do you confirm?

If this is confirmed, it means that translations should in fact be moved to Zimit Python/API codebase, in order to have only one set of strings to translate for TranslateWiki.

This is not a concern, and is in fact even probably a pretty good news since anyway the process of adding a new supported language is rather complex with only #51 work: in addition to creating the appropriate json file, one has to add the language to the combobox, to add the language to the supported language, and to edit the function computing whether the language is ltr or rtl

Moving all translations to Python would be a great opportunity to also automatize most of this process.

It also means that we have to store somewhere the UI language used when the user submitted the task, and since Zimit has no DB it probably has to be stored in contextual information of the requested task / webhook.

Popolechien commented 2 months ago

Ah yes did not think about it but it is a very good point.

rgaudin commented 2 months ago

It can be stored in the webhook url

benoit74 commented 2 months ago

It can be stored in the webhook url

Indeed, good point