Tatoeba / tatoeba2

Tatoeba is a platform whose purpose is to create a collaborative and open dataset of sentences and their translations.
https://tatoeba.org
GNU Affero General Public License v3.0
714 stars 132 forks source link

Allow transcriptions edits #3009

Closed vinkaks closed 1 year ago

vinkaks commented 2 years ago

Attempt to fix #3006

Minor Interface Fix. The backend seems to already have adequate validation to stop sentences with audio from being changed, but allowing transcriptions to be edited.

Theedit sentence form/action now has three states

1) Sentence has Audio and no transcriptions (edit sentence form disabled) Screenshot from 2022-11-01 18-03-15

2) Sentence has no Audio (edit sentence form displayed) Screenshot from 2022-11-01 18-03-25

3) Sentence has Audio and transcriptions (language and sentence inputs disabled) Screenshot from 2022-11-01 18-03-38

Issue 3006 - Allow editing of transcriptions for sentences with audio

jiru commented 1 year ago

Thank you, @vinkaks!

Beside the code comment, I would like to point out a discrepancy between two scenarios:

  1. As the author of the Japanese sentence having audio, I click edit and I am presented with two disabled fields and the enabled transcription field (your screenshot).
  2. As an advanced contributor not being the author of the Japanese sentence having audio, I click edit and I am presented with the transcription field only.

In terms of UX, I think it would be better to show the 3 fields regardless of the scenario. We can merge the PR without that however.

Finally, it would be nice to port the code to the old design, but we can totally merge the PR without that.

vinkaks commented 1 year ago

Thanks for reviewing the PR @jiru

Finally, it would be nice to port the code to the old design, but we can totally merge the PR without that.

In the old design, I think you can already edit transcriptions for sentences with audio, as long as you have the permissions.

jiru commented 1 year ago

In the old design, I think you can already edit transcriptions for sentences with audio, as long as you have the permissions.

Apparently that is true if you are the sentence owner, but advanced contributors cannot edit the transcription of a sentence having audio.

vinkaks commented 1 year ago

@jiru Yes. It seems to be a permissions issue and affects all layouts, checkout the function canEditTranscription

jiru commented 1 year ago

Thanks again, @vinkaks!