tatoeba2 icon indicating copy to clipboard operation
tatoeba2 copied to clipboard

It's possible to add translations in a language that is hidden from view

Open Yorwba opened this issue 1 year ago • 2 comments

To Reproduce

  1. Go to your settings.
  2. In the "Languages" field, enter some ISO 639-3 codes to limit which translations will be displayed.
  3. Go to any sentence.
  4. Add a translation with the dropdown set to "Auto detect".
  5. If the language is detected as something that is not in the list from step 2, it will nonetheless show up in the list of translations.
  6. Refresh the page.
  7. The newly-added translation is no longer visible, although it is of course still present in the database.

Expected behavior I think the least surprising outcome would be if at step 5 the server refuses to add the translation and instead returns an error message telling the user to specify the language explicitly.

Another possibility would be to have the translation remain visible at step 7 (i.e. an exception to the functionality of limiting translations to only particular languages, in order to always show the user's own sentences).

Additional information In #1614, it was suggested to set the language to "unknown" if the auto-detected language is not in the user's profile languages, but that wouldn't help here, because "unknown" is of course also not in the user's translation languages. (And it's possible for the profile languages and the translation languages to be different, which doesn't help either.)

Yorwba avatar Apr 30 '23 10:04 Yorwba