Open jindrahelcl opened 2 years ago
Tohle issue, uz jsem resil a nekdo to zase dal do puvodniho stavu. Fungovalo to tak, ze pri zmene jazyka se ponechal text v leve casti jaky byl a vytvoril se k nemu novy preklad v casti prave. Ackoliv to ma Google tak, ze se prohodi i texty, tak jsem se s nekolika lidmi dohodl, ze takhle je to praktictejsi, nebot pri testovani bylo zjisteno, ze lide nejdrive zadaji ceske vety a pak teprve zjisti, ze prekladac preklada z ukrajinstiny, tudiz musi zmenit smer prekladu a ponechat to co tam napsaly.
OK, there are three use cases:
Maybe after solving #29 and especially #25, we can minimize the need for the first use case and implement the switching for the second use case. The first use-case users could alternatively use the history feature, but they probably won't get this idea (most probably they see the application for the first time, otherwise they would set the direction correctly) and it seems the last input before language switch is not stored in the history.
So I am OK with keeping the current behavior for now and close this issue if others agree.
In the end, I would prefer to switch the texts when the switch button is used. I've heard from other users who prefer this (maybe influenced by all the other online translators which switch the texts). It will be in accordance with the Android app (see ufal/lindat-translation-android#3). In addition, we should allow to choose the language direction by clicking on the source/target language name. While supporting Czech and Ukrainian only, this feature is not the top priority, but we will need in future, when adding more languages, anyway. When changing the source language this way, the source text should stay.
swapping languages should also swap the content of the input fields. Now, only the target field is updated and the source remains the same.