Closed Bug 1394200 Opened 8 years ago Closed 6 years ago

sumo text direction does not match text language

Categories

(support.mozilla.org :: Localization, task, P2)

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: amir.aharoni, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170814073321 Steps to reproduce: My browser's preferred language are set to: 1. Hebrew 2. Russian 3. English (This must be set in the preferences.) I opened https://support.mozilla.org/he/kb/push-notifications-firefox?as=u&utm_source=inproduct . Actual results: The page says: "This page does not exist in עברית. You have been redirected to the Русский version instead. If you would like to localize it into עברית, click here. You can also see the English version of this page. " Explanation: "עברית" means "Hebrew" in Hebrew. "Русский" means "Russian" in Russian. So far, it's not terrible (although it would be a bit nicer to just say "Hebrew" and "Russian" in English, otherwise it looks disjointed.) However, the real problem is that the text's direction is right-to-left (rtl). Note how the text is aligned to the right, the punctuation marks are at the wrong end of the sentence, and the notification with yellow background is barely readable. I guess that the software sees that I want a Hebrew page and sets the direction to "rtl", which is the correct direction for Hebrew, but it puts Russian text into an "rtl" page, and this is broken. See the screenshot for how it looks. Expected results: The text direction must match the language of the text that is actually sent. If the text that is _actually sent_ is Hebrew, Arabic, or some other RTL language, then it must be RTL. Otherwise, it must be LTR.
Seems like an interesting problem actually. We missed the case for RTL locale page seeing LTR Content. Confirming this bug. Hope we will have enough time and resource to fix this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi Safwan, Thanks for confirming this. Since the URL of the displayed page remains with the RTL locale, the most direct solution would be to force a redirect to the backup locale's URL, if available? E.g., when I open https://support.mozilla.org/he/kb/push-notifications-firefox?as=u&utm_source=inproduct and my browser is set to Polish, I should end up at https://support.mozilla.org/pl/kb/push-notifications-firefox?as=u&utm_source=inproduct Does that sound logical and feasible or do you think there are more intricate obstacles hiding here? Cheers, Michał
Flags: needinfo?(safwan.rahman15)
Priority: -- → P2
(In reply to vesper from comment #2) > Hi Safwan, > > Thanks for confirming this. > > Since the URL of the displayed page remains with the RTL locale, the most > direct solution would be to force a redirect to the backup locale's URL, if > available? We have thought about it but if we redirect to the new locale, the user will see all the contents in that locale and moreover its more challenging to trigger a warning "This page does not exist in עברית. You have been redirected to the........". Therefore we thought to replace with the backup locale content. This issue is an edge case and can be fixed by detecting the content and align the content according to the language direction.
Flags: needinfo?(safwan.rahman15)
(In reply to Safwan Rahman (:safwan) from comment #3) > This issue is an edge case and can be fixed by detecting the content and > align the content according to the language direction. This is really not an edge case. It's absolutely possible that a person will request a language with a different direction. This doesn't even have to happen with users who have three languages like I do; it can also happen if I have just Hebrew (or Arabic, or Persian), and get a page in English. A LOT of Sumo pages are not translated. So no, this is not an edge case. Every language has a direction associated with it, and the direction and the language must be set together, at the same function (or module, or whatever it is; I'm sorry, I'm not familiar with the Sumo code at all, but I did very similar things for the MediaWiki software). "Detecting" the content sounds like a convoluted solution. The software *knows* in which language it is sending the content. That's how it is able to show the message "You have been redirected to the Русский version instead". If the software knows the language, then there is no need to "detect" it.
(In reply to Amir Aharoni from comment #4) > (In reply to Safwan Rahman (:safwan) from comment #3) > > This issue is an edge case and can be fixed by detecting the content and > > align the content according to the language direction. > > This is really not an edge case. It's absolutely possible that a person will > request a language with a different direction. This doesn't even have to > happen with users who have three languages like I do; it can also happen if > I have just Hebrew (or Arabic, or Persian), and get a page in English. A LOT > of Sumo pages are not translated. So no, this is not an edge case. > Every language has a direction associated with it, and the direction and the > language must be set together, at the same function (or module, or whatever > it is; I'm sorry, I'm not familiar with the Sumo code at all, but I did very > similar things for the MediaWiki software). So our software detects the locale and direct the whole page according to it. So if you are seeing with a RTL locale page our software (kitsune) detects the RTL locale and arrange the full page according to RTL. It does not care whether the content is in LTR locale or not! So it need to be fixed > "Detecting" the content sounds like a convoluted solution. The software > *knows* in which language it is sending the content. That's how it is able > to show the message "You have been redirected to the Русский version > instead". If the software knows the language, then there is no need to > "detect" it. The problem here is, the full page is in one locale and the content is in different language. This problem does not happen only in this page also happen in other page that does not have any translation(1). So for generalizing the fix, I proposed to detect the content and show according to it. 1. https://support.mozilla.org/he/kb/how-change-your-default-browser-windows-10
(In reply to Safwan Rahman (:safwan) from comment #5) > The problem here is, the full page is in one locale and the content is in > different language. This problem does not happen only in this page also > happen in other page that does not have any translation(1). So for > generalizing the fix, I proposed to detect the content and show according to > it. > > 1. > https://support.mozilla.org/he/kb/how-change-your-default-browser-windows-10 SGTM!
To Safwan's comment: what is needed here is - 1. Detecting the locale of the content served after the backup locale redirect. 2. Showing content LTR or RTL depending on the content served.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: