Page MenuHomePhabricator

Text of "learn more" link is awkward for local files
Closed, ResolvedPublic

Description

When viewing a local file, the link to the image description page says "Learn more on <wiki name>" which sounds a bit strange given that I am there already. Just "Learn more" would be better IMO.


Version: unspecified
Severity: trivial

Details

Reference
bz56121

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:32 AM
bzimport set Reference to bz56121.

Hi Gergo, good suggestion. Yes, let's remove the site name when you are already on that site, and just say 'Learn more', as you propose. Great catch!

Had a contributor contact me saying they wanted to take a crack - let's watch! :)

(In reply to comment #2)

Had a contributor contact me saying they wanted to take a crack - let's
watch! :)

As did I. The real issue here is bug 40497.

durgasubramanian94: Please add comments to bug reports instead of sending private emails.

Hi Durga, some links to help you finding the pieces needed to fix and test this bug report:

About Media Viewer:
https://www.mediawiki.org/wiki/Multimedia/Media_Viewer
https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FMultimediaViewer.git

The Media Viewer as deployed in Wikimedia can be tested by enabling "Beta features"in mediawiki.org
https://www.mediawiki.org/wiki/Beta_Features

You should install the extension in your development environment and find the problem Tisza is reporting. Then find the string mentioned by Tisza in the extension files and modify it as he is requesting. Test the result in your environment and, if you are happy with the result, propose your patch via Gerrit.

https://www.mediawiki.org/wiki/Gerrit

You fixed your first report by uploading the path in Bugzilla, which was good enough for a newcomer. Now the next step is to learn to do it the right way through Gerrit. You will like it. :)

If you have questions, please ask here in the bug report itself, or in #wikimedia-dev IRC.

Thank you for your interest in improving Media Viewer and good luck!

(In reply to comment #5)

Then find the string mentioned by Tisza in the
extension files and modify it as he is requesting.

It should be slightly more complex then that: right now we have a single "Learn
more on <wiki name>" message, which should be split into a "Learn more on <wiki name>" for remotely hosted images and a "Learn
more" for locally hosted images. So you need to add another message, find a way to figure out if the image is local or not (it should be somewhere in the data returned by the API), and select the right message depending on that.

durgasubramanian94 wrote:

I had submitted the patch, there was an error in the first patch, it was a syntax error, so I had submitted another patch.

Durga: A link to the submitted patch would be highly welcome.
(A link to a patch in Gerrit would get automatically added in Bugzilla when following http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines )

Also, please don't start a new patch when you need to modify something. See "Amending a change" in the Gerrit tutorial [1] on how to modify an existing patch.

And when you do discard an old patch, please use the "Abandon change" button in Gerrit so the system can know that no one intends to work on it anymore.

[1] https://www.mediawiki.org/wiki/Gerrit/Tutorial#Amending_a_change

For the records, previous patches that need rework: https://gerrit.wikimedia.org/r/#/c/99359/ and https://gerrit.wikimedia.org/r/#/c/99366/
See comment 9 and comment 10 for instructions on Gerrit usage.

durgasubramanian94 wrote:

Could anyone please tell me where the changes are to be made? I thought it has to be done in the i18n.php file

Druga: My understanding of this (disclaimer: I am not a developer):

Don't redefine the value of the string variable multimediaviewer-repository in MultimediaViewer.i18n.php. Comment 6 here says "you need to add another message". Find where in the code (not: MultimediaViewer.i18n.php) "multimediaviewer-repository" is called and add the if check there.

As Andre says. Note also that $1 in i18n.php files does not get magically replaced (that only happens with $1 inside a string). The i18n.php file is a normal PHP file (which must return an array of message name => text); your changes would simply result in a syntax error.

Durga: Are you still interested in pursuing this? If not, I think apsdehal wants to take a crack at it.

Change 102631 had a related patch set uploaded by Apsdehal:
Added 'Learn More' message

https://gerrit.wikimedia.org/r/102631

Change 102631 merged by jenkins-bot:
Added 'Learn more' message

https://gerrit.wikimedia.org/r/102631

(In reply to comment #18)

Should this bug be marked resolved/fixed now?

It should! Thanks for pointing it out.

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:25 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:21 AM