-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix date template #3226
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
Fix date template #3226
Conversation
* This solution is an hotfix for overrite issue came back on 2.8.0 version. What I did is checking the extension, and if it is null, adding .jpg suffix. Because commons files always have suffixes, and we should compare file names after adding suffixes. Othervise overrides are possible. * Check if file title includes an extension already, by checking if is there any dot in it. * Fix logic error * Add uncovered tests * Remove unecessary line breaks * Make Javadocs more explicit
* Versioning for v2.8.2 * Changelog for v2.8.2
# Conflicts: # CHANGELOG.md # app/build.gradle # app/src/main/java/fr/free/nrw/commons/CommonsApplication.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
Oh wow, there are way too many commits for this, sorry! :/ But squash merge should sort the problem out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Also, @Achim55's comment is something we might want to put in our wiki. I guess most of us were not aware of the behavior. #3126 (comment)
Description (required)
Fixes #3126
Edited date template to format requested by Achim55, e.g. https://commons.wikimedia.org/w/index.php?title=File:Byron_lighthouse_2.jpg&diff=prev&oldid=370108941
Tests performed (required)
Tested ProdDebug on Nexus S API 27. Result: https://commons.wikimedia.org/wiki/File:Pelican_at_Main_Beach_Marina.jpg