Last modified: 2012-12-13 11:19:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41257, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39257 - lang and dir attributes must be applied to each editing box on "List of pages linked to this item"
lang and dir attributes must be applied to each editing box on "List of pages...
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
http://wikidata-test-repo.wikimedia.d...
storypoints: 8
: i18n
Depends on:
Blocks: rtl-wikidata
  Show dependency treegraph
 
Reported: 2012-08-11 04:35 UTC by Amir E. Aharoni
Modified: 2012-12-13 11:19 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot showing that the Hebrew word "helium" appears on the left-hand side instead of the right-hand side. This affects not just alignment, but also cursor movement, backspace button behavior etc. (76.13 KB, image/png)
2012-08-11 04:35 UTC, Amir E. Aharoni
Details

Description Amir E. Aharoni 2012-08-11 04:35:05 UTC
Created attachment 10954 [details]
Screenshot showing that the Hebrew word "helium" appears on the left-hand side instead of the right-hand side. This affects not just alignment, but also cursor movement, backspace button behavior etc.

When I'm editing links to other language versions, the box for editing the link target does not define its language and direction using HTML lang and dir attributes and therefore shows the Hebrew word on the wrong side. If I would be using the Hebrew interface, it would show English words on the wrong side.

The dir attribute is obviously essential: without proper direction definition, there will be an abundance of problems with editing left-to-right text in right-to-left environments and vice versa.

The lang attribute is essential, too, even though it is less obvious - it is used for proper font rendering in some languages, for speech recognition, for spell checking and for other features.

lang and dir attributes must also be applied to elements that just show words in foreign languages (<td class="wb-sitelinks-link"> etc.). And even more generally, lang and dir attributes must be applied whenever it is known that an element is written in a different language.

See http://www.w3.org/TR/html401/struct/dirlang.html for reference; it's a bit old, but completely relevant.
Comment 1 jeblad 2012-09-03 09:25:46 UTC
Note that some times there will be "loanwords" used in a language and written in the same form that is used in the original language. That is word A comes from language A' and when this is written in a field for language B' it can still be in a form used at language A'. Such words can even be part of phrases that describes an entity. This can seriously mess up the layout.

I'm not sure if this have any easy quickfix, but perhaps it is enough to be able to somehow mark the text from another language. Now all kind of markup is stripped from the strings, but it is still possible to add rtl/ltr-markers as UTF8. What makes this a bit awkward is that such markup is invisible.

I propose that we go for a simple solution and only sets lang and dir and for now neglects any difficult loanwords.
Comment 2 Amir E. Aharoni 2012-09-03 09:28:41 UTC
Jeblad - you are right. That's what Bug 9360 is about. There must be a structured way to specify custom language for page content and title.

Until it's fixed, applying lang and dir to each item should be done. It will be not completely incorrect in the cases that you describe, but without it almost all other cases will be broken.
Comment 3 Anja Jentzsch 2012-11-29 12:39:51 UTC
Verified in Wikidata demo time for sprint 15

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links