See the screenshot below. I'm not sure how to troubleshoot or replicate this issue. If someone gives me direction, I may be able to provide more info. I just stumbled upon a file page where the "What links here" did not match the "File usage" and I would expect them to match.
Description
Event Timeline
"File usage" only lists pages that embed the file directly on-page ([[File:Example.png]]); "What links here" also lists all pages that link to the file's description page ([[:File:Example.png]]). I've always thought the messaging in the "File usage" section was misleading.
I guess it ought to say "No pages include this file. See files that link to this page." Where files that link to this page is a link to the relevant Special:WhatLinksHere page?
You can modify the message via MediaWiki:Linkstoimage (for files that are used on at least one page) and MediaWiki:Nolinkstoimage (for files that are unused). I've modified both of these on a couple of the wikis I am/was an administrator on, see examples on Yugipedia: MediaWiki:Linkstoimage, MediaWiki:Nolinkstoimage.
Thanks for that info, but I think this is generically/universally wrong and the wording should be fixed. Can you point me to where I'd submit a patch for this wording?
Updated title to match the latest understanding of the issue.
The "File usage" section indeed reports embedding of the file (also known as "file usage" or "file links"). See also "global file usage". Such "file link" is differnet from a "page link" which is merely a link to the file's description page as opposed to actually displaying a media item on a page.
On the "What links here" page you can choose to "Hide (page) links" or "Hide file links". When flipping these switches the right way, one can end up displaying only the file links, for example. The functionality is confusing, I think, but I do think from a technical perspective it is currently in a way that is ideal for the end-user. That is, on the file description page I think it makes sense to default to listing (only) embedded use of the media file and not regular plain links.
The issue this task is about then, is the wording when there is no file usage.
I checked commons wiki wmf.9. For example, https://commons.wikimedia.org/wiki/File:Trey_Songs_(7082264395).jpg in File usage on Commons - There are no pages that use this file.
The messages on translatewiki do not mention links:
MediaWiki:Nolinkstoimage on translatewiki: There are no pages that use this file.
MediaWiki:Linkstoimage on translatewiki:The following {{PLURAL:$1|page uses|$1 pages use}} this file: