Closed Bug 816443 Opened 7 years ago Closed 5 years ago

lang and dir attributes must be used only if the page is actually translated

Categories

(developer.mozilla.org :: Localization, defect, P1, major)

x86_64
Linux

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: amir.aharoni, Unassigned)

Details

(Whiteboard: [type:bug][localization])

Attachments

(1 file)

MDN uses Accept-Language to identify the user's language. My Accept-Language is Hebrew. MDN's main page is shown as <html lang="he" dir="rtl">. It's not actually translated to Hebrew, however, so it's wrong, and it must be shown as <html lang="en" dir="ltr">.

It is great to use Accept-Language and to show pages in Hebrew or in any other language, but only if they are actually translated. Correct usage of lang is quite important, because it affects fonts, but using dir="rtl" incorrectly is especially disruptive. See the screenshot, and notice how the punctuation marks are at the wrong end of the sentences.

Thank you.
Priority: -- → P1
Whiteboard: bug
Whiteboard: bug → [type:bug]
Whiteboard: [type:bug] → [type:bug][localization]
Wow, this one is tricky. At the time we render the HTML, we don't know if the content for the page is translated in the user's language. :/

:lorchard - can you think of any way to do this?
Flags: needinfo?(lorchard)
(In reply to Luke Crouch [:groovecoder] from comment #1)
> Wow, this one is tricky. At the time we render the HTML, we don't know if
> the content for the page is translated in the user's language. :/
> 
> :lorchard - can you think of any way to do this?

Not really. Whole pages aren't translated; only individual strings are. And, that front page is split up into probably dozens of strings or more. We don't really have a mechanism to mark specific parts of the page as RTL based on translation status, and in fact translation status itself isn't even accessible to the page.

Best solution would be to get the strings translated :) Not sure if others in webdev have encountered this or have a solution. Maybe someone like :clouserw might know?
Flags: needinfo?(lorchard)
Yeah, I don't think we can do much about it. Hebrew and many other languages are enabled even though we have very little translation coverage. The solution for now is to switch to English via the language selector.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.