Show translated titles per user language in categories too
OpenPublic

Description

Author: rd232

Description:
It is essential to support the multingualism of Wikimedia Commons (especially for categories) to allow page titles to be translated. Bug #5638 attempted to do this by building on interlanguage links. Comment 10 there https://bugzilla.wikimedia.org/show_bug.cgi?id=5638#c10 is given as the reason for 5638 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 5638 discussion.) Thank you.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=44867

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz29928.
bzimport created this task.Via LegacyJul 17 2011, 1:18 AM
bzimport added a comment.Via ConduitJul 19 2011, 10:58 PM

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.

bzimport added a comment.Via ConduitJul 20 2011, 12:32 AM

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.

bzimport added a comment.Via ConduitJul 20 2011, 2:17 AM

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.

bzimport added a comment.Via ConduitJul 20 2011, 1:22 PM

rd232 wrote:

I meant interlanguage links. Sorry for the confusion.

Bawolff added a comment.Via ConduitSep 11 2011, 3:09 AM

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).

bzimport added a comment.Via ConduitSep 12 2011, 8:12 PM

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.

Nemo_bis added a comment.Via ConduitJan 29 2012, 6:21 PM

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

bzimport added a comment.Via ConduitOct 31 2012, 10:54 AM

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.Via ConduitApr 7 2013, 11:59 AM

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

Nemo_bis awarded a token.Via WebDec 12 2014, 8:26 AM
Aklapper added a project: Commons.Via WebMar 10 2015, 4:45 PM
Steinsplitter moved this task to Backlog on the Commons workboard.Via WebMar 11 2015, 12:57 PM
Blahma added a subscriber: Blahma.Via WebTue, Jun 2, 10:25 AM

Add Comment