Last modified: 2014-11-06 21:41:01 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 T52436, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50436 - TemplateData: Creating TemplateData blocks should be direction neutral
TemplateData: Creating TemplateData blocks should be direction neutral
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TemplateData (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Editing team bugs – take if you're interested!
: i18n
Depends on: 51734 60158
Blocks: ve-rtl
  Show dependency treegraph
 
Reported: 2013-06-29 21:12 UTC by Eran Roz
Modified: 2014-11-06 21:41 UTC (History)
13 users (show)

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


Attachments

Description Eran Roz 2013-06-29 21:12:05 UTC
This is a bug/design issuse with TemplateData.

To use TemplateData in RTL wikis, the syntax mix English and Arabic/Hebrew (etc).

Editing mixed languages with different direction is hard and should be avoided as much as possible because of BiDi issues. (in some cases, such as Lua modules it isn't possible to completely avoid it).

Example :
<templatedata>
{
        "description": "תבנית כלשהי.",
        "params": {
                "שם": {
                        "label": "שם",
                        "type": "string/wiki-user-name",
                        "required": true,
                        "description": "שם של משתמש",
                        "aliases": ["1"]
                }
        },
        "sets": [
                {
                        "label": "Date",
                        "params": ["שנה", "חודש", "יום"]
                }
        ]
}
</templatedata>
It is very hard to edit such syntax as above. (<templatedata> is OK since it is in different line - but the JSON isn't [if we don't want to define special indentation convention due to direction issues])
The syntax for the JSON keywords (description, params, label etc) should be either translatable or should have some neutral direction alternative to defines it (JSON by itself is directionless - [{}:,] doesn't have direction information).

See also:
* bug 50169 - implementing this feature may reduce the severity of this bug (this solution will force template editors in RTL wiki to use visual editor at least for templatedata definitions).
* bug 50370 - translation of interface items
Comment 1 James Forrester 2013-07-01 14:43:26 UTC
Timo, thoughts?
Comment 2 Amir E. Aharoni 2013-07-20 20:56:14 UTC
The ideal thing here would be to build a tree-like visual TemplateData editor, that would save its data to JSON. Kinda like http://www.jsoneditoronline.org/ (first Google result for "json editor").

Separating labels and data would easily solve the RTL problem, and would also make TemplateData easier to edit for users in all languages.
Comment 3 Ltrlg 2013-07-23 22:42:15 UTC
See bug 51734 (Create a non-VisualEditor plugin tool to add/edit template hinting) for visual interface.
Comment 4 Bartosz Dziewoński 2013-07-23 22:45:04 UTC
(In reply to comment #2)
> The ideal thing here would be to build a tree-like visual TemplateData
> editor,
> that would save its data to JSON. Kinda like http://www.jsoneditoronline.org/
> (first Google result for "json editor").

It kinda exists now, http://tools.wikimedia.pl/~mlazowik/templatedata/, but is currently not translateable (only in Polish). The code is on GitHub (https://github.com/mlazowik/templatedata/) and author accepts pull requests :) (CC'ing him).
Comment 5 NicoV 2013-07-24 11:08:28 UTC
A user interface exists also as a script on enwiki (which can be used directly from other wikis)
http://en.wikipedia.org/wiki/User:NicoV/TemplateDataEditor

It was written by Ltrlg (see 2 posts above) on frwiki, I translated it into English.
Comment 6 Michał Łazowik 2013-07-26 18:08:49 UTC
I've addded rtl support to my editor (http://tools.wikimedia.pl/~mlazowik/templatedata/). You can send me translations. More info in the bottom of the page.
Comment 7 Eran Roz 2013-07-29 18:27:52 UTC
Is it possible to edit templatedata or just create new? Is it possible to populate the form with existing tempaltedata?

The main problem isn't creation of tempaltedata (which for many cases can be done by bots), but to maintain it - e.g changing the description, adding/removing parameters etc.
Comment 8 Moriel Schottlender 2013-07-29 18:33:02 UTC
I'm working on a TemplateData Generator extension that will allow the editing or creation from scratch of templatedata json. It will allow the editing of the json data visually, so you could maintain the parameters or description as you please with a GUI.

I'm also making sure it works with RTL languages and the GUI is completely translation-ready. I hope it will be ready in the next few days (at least a basic working version of it)
Comment 9 Moriel Schottlender 2013-07-29 18:34:13 UTC
I forgot to attach the link... here it is:

https://github.com/mooeypoo/MediaWiki-TemplateDataGenerator

It's still being tested, and there are a couple of changes we should still implement, but it's getting there. I hope it will be ready for wider test in the next few days.
Comment 10 NicoV 2013-07-29 18:35:27 UTC
Ltrlg's script can edit an existing templatedata. I don't know if it works correctly with rtl languages, but if it doesn't you could always ask Ltrlg to fix it.

Michal tool seems interesting but it currently lacks the ability to edit an existing templatedata. Michal, is that something you're planning to add?
Comment 11 Michał Łazowik 2013-07-29 20:47:39 UTC
(In reply to comment #10)
> Michal tool seems interesting but it currently lacks the ability to edit an
> existing templatedata. Michal, is that something you're planning to add?

Absolutely! Working on that now. At first you'll have to copy JSON data to the tool, but I'll try to add auto copying from a given template.
Comment 12 Gerrit Notification Bot 2013-09-21 04:14:30 UTC
Change 85400 had a related patch set uploaded by Mooeypoo:
TemplateData Generator GUI

https://gerrit.wikimedia.org/r/85400
Comment 13 Gerrit Notification Bot 2014-01-15 02:41:18 UTC
Change 85400 merged by jenkins-bot:
Implement edit interface for TemplateData documentation

https://gerrit.wikimedia.org/r/85400
Comment 14 James Forrester 2014-01-15 17:34:50 UTC
So… I'm not sure how to dispose of this bug:

* FIXED – except it's not fixed, it's just "worked around" by bug 51734
* INVALID – except it's still a valid concern
* WORKSFORME – but only because I'm willing to put up with this (and I don't do RTL much)
* WONTFIX – closest to the truth, but feels a little blunt

Perhaps we should wait for the template editor to be deployed for all languages, then close this as WONTFIX?
Comment 15 Minh Nguyễn 2014-01-16 12:10:15 UTC
How about marking it as a duplicate of bug 51734?
Comment 16 Eran Roz 2014-01-16 15:47:49 UTC
Thanks Moriel for implementing a nice workaround to this bug.
I think this bug can be disposed after template editor will be deployed to all wikis.
Comment 17 James Forrester 2014-01-17 03:52:56 UTC
(In reply to comment #15)
> How about marking it as a duplicate of bug 51734?

I don't think it's really a duplicate, though; the problem remains (so if you want to edit the source directly you still have to deal with it).

(In reply to comment #16)
> Thanks Moriel for implementing a nice workaround to this bug.
> I think this bug can be disposed after template editor will be deployed to
> all wikis.

That seems like a reasonable resolution. Will do.
Comment 18 Eran Roz 2014-01-18 13:26:24 UTC
Would be nice to deploy it the template data editor to Hebrew Wikipedia  - it is more important then in other wikis because of this bug
Comment 19 James Forrester 2014-11-06 21:41:01 UTC
This is now effectively "solved" through general availability of the GUI to edit TemplateData.

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


Navigation
Links