Last modified: 2014-10-04 11:33:41 UTC
Before the Berlin 2011 hackathon i published in several Hebrew Wikipedia-related forums a call for the most annoying RTL issues. This was the most frequent complaint: Parser tags such as <ref>, <poem>, <timeline> etc. cannot be localized. This is not a terrible issue for left-to-right languages, but it is a serious one for RTL languages. For example, <ref> is very often used with URLs, and these get jumbled up. It's hard to write them in the first place, and it's even harder to correct them after they are written. Replacing <ref> with something like <הערה> would make adding references to RTL wikis a lot easier. The same is true for the other tags of this kind. I talked to Victor Vasiliev and Tim Starling about it in the Berlin Hackathon 2011 and they said that it's generally doable.
<הערה> would be a nightmare to understand for foreign visitors, though :) I think we should set a convention for having the alternate hook names in the localization file, then the extension would add the alias in addition to its canonical form.
(In reply to comment #0) > I talked to Victor Vasiliev and Tim Starling about it in the Berlin Hackathon > 2011 and they said that it's generally doable. I believe its been discussed (in relation to ref at least) as doable but not really wanted to be done because of consistent use across sites so uses don't get confused and also for third party tools (eg: api access/bots to name a couple)
(In reply to comment #2) > I believe its been discussed (in relation to ref at least) as doable but not > really wanted to be done because of consistent use across sites so uses don't > get confused Users of the Hebrew Wikipedia get confused with the current situation. Very confused. Try editing a Hebrew Wikipedia article and think what confuses you more - the RTL-ness or the possibility that the <ref> tag would be different. Actually, people rarely want to edit projects in languages other than their own. Those that are bold enough to edit in Hebrew will also be clever enough to understand that <ref> is <הערה>. (I am saying "Hebrew" just because it's my home wiki; it's a drop in the bucket compared to Arabic, Farsi and Urdu.) > third party tools (eg: api access/bots to name a couple) They can use the same localization files.
I can't imagine that localizing these xml tags would be anymore confusing then how [[ملف:Example.svg]] makes an image link on ar, or using {{#لو:...}} instead of {{#if:...}}, or even the pseudo-entity &رلم; for ‏ (These example are all from ar because it was handy). Any bots that would be put out by this, are probably already put out by the existing localization.
We have the same problem in the Arabic ( http://ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D8%A7%D9%84%D9%85%D9%8A%D8%AF%D8%A7%D9%86/%D8%A3%D8%B1%D8%B4%D9%8A%D9%81/%D8%AA%D9%82%D9%86%D9%8A%D8%A9/06/2011#.D8.A8.D8.AE.D8.B5.D9.88.D8.B5_.D8.A7.D9.84.D9.88.D8.B3.D9.88.D9.85_.D8.A7.D9.84.D8.A5.D9.86.D8.AC.D9.84.D9.8A.D8.B2.D9.8A.D8.A9 ) I made this extension (http://www.mediawiki.org/wiki/Extension:AltTag) , I think it will solve the problem
*** Bug 28977 has been marked as a duplicate of this bug. ***
Maybe integrate AltTag into MW core?
(In reply to comment #7) > Maybe integrate AltTag into MW core? AltTag does a good job as an extension, but if we did this in core, we'd probably want to do something more integrated then running a regex on the wikitext before parsing imho.
Certainly not what we want for core. There will be also some cornercases such as <source><ref></source> which would fail (and AltTag regex would be a pain to review, too).
(In reply to comment #8) > AltTag does a good job as an extension, but if we did this in core, we'd > probably want to do something more integrated then running a regex on the > wikitext before parsing imho. (In reply to comment #9) > Certainly not what we want for core. There will be also some cornercases such > as <source><ref></source> which would fail (and AltTag regex would be a pain to > review, too). So AltTag's regex style is out. Magic words can be localized, why not tags?
(In reply to comment #10) > So AltTag's regex style is out. Magic words can be localized, why not tags? I believe they can be, but up to this point its been a undesired function so it hasn't been done in core.
Niklas and I discussed options. We think we must provide a solution for this. Arguments that it is confusing for users speaking other languages, or that robots and other tooling may have issues with it are less important than proper language support for users. We are of the opinion that we should implement this in regular MediaWiki messages, tagged optional, containing a comma separated list of aliases, with the English language parser tag as default value. Message keys will look like <prefix_chosen_by_developer>-<parsertag>. Assigned to Niklas. Victor, let us know if you have something prepared already, because it's been assigned to you for four months...
>We are of the opinion that we should implement this >in regular MediaWiki messages, tagged optional, containing a comma separated >list of aliases, with the English language parser tag as default value. This would put localized parser tag names in the hands of the users via the mediawiki namespace. This seems like a bad idea. A user could cause wide spread problems by editing such a message ( bug 23287 comes to mind. But the simple fact that changes wouldn't be immediately apparent since every page would need to be re-parsed to see if there is stuff that would now (or no longer) be a parser tag seems confusing enough to the end user to not want users to be able to change these parser tag "aliases") I think the magic word system would make much more sense for this.
We can skip Mediawiki namespace while enjoying the other benefits of doing it that way.
This bug has not been touched in at least six months. With this in mind, I've been asked by the bugmeister to bump this bug's priority down for "High". Concerns can be addressed to mah@everybody.org.
(In reply to comment #0) > Parser tags such as <ref>, <poem>, <timeline> etc. cannot be localized. > Replacing <ref> with something like <הערה> > would make adding references to RTL wikis a lot easier. The same is true for > the other tags of this kind. If it wasn't for bug 43685, I would have suggested to use a template instead (something like {{הערה|reftext|refname|refgroup}}). A neat and painless approach I believe.
(In reply to comment #16) > If it wasn't for bug 43685, I would have suggested to use a template instead > (something like {{הערה|reftext|refname|refgroup}}). A neat and painless > approach I believe. Well, the Hebrew Wikipedia already uses such a template for most references, because it's just much easier to edit articles using it. I'm coming back to this bug now for a somewhat surprising and upside-down reason: The VisualEditor. It has a nice button for inserting references, and the button, naturally, inserts <ref>. It can also edit existing footnotes only if they use <ref>. Ideally it would be fine, because the VE is supposed to hide markup from editors, but as long as the VE is not completely stable and a lot of people continue editing in source, this will be a major problem. Localizing at least the <ref> tag can be a nice compromise.
Pingy. This is being discussed in the Hebrew Wikipedia again in the same context: VisualEditor. VE inserts <ref> tags for footnotes, but the community strongly prefers a template, because using the explicit tag makes source editing hard. A bot is replacing all <ref> tags to that template. This essentially means that references cannot be edited as such by the VE in the Hebrew Wikipedia, but as templates, which makes VE editing experience confusing - an editor expects to edit a footnote, but gets a template editing dialog. Resolving this bug should make everybody happy.
I'd like to refocus this issue only on <ref> and little else. In actuality, it's not impossible to have these tags localized. It's already done in LabeledSectionTransclusion. However, I don't actually think that localizing all tags to all languages is important. In the coming age of VisualEditor localization of tags is supposed to become entirely irrelevant, because ideally they should be used only internally and not typed by editors. Until that age comes, however, people will do a lot of manual adding, removing and editing of tags in wiki syntax mode. For tags like <poem> and <timeline> it's not actually disastrous and nobody really complains about them (the content of <timeline> is a pain in RTL, but that's an entirely different issue). For <ref> however, it's a nightmare in RTL languages. What I am imagining at this point is a way to get <ref> localized to RTL languages (and probably not even all of them) using a mechanism that is works with wiki syntax and with VisualEditor and Parsoid, and to be ready to get rid of it in the far future when direct wiki syntax editing becomes unimportant. I committed an experimental patch for this: https://gerrit.wikimedia.org/r/#/c/163467/