Last modified: 2012-08-12 11:35:51 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 T35544, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33544 - custom license: wrong link to Copyright_tags
custom license: wrong link to Copyright_tags
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Patricio Molina
: easy, i18n, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-05 17:00 UTC by Saibo
Modified: 2012-08-12 11:35 UTC (History)
9 users (show)

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


Attachments

Description Saibo 2012-01-05 17:00:16 UTC
"Die Lizenz wird mit folgendem Wikitext beschrieben (muss eine gültige Lizenzangabe enthalten)"  links to [[:commons:Commons:Copyright_tags]]  instead of [[:commons:Commons:Lizenzvorlagen]].
Comment 1 Rainer Rillke @commons.wikimedia 2012-01-05 17:30:09 UTC
Yeah, what's the best way to find out where such a link is stored?
Comment 2 Sumana Harihareswara 2012-02-22 05:34:47 UTC
Santhosh verified that this bug is "easy" and suitable for a new MediaWiki
developer.
Comment 3 Mike Morearty 2012-05-21 23:54:31 UTC
The git repo is here: https://gerrit.wikimedia.org/r/p/mediawiki/extensions/UploadWizard.git
The URL is in UploadWizard.config.php, line 255.

I'm new to Wikimedia (but I'm an experienced software developer).  Does the Wikimedia website provide any sort of way to have a single URL that goes to the language-appropriate web page?  E.g. with google.com you can append "?hl=en" or "?hl=fr" to have it display in English or French; and of course on Wikipedia itself, XX.wikipedia.org will go to the home page for language "XX".

Is there some similar way to jump to the appropriate for the [[:commons:Commons:Copyright_tags]] page?

Although this was logged as a bug with the German version, this obviously isn't a German-only issue. At the top of the Copyright_tags page, there is already a long list of "this project page in other languages"; the right fix, if any, would probably be to automatically go to the language-appropriate page for any language, not just German.
Comment 4 Erik Moeller 2012-05-22 01:28:00 UTC
There's a standard ?uselang parameter, but this will only affect the menu language, not the content language, e.g.:
https://commons.wikimedia.org/wiki/Commons:Copyright_tags?uselang=de

For pages translated with the Translate extension, there's also the convenient Special:MyLanguage redirector, e.g.:
https://meta.wikimedia.org/wiki/Special:MyLanguage/Terms_of_use (will evaluate whatever language setting is in your UI)

Neither is particularly helpful here, and the current hardcoding of license URLs in UploadWizard.config.php probably has to stop. I'd suggest the following implementation strategy:

* Instead of using an absolute URL attribute for Upload Wizard config variables, use a URL stored in a MediaWiki: user interface message, e.g. "MediaWiki:Mwe-upwiz-license-cc-by-2.5-url". This means we can use the existing convenience functions to retrieve 1) the URL for the current user interface language if defined, 2) fall back to English if not defined.

* Instead of hardcoding the URLs, we can now simply look up the message defined in the licenses array in UploadWizard.config.php with the added '-url' suffix to try to find a valid URL in the user's language. This is similar to existing MediaWiki messages like "MediaWiki:Portal-url".

* For bonus points, interpret a -url UI message that follows no valid URI scheme as a MediaWiki title and generate the valid URL. So If I put "Commons:Copyright tags" in "MediaWiki:Mwe-upwiz-license-custom-url", it should automatically turn that into https://commons.wikimedia.org/wiki/Commons:Copyright_tags .

In the above example, defining "MediaWiki:Mwe-upwiz-license-custom-url/de" as "Commons:Lizenzvorlagen" on Commons, or localizing it through the i18n file, would achieve the desired effect.
Comment 5 Patricio Molina 2012-06-05 08:52:09 UTC
I've made some changes in the code: https://gerrit.wikimedia.org/r/#/c/9984/
Comment 6 matanya 2012-08-12 11:35:51 UTC
patch merged.

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


Navigation
Links