Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fixes #5803) Modify image author name to licensing name. (#5803) #5859

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qinjuewu00
Copy link

Description (required)

Fixes #5803

What changes did you make and why?

Replaced imageInfo.user with getAuthor(metadata)

Previously, the code was using imageInfo.user, which likely refers to the registered username of the person who uploaded the media. The new code uses getAuthor(metadata), which extracts the author information from the ExtMetadata object, likely referring to the custom author name. The purpose of this change is to ensure that the user profile shows the licensing name (custom author name) instead of the registered username.

Tests performed (required)

Tested {ProdDebug} on {Pixel 3a emulator} with API level {34}.

Screenshots (for UI changes only)
The custom user name I set is 'tester', my registered username is 'Wikoliatest'

image image

Need help? See https://support.google.com/android/answer/9075928


Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

@qinjuewu00 qinjuewu00 marked this pull request as ready for review October 16, 2024 11:49
Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good fix for #5856 but not for #5803

Test: As user Syced, I have set my custom name to SycedCustomName and uploaded this image:

https://commons.wikimedia.org/wiki/File:%E6%9D%89%E4%B8%A6%E5%8C%BA_%E5%A4%A7%E5%AE%AE%E5%85%AB%E5%B9%A1%E5%AE%AE.jpg

As you can see at https://commons.wikimedia.org/w/index.php?title=File:%E6%9D%89%E4%B8%A6%E5%8C%BA_%E5%A4%A7%E5%AE%AE%E5%85%AB%E5%B9%A1%E5%AE%AE.jpg&action=edit the generated wikicode is [[User:SycedCustomName|SycedCustomName]] but it should actually be [[User:Syced|SycedCustomName]] as explained in the issue description at #5803 (comment)

@qinjuewu00 qinjuewu00 marked this pull request as draft October 16, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Link to actual username page if a licensing name is set
2 participants