Signbank / Global-signbank

An online sign dictionary and sign database management system for research purposes. Developed originally by Steve Cassidy/ This repo is a fork for the Dutch version, previously called 'NGT-Signbank'.
http://signbank.cls.ru.nl
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

About the feedback system #1258

Open uklomp opened 1 month ago

uklomp commented 1 month ago

I wanted to change the text on the "Feedback > Report a missing sign" page, as it's in English and a bit too extensive. I thought I could do this in Django, but when I look at pages and then /feedback/missing/, there is a different text, namely 'yet to be created'. Where can I find the page/text that I'm looking for?

susanodd commented 1 month ago

There is a feedback model. Most of the pages have templates, so the Django "contents" is just ignored. The template files are used.

There are translations in the "po" files.

Probably nobody bothered to fill in long translation paragraphs during the decades the feedback pages have existed. These are from the original signbank. We basically removed irrelevant content that referred to Auslan.

Probably the paragraphs need to be broken up into sentences so that each gets a translation. I'll see how that is set up.

susanodd commented 1 month ago

Here are some missing sign feedback sentences from the "po" file.

#: signbank/feedback/templates/feedback/missingsign.html:42
msgid "Thank you for your feedback."
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:46
msgid "Please submit a video comment showing the sign you think is missing."
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:47
msgid "Please produce the sign in isolation and then in an example sentence."
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:48
msgid ""
"Please also type in the English translation equivalent below as well as your "
"contact information (name and email address) so we can contact you for a "
"follow up if need be."
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:52
msgid "Thank you for taking the time to contact us and help SignBank grow."
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:56
msgid ""
"You may either upload a video that shows the missing sign or fill in details "
"below. In either case, you should enter a meaning and any comments you might "
"have in the text boxes at the bottom of the form."
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:64
msgid "Video Comment"
msgstr ""

#: signbank/feedback/templates/feedback/missingsign.html:70
msgid "What is the sign language of the missing sign?"
msgstr ""

Django generates the above when the messages are compiled. If you want you can modify the translations above and I'll put them in the file.

Here is a link to the file itself: https://github.com/Signbank/Global-signbank/blob/master/conf/locale/nl/LC_MESSAGES/django.po

Only the "msgstr" part should be modifed that's underneath the string to translate (msgid). Django does a search on the msgid part and substitutes the msgstr for it. The file name and line number are generated by Django and should not be changed.

If the "English" sentence is wrong, it needs to be changed in the template. Then those sentences are looked up in the po-file.

susanodd commented 1 month ago

From above, the long sentences that end up on multiple lines in the po-file are kind of annoying to translate. There are also entire paragraphs with patterns in them in the file.

If you can locate the trouble-makers in the translation file, we can split up or rewrite the English text in the html-template, then compile the messages again. The the English will be changed and a translation can be given in the new po-file.

susanodd commented 1 month ago

@uklomp as you can see from the above PO code, none of the feedback text has ever been translated.

Are you able to fill in the above sentences?

It's the same in the PO file itself, but care must be taken in editing, in case it won't compile anymore.

Did you get any feedback from @ocrasborn about how he did the translations for other languages with colleagues?

I could copy the areas of the PO file as above for all the feedback pages. The only tricky ones are the multiple line ones, because Django chops them up into smaller pieces. The translation that gets added by hand also needs to be chopped up like that so the lines are not too long.

