Last modified: 2014-05-27 19:49:32 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 T53852, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51852 - Image options should be serialized in the wiki's language in rtl locales - localization i18n
Image options should be serialized in the wiki's language in rtl locales - lo...
Status: NEW
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: C. Scott Ananian
: i18n
Depends on:
Blocks: ve-rtl 54844
  Show dependency treegraph
 
Reported: 2013-07-23 08:46 UTC by Amir E. Aharoni
Modified: 2014-05-27 19:49 UTC (History)
6 users (show)

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


Attachments

Description Amir E. Aharoni 2013-07-23 08:46:34 UTC
When VisualEditor inserts an image, the thumbnail keywords are written in English: "File:", "thumb", "right" (but see Bug 51851).

This should not, theoretically, be a problem, because the VisualEditor is supposed to make these keywords unimportant and hidden from the end-user. However, while the source editor is still being widely used, this is a problem, especially for right to left languages: it is very hard to edit these English keywords when they are mixed with right-to-left text.

These keywords should be inserted in the language of the wiki.
Comment 1 Gabriel Wicke 2013-08-16 21:43:26 UTC
In most ltr wikis the English version is actually the most commonly used today, which is why we went with serializing new content with the English defaults.

This is not ideal for rtl languages though, as this leads to a mix of ltr and rtl text.

If you can provide us with a list of rtl language codes and check for each if a common offset in the option aliases is a good default, then we can add a list of rtl languages to the serializer and use the localized defaults for those.
Comment 2 Gabriel Wicke 2013-08-16 21:56:22 UTC
We don't actually need to hard-code the list of rtl wikis, as that information is available in the site info returned by the API. It would still be good to check for each current rtl wiki if the first option alias is always a good one.
Comment 3 Gabriel Wicke 2013-08-16 21:57:19 UTC
For the site info, look for "rtl" in http://he.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general&format=json
Comment 4 Amir E. Aharoni 2013-08-27 22:07:49 UTC
I went over the RTL languages and samples practical Wikipedia articles, and it seems that the first alias is always is always the most frequently used.

Is there anything I can do to help move this forward? It's one of the most requested features.
Comment 5 C. Scott Ananian 2013-09-11 17:51:09 UTC
I'm pretty sure our magic words support already has the appropriate localized keyword alias. We just aren't using it (yet).
Comment 6 Gerrit Notification Bot 2013-12-23 15:08:51 UTC
Change 103082 had a related patch set uploaded by Cscott:
Edited image attributes should override data-parsoid value.

https://gerrit.wikimedia.org/r/103082
Comment 7 James Forrester 2014-05-27 18:37:56 UTC
The above was merged in January, but this bug isn't fixed AFAICT. Also, we should probably use the local wikitext over the English version in all languages, not just RTL ones.
Comment 8 C. Scott Ananian 2014-05-27 19:48:27 UTC
Yes, that is correct.  The patch was merged and then the language-specific parts were reverted because the way it selected the aliases was fragile in LTR languages.  This is still on my to-do list for a proper fix; IIRC the blocking issue is we need to export a simple RTL/LTR flag in siteinfo.
Comment 9 James Forrester 2014-05-27 19:49:32 UTC
(In reply to C. Scott Ananian from comment #8)
> Yes, that is correct.  The patch was merged and then the language-specific
> parts were reverted because the way it selected the aliases was fragile in
> LTR languages.  This is still on my to-do list for a proper fix; IIRC the
> blocking issue is we need to export a simple RTL/LTR flag in siteinfo.

Would it be easier if we just had Parsoid default to the (first?) localised string over the generic wikitext? This presumably doesn't need any MW API changes…

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


Navigation
Links