The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons. Download the app [here][1], or view our [website][2].
Initially started by the Wikimedia Foundation, this app is now maintained by grantees and volunteers of the Wikimedia community. Anyone is welcome to improve it, just choose among the [open issues][3] and send us a pull request! :-)
Our [documentation repository][4] contains extensive documentation for users, contributors, and developers alike:
Thank you all for your work!
[Bug]: File page loads all its details again after a dark/light mode switch
https://github.com/commons-app/apps-android-commons/issues/7528
Labels: 없음
Detekt: BlurOverlayView.onTouchEvent is very complex (complexity 30)
https://github.com/commons-app/apps-android-commons/issues/7520
Labels: code-quality
Detekt: shorten BlurOverlayView.initView and onDraw (3 findings)
https://github.com/commons-app/apps-android-commons/issues/7518
Labels: code-quality
Detekt: long and complex methods in NearbyParentFragment (8 findings)
https://github.com/commons-app/apps-android-commons/issues/7517
Labels: code-quality
Detekt: shorten ImageAdapter.onBindViewHolder (1 finding)
https://github.com/commons-app/apps-android-commons/issues/7509
Labels: code-quality
Detekt: shorten long methods in the Uploads screens (3 findings)
https://github.com/commons-app/apps-android-commons/issues/7501
Labels: good first issue, code-quality
Thanks for considering to contribute to this project! A few guidelines for people who want to contribute their code to this software are documented in this project's Wiki. If you're not sure where to start head on to this wiki page.
Here's a gist of the guidelines,
Make separate commits for logically separate changes
Describe your changes well in the commit message
The first line of the commit message should be a short description of what has changed. It is also good to prefix the first line with "area: " where the "area" is a filename or identifier for the general area of the code being modified. The body should provide a meaningful commit message.
Write Javadocs
We require contributors to include Javadocs for all new methods and classes submitted via PRs (after 1 May 2018). This is aimed at making it easier for new contributors to dive into our codebase, especially those who are new to Android development. A few things to note:
@author tags - we aim for collective code ownership,
and if needed, Git allows us to see who wrote something without needing
to add these tags (git blame)Write tests for your code (if possible)
Make sure the Wiki pages don't become stale by updating them (if needed)
Document every new string for translators
When you add a string to app/src/main/res/values/strings.xml or
values/error.xml, add a non-empty entry with the same name to the file of
the same name in app/src/main/res/values-qq/. That folder is not a
language: translatewiki.net shows it to translators next to the English
text, and they usually translate without seeing the app. If you change what
a string means, or add or remove a placeholder, update its qq entry too. If
you remove a string, remove its qq entry. Strings with
translatable="false" don't need one. CI checks all of this.
A good qq entry says:
%1$s or %1$d stands for, with an example
value{{msg-wm|Commons-android-strings-<name with spaces instead of underscores>}}translatewiki.net reads qq entries as wikitext, so wrap things like ~~~
in <nowiki>...</nowiki>, written as <nowiki>~~~</nowiki>
in the XML. Otherwise ~~~ turns into a signature.
Not helpful: Button text.
Helpful: Button on the image edit screen. Verb: make the areas the user draws blurry, for example to hide faces.
See Message documentation for more.
Run the checks that are relevant to your changes before opening a pull request. The commands below use the same Gradle wrapper and build variants used by the pull request workflow.
./gradlew), rather than relying
on a separately installed Gradle version. The wrapper downloads the configured
Gradle version if it is not already available.local.properties exists in the repository root. The Gradle
build reads it during configuration and reads TEST_USER_NAME and
TEST_USER_PASSWORD from it to populate app build configuration. This local
file is ignored by Git and must never be committed or published. Valid
credentials are needed for login-based instrumentation tests, not for
ordinary JVM unit tests or the other local validation commands below. Never
commit or publish test credentials.Choose checks relevant to your changes: run formatting and static analysis for Kotlin changes, unit tests for changes that affect tested behavior, and Android Lint for Android code or resource changes. The combined command below is a convenient broader pre-PR check, not a requirement for every small, documentation-only change.
| Command | What it checks |
|---|---|
./gradlew :app:ktlintCheck | Kotlin formatting rules for files covered by the project's ktlint configuration. |
./gradlew :app:detekt | Kotlin static analysis using the project's Detekt configuration and baseline. |
./gradlew :app:testBetaDebugUnitTest | JVM unit tests for the Beta Debug variant. |
./gradlew :app:lintBetaDebug | Android Lint for the Beta Debug variant. |
You can run the formatting and static-analysis checks together:
./gradlew :app:ktlintCheck :app:detekt --continue
For broader pre-PR validation, you can run all four checks in one Gradle invocation:
./gradlew :app:ktlintCheck :app:detekt :app:testBetaDebugUnitTest :app:lintBetaDebug --continue
These commands compile and package the corresponding debug APK. They do not run the app or replace tests:
./gradlew :app:assembleBetaDebug
./gradlew :app:assembleProdDebug
To request the configured Beta Debug unit-test coverage task, use:
./gradlew -Pcoverage :app:testBetaDebugUnitTestCoverage
The task runs the unit tests and generates a coverage report when JaCoCo execution data is available. Gradle may ski