Page MenuHomePhabricator

Magic words localization per the viewing project instead of source
Open, MediumPublicFeature

Description

This bug is related to how the magic words are evaluated when a commons page is being viewed with either a uselang set, or more importantly, when it is being viewed on another language project.

None of the date and time magic words given at http://www.mediawiki.org/wiki/Help:Magic_Words#Date_and_time localize when viewed at a project with a different language. Neither does {{formatnum}} or using {{#expr:}}. Note that I haven't tried other magic words returning digits, but I suspect that their digits don't localize either.

Tests were done using http://commons.wikimedia.org/wiki/File:Compass_rose-hi.svg and viewing it via different language projects and specifying uselang for it.(look through the history if there's no magic word usage on it now).

Also note that simply specifying the language may not be enough since various languages (most indic languages atleast) use different numerals than the default for the language (i.e the standard arabic numerals 1,2,3...)

So, the usage of numerals should be the one which the local project is using, not the language default. I'm not asking for language specific number formatting here, just the numerals used.

Also, the monthnames, daynames etc should be used per the project's language, not the default(english).

Lastly, I know this may look/sound like a catch-all bug, but I'm just reporting this for now; split it if you have to.


Version: unspecified
Severity: enhancement

Details

Reference
bz33576

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:01 AM
bzimport set Reference to bz33576.
bzimport added a subscriber: Unknown Object (MLST).

Oh, and this would/should make some huge template structures at commons for localizing numerals redundant.

Also, related bugs: [[Bug 18047]] [[Bug 19412]] #time localization
[[Bug 13025]] also contains some similar requests

And solving [[Bug 32618]] will probably help too.

Perhaps if inter-wiki transclussion ever gets merged into trunk, and if it supports localizing stuff to the content language of the client wiki regardless of what the source wikis content lang is, then we could integrate that into the foreign repo stuff, and maybe use that. (Lots of if coming off that statement)

As it stands here is how description pages work:
*the local wiki does an http request from commons (aka does the same thing you would do if you opened commons in your web browser. Well almost, it looks at urls like http://commons.wikimedia.org/wiki/File:Compass_rose-hi.svg?action=render )
*Plops the result of that into the local wiki's image page.

Making all this magic word stuff vary by user language instead of content language (err, I suppose page language now) would probably have to be done carefully. (I imagine, i say that without looking at the code)


Just to make the links clickable:

Also, related bugs: Bug 18047 Bug 19412 #time localization
Bug 13025 also contains some similar requests

And solving Bug 32618 will probably help too.

Making all this magic word stuff vary by user language instead of content
language (err, I suppose page language now) would probably have to be done
carefully. (I imagine, i say that without looking at the code)

Not by user language, but by viewing project's default lang. Since this one is a content issue, I don't think we'd want the magic words to go back to english if I view the image in a local project with uselang=en.

However, this currently seems to be the default behaviour, example: see

http://hi.wikipedia.org/wiki/चित्र:Compass_rose-hi.svg

and

http://hi.wikipedia.org/wiki/चित्र:Compass_rose-hi.svg?uselang=en

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.