tatoeba2 icon indicating copy to clipboard operation
tatoeba2 copied to clipboard

Allow switching more sentences to CC0

Open cangareijo opened this issue 3 years ago • 7 comments

If a sentence is not original, but is linked to another sentence that's CC0, then it should be switchable to CC0. It should also be possible to mass switch such sentences.

cangareijo avatar Sep 04 '22 22:09 cangareijo

This would have to be limited to sentences based on sentences licensed under CC0. Otherwise you could link any of your sentences to an existing CC0 sentence and then switch the license.

Yorwba avatar Sep 05 '22 19:09 Yorwba

That's fine by me, to allow switching sentences that are not original to CC0, only if they were added to Tatoeba as translations of sentences that are now CC0.

cangareijo avatar Sep 05 '22 22:09 cangareijo

This seems within my capabilities (deep breath), and I'd like to work on it. I'm in the process of figuring out what all is going on when the license is changed, and have yet to find out where exactly the check is performed for whether a sentence is original. If anyone happens to remember, feel free to let me know, but I'll keep looking.

profesyonal avatar Mar 07 '24 14:03 profesyonal

@profesyonal The check whether the sentence is original is in SentencesTable.

I found this by looking at the way the QueueSwitchSentencesLicenseTask changes the license, which is by patching a Sentences entity, and that implies that the SentencesTable is involved, in particular the validation rules.

Yorwba avatar Mar 16 '24 19:03 Yorwba

Related: #1858

trang avatar Mar 17 '24 23:03 trang

It's trickier than I thought - I have to learn a lot about CakePHP and CakePHP validation (I previously knew nothing). If anyone feels they can solve this quickly, please go ahead. Otherwise this is a fun learning experience for me, but I can get that with other issues, too.

profesyonal avatar Mar 19 '24 17:03 profesyonal

@profesyonal We can quite certainly reserve this issue for you. By the time someone else shows up to solve it, you might already be an expert with CakePHP 😅

If you need suggestions of easier issues, let me know. I can perhaps manage to find something that will give you the knowledge to solve this issue later down the road.

trang avatar Mar 30 '24 13:03 trang