Page MenuHomePhabricator

[S] Improve multilingual support for file descriptions
Closed, ResolvedPublic

Description

There are 2 issues for descriptions in the QuickView Panel:

  1. The English description always renders, even if there is a description in the UI language.
  2. The English (LTR) description renders RTL if the UI lang is RTL:

Screen Shot 2020-10-08 at 2.58.51 PM.png (1×1 px, 739 KB)

This could be quickly resolved by wrapping it in a <bdi> tag so the content's direction is used, but it would be better if we knew the language and could set the lang and dir on the parent component.

Acceptance criteria:

  • File description renders in the UI language if it exists in that language
  • File description renders in its language's direction

Event Timeline

CBogen renamed this task from Improve multilingual support for file descriptions to [S] Improve multilingual support for file descriptions.Oct 21 2020, 4:23 PM

Change 637815 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Improve language support in QuickView panel

https://gerrit.wikimedia.org/r/637815

Change 637815 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Improve language support in QuickView panel

https://gerrit.wikimedia.org/r/637815

Etonkovidova subscribed.

Checked on commons wmf.18 - all specs are in place.

When UI lang is RTL but there are a description is in LTR, e.g. below from the task description, there will be some labels in RTL and all image info will be displayed RTL which is logical.

  1. The English (LTR) description renders RTL if the UI lang is RTL:

Screen Shot 2020-10-08 at 2.58.51 PM.png (1×1 px, 739 KB)

Screen Shot 2020-11-25 at 5.30.56 PM.png (706×519 px, 267 KB)

Another example - if a file has description in RTL only, it''ll be correctly displayed in LTR too.

description only in RTL - UI LTRdescription only in RTL - UI RTL
Screen Shot 2020-11-25 at 5.48.32 PM.png (374×491 px, 94 KB)
Screen Shot 2020-11-25 at 5.49.09 PM.png (550×503 px, 175 KB)