Page MenuHomePhabricator

Show translated titles per user language in categories too
Open, MediumPublic

Description

Author: rd232

Description:
It is essential to support the multingualism of Wikimedia Commons (especially for categories) to allow page titles to be translated. T7638 attempted to do this by building on interlanguage links. T7638#101531 there is given as the reason for T7638 being repeatedly WONTFIXed. If those issues are indeed insurmountable then ANOTHER SOLUTION MUST BE FOUND. (Sorry for shouting, but this message didn't get through at the tail of the T7638 discussion.) Thank you.

See Also:

Details

Reference
bz29928

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:32 PM
bzimport set Reference to bz29928.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jul 17 2011, 1:18 AM

EN.WP.ST47 wrote:

This is an i18n bug (or possibly user interface), not a parser one. How do you suggest that translated titles be input? This could be done with JS (I know I have a userscript on enwiki that colors titles based on their article grade) or using iwlinks (shot down because article titles can contain other stuff - disambig, etc. - and not all articles exist crosslanguage) or using some new way of encoding it in the page text (woo, a more bloated parser) or using some new way of encoding it in the database (woo, a schema change and new special page and permission). Something to consider is whether it is sufficient for a page title to be displayed in the user's language or whether it must also be searchable/linkable.

rd232 wrote:

iwlinks made a certain sense to me, with an option to override the iwlink for the title if necessary (eg [[:de:Foo]] would use Foo for the German title, [[:de:Foo (bar)|Foo2]] would use Foo2, and [[🇩🇪|Foo3]] would use Foo3, for the case where no target interwiki exists). However, it occurs to me that while this would work fine for page titles for the page the user is on, I'm not sure how it would work for page titles when looking at a category listing - which is an important aspect of the issue. I don't know a solution!

In an answer to your question, I'd certainly settle for page title being displayed in the user's language; but searchable/linkable would be helpful.

EN.WP.ST47 wrote:

We actually mean langlinks, not iwlinks. iwlinks is inline links to other wikis, which could be to entirely unrelated pages, langlinks is the left sidebar's list. langlinks has the advantage of being indexed by language, so here's basically how that would happen.

If a wiki has translate titles enabled ($wgTranslateTitles or something), then somewhere in Title.php we could probably do a lookup against the langlinks table, perhaps based on "select ll_title from langlinks where ll_from = $this->mArticleID and ll_lang = $wgLang->getCode();".

That's the simple easy way, at least. that doesn't require a schema change or parser hacks. If the interlanguage links were going to have a new format, like [[de:Page (disambig)|Page]], we could have a new column in the langlinks for the translated title, and the parser would need to handle a new syntax or two.

Of course, none of this takes into account allowing these titles to be used in search or urls. I don't know one bit about how search works, but if URLs were going to support it there would need to be some sort of conflict resolution between multiple pages with the same translatedtitle either in the same or different languages.

And of course, if you actually meant iwlinks (using [[:de:stuff|otherstuff]] instead of [[de:stuff|otherstuff]]) then I'd be interested in hearing justification for that, but I don't really think it would work.

rd232 wrote:

I meant interlanguage links. Sorry for the confusion.

As it stands (With existing software support) we could do this in a _very_ hacky way by setting $wgRestrictDisplayTitle = false; and then using the int: hack for different translations with {{DISPLAYTITLE}}. However, then someone could create a title that doesn't go to the relevant page which would be confusing. Perhaps an option to allow display titles that redirect to the current page (less strict than the restrictDisplayTitle, but still pretty strict).

test5555 wrote:

For Commons, this probably only makes sense in Category namespace.

It might be easier to just display a subtitle in the user's language from interwikis.

The translate extension can do this already, but it can't solve bug 29975 (which seems to be a dependency, not a blocker).

ForoaW wrote:

The current langlink could just be displayed next to the category or gallery name. Hovering over language links could show a window of the first paragraph of the concerned article.

Tgr added a comment.Apr 7 2013, 11:59 AM

Wikidata might help here. See [[d:Wikidata:Wikimedia Commons]] and [[commons:User:Kozuch/Wikidata]].

Steinsplitter moved this task from Incoming to Backlog on the Commons board.Mar 11 2015, 12:57 PM
Blahma added a subscriber: Blahma.Jun 2 2015, 10:25 AM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald TranscriptMar 23 2016, 7:41 AM
He7d3r updated the task description. (Show Details)Sep 19 2017, 1:56 PM
He7d3r removed a subscriber: wikibugs-l-list.
Qgil removed a subscriber: Qgil.Sep 19 2017, 9:46 PM

Maybe Structured Data on Wikimedia Commons could implement this. @Keegan_(WMF) , is this possible?

I don't know how to tag or ping people here, if someone could ping someone from the Structured Data on Wikimedia Commons project that would be great.

"Mentioning users as in @username will create a link to their profile and will subscribe them to the task." Not on mobile (as usual), or at least my device. See @Aklapper no mention is made.

DonTrung added a subscriber: Keegan.May 4 2019, 9:33 PM

Odd, let's try again. @Keegan

abi_ added a subscriber: abi_.May 5 2019, 3:19 AM
Keegan added a comment.May 7 2019, 9:12 AM

Odd, let's try again. @Keegan

Just letting you know I got your ping, but I won't be able to look into this task this week as I'm out of office.