Last modified: 2014-02-20 16:29:09 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 T31928, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29928 - Show translated titles per user language in categories too
Show translated titles per user language in categories too
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
unspecified
All All
: Normal enhancement with 6 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on: 29975
Blocks: commons
  Show dependency treegraph
 
Reported: 2011-07-17 01:18 UTC by Rd232
Modified: 2014-02-20 16:29 UTC (History)
14 users (show)

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


Attachments

Description Rd232 2011-07-17 01:18:44 UTC
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.
Comment 1 Dan Collins 2011-07-19 22:58:16 UTC
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.
Comment 2 Rd232 2011-07-20 00:32:37 UTC
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 [[:de:|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.
Comment 3 Dan Collins 2011-07-20 02:17:25 UTC
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.
Comment 4 Rd232 2011-07-20 13:22:26 UTC
I meant interlanguage links. Sorry for the confusion.
Comment 5 Bawolff (Brian Wolff) 2011-09-11 03:09:45 UTC
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).
Comment 6 User:Docu 2011-09-12 20:12:14 UTC
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.
Comment 7 Nemo 2012-01-29 18:21:30 UTC
The translate extension can do this already, but it can't solve bug 29975 (which seems to be a dependency, not a blocker).
Comment 8 Foroa 2012-10-31 10:54:43 UTC
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.
Comment 9 Tisza Gergő 2013-04-07 11:59:57 UTC
Wikidata might help here. See [[d:Wikidata:Wikimedia Commons]] and [[commons:User:Kozuch/Wikidata]].

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


Navigation
Links