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

Fix date template #3226

Merged
merged 18 commits into from
Nov 27, 2019
Merged

Conversation

misaochan
Copy link
Member

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

misaochan and others added 18 commits July 28, 2018 20:50
* 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
Copy link

@tests-checker tests-checker bot left a 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?

@misaochan
Copy link
Member Author

Oh wow, there are way too many commits for this, sorry! :/ But squash merge should sort the problem out.

Copy link
Member

@maskaravivek maskaravivek left a 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)

@maskaravivek maskaravivek merged commit 5c6ab3b into commons-app:master Nov 27, 2019
@misaochan misaochan deleted the fix-date-template branch December 10, 2019 15:08
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.

Wrong dates added for non-English locales
3 participants