If the English text needs to be changed, that needs to be done in the template, NOT in the PO file. Then after the English is changed, the PO file needs to be generated again. (It won't work at all if the English is changed in the PO file.)

uklomp commented 1 month ago

Ok, so you need the translations from me, and the adaptations to the texts, and you will implement it then, right? I will look at it next week! I didn't talk to Onno about this, no.

susanodd commented 1 month ago

Ok, so you need the translations from me, and the adaptations to the texts, and you will implement it then, right? I will look at it next week! I didn't talk to Onno about this, no.

Yes, thanks!

Regarding the other languages, @ocrasborn has some translations, I recall, but I don't know if they were ever included. So I have not recompiled the other languages, because I don't know if they are old PO files that the colleagues filled in, or if he has them in a spreadsheet or something. For the About pages, he once sent me word documents with the text. So I copy pasted Right to Left languages into the Admin pages for that. But the PO files, I have no idea how he did that in the past.

uklomp commented 1 month ago

Hi. I discussed it with the others and we'd actually like to reform it all.

Our proposal:

‘Wat is het ontbrekende gebaar?’ / What sign do you think is missing? (video upload, like now, but then immediately visible and not in a hidden panel)

‘Uit welke gebarentaal komt het missende gebaar?’ / From which sign language is this sign? (drop-down menu, like now)

‘Wat betekent het gebaar? Geef uitleg, een vertaling en/of een voorbeeldzin’ / What does this sign mean? Please provide an exlanation, translation and/or example sentence’ (video upload and text field)

‘Overige opmerkingen / informatie over het gebaar’ / Other remarks / information about the sign
(field for typing)

First three questions are obligatory, last one is optional.

Would this be possible?

susanodd commented 1 month ago

Yes, definitely possible! I'll edit the text in the templates, then the translations as you provide.

susanodd commented 1 month ago

@uklomp is it true that you would like two videos? One of the sign and one of the example sentence?

susanodd commented 1 month ago

I noticed there is actually some feedback from this year. But it's about the site not being accessible from science.

susanodd commented 1 month ago

@uklomp I'll need to make a migration for the feedback to allow a second video for a sentence.

The feedback videos are stored in folder "comments" on the server. But it looks like not much was ever done with this, since the feedback was barely used. 10 years ago, people were not big users of social media.

The videos are stored with the same name as the uploaded file. This is kind of sloppy.

Any suggestions on how to structure the comments folder? How would you like to have the files arranged? We could make up new names like missing-sign-NNNN.mp4 and missing-sentence-NNNN.mp4 (where the NNNN is an id for the specific MissingSignFeedback object ID. (with the akward naming as such for the linked sign and sentence videos of the comment.) The user is stored in the comment already, since one needs to be logged in to post feedback.

Any suggestions on how to name/store the videos? They need to have unique names, thus names must be created. There can be folders per dataset, as for the gloss videos.

uklomp commented 1 month ago

OK. I'd like two videos indeed. The first one can indeed be something with 'missing sign [language]' in the name, where [language] is the language that is selected in the drop-down menu, and the other should be something with 'meaning missing sign [language]'. If this is not too difficult. And then they should be saved with the dataset of the selected language.

susanodd commented 1 month ago

OK. I'd like two videos indeed. The first one can indeed be something with 'missing sign [language]' in the name, where [language] is the language that is selected in the drop-down menu, and the other should be something with 'meaning missing sign [language]'. If this is not too difficult. And then they should be saved with the dataset of the selected language.

Okay, much clearer.

susanodd commented 1 month ago

This is nearly done, with the exception of a sentence video upload.

I just discovered a feedback section I totally forgot about!

If you are on a particular sign (gloss detail view), there is a button for feedback about the sign.

That particular kind of feedback is visible from:

/datasets/recent_feedback

But there is no menu item or link to this page....

I added the recent feedback page to the datasets menu. It's only visible for Dataset Manager and Editor Now the feedback users provide about specific glosses will be visible here.

recent_feedback_datasets

susanodd commented 1 month ago

This is on signbank now.

uklomp commented 1 month ago

Hi, thanks. I probably should have thought about this before, but would it be possible to capture the videos directly with the webcam, like we do when we record glosses? Instead of uploading a video file?

susanodd commented 1 month ago

Yes, that will take more time.

(See the previous comments in #1169 about the html ids that overlap. It's necessary to revise the record code to be parametric, or make new ids for the input area.)

I realised I have a problem with this one. Recording a video does not work on Safari nor on Firefox. So it's not possible for me to develop this code. (I would be creating a black box and not be able to see any output to see what it does.)

I found some Ubuntu examples of attaching a telephone camera to the computer to feed that. I'll try to find if any solutions are out there.

susanodd commented 1 month ago

I just tried to run Chrome on my computer (Ubuntu), but it crashes and won't run. The first time the computer froze and I needed to reboot. The next time it didn't show up at all after starting it.

Third time lucky.

Oops. #266

susanodd commented 1 month ago

Hi, thanks. I probably should have thought about this before, but would it be possible to capture the videos directly with the webcam, like we do when we record glosses? Instead of uploading a video file?

I am not able to implement this because it does not work on any of my computers or browsers. (It does not work on Ubuntu nor on 2012 Apple.)

It seems the conversion software does not work on these OS specific webcam formats. Or at least the person who used to know how to do this is still gone (@vanlummelhuizen)

I suppose I can implement this blind. Then just put it on signbank-dev without testing it during development.

susanodd commented 1 month ago

I totally HATE Chrome.

I can't remove the browser data from the page. It won't destroy the previous form data once it's been entered. This does not work at all with PyCharm. I can't debug the record video code. This code does not work on Firefox. But on Chrome, Chrome is useless.

uklomp commented 4 days ago

So, is it correct that you're not able to implement my last request about the quick recordings? Then we'll leave it like this.

susanodd commented 1 day ago

Yes, that is correct. I need some help from @Jetske since it won't work on my computers. (The files that Ubuntu makes are not readable on the computer that @Jetske uses, and vice verse. It makes some strange format. And the feature is turned off for Apple, although Safari can successfully record the videos, this feature is turned off at the moment. We had trouble with the video format in the other routines that process the videos.) So short answer, I need help to implement this. I started coding the "recording" buttons for the template, since two are needed but then can't actually get any farther because of the formatting.

susanodd commented 23 hours ago

I added @Jetske to this issue to help with the recording feature for videos.