common-voice / sentence-collector

Tool to collect and review sentences for Common Voice
https://commonvoice.mozilla.org/sentence-collector/
Mozilla Public License 2.0
81 stars 62 forks source link

About text directionality of Uyghur language #428

Closed rustam closed 3 years ago

rustam commented 3 years ago

Hi , I am contributing to Uyghur language, the directionality of this language is Right-to-Left(RTL), after we adding sentences, it acted like the language which is Left-to-Right. you could see the following capture, the dot(.) should be at the position of the ending, but it showed at the beginning of the sentence.

image

Thank you in advance.

MichaelKohler commented 3 years ago

Thanks for reporting. This is due to us not setting the dir html attribute for RTL languages. We probably only want to set that on the sentence HTML element though. Will need to check if there is a good way of setting the attribute, I don't particularly want to maintain a manual list with languages.

Additionally to the sentence box on the Review page we possibly also want to do that for the "Add" textarea, the list of rejected sentences on the "Add" page as well as the "Rejected Sentences" page.

MichaelKohler commented 3 years ago

.. and once we're on it, we should also set https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate to no as @freaktechnik pointed out to me :)

MichaelKohler commented 3 years ago

For future documentation: for now I've gone with dir="auto" as that looked promising and letting the browser detect it is better than doing anything manual.

MichaelKohler commented 3 years ago

:tada: This issue has been resolved in version 2.3.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

rustam commented 3 years ago

Thanks for reporting. This is due to us not setting the dir html attribute for RTL languages. We probably only want to set that on the sentence HTML element though. Will need to check if there is a good way of setting the attribute, I don't particularly want to maintain a manual list with languages.

Additionally to the sentence box on the Review page we possibly also want to do that for the "Add" textarea, the list of rejected sentences on the "Add" page as well as the "Rejected Sentences" page.

@MichaelKohler Thank you for your quick response and mentioned above "Rejected Sentences" i didn't aware that since currently i have rejected sentences available yet not able to check right away, but i am sure if you added dir="auto" , it should work perfectly . The review page shows the sentence as expected now. again thank you .