- Fork the repository on the GitHub page by clicking the Fork button. This makes a fork of the project under your GitHub account.
- Clone your fork to your machine.
git clone https://github.com/<Your_Username>/Tusky
- Create a new branch named after your change.
git checkout -b your-change-name(
checkoutswitches to a branch,
-bspecifies that the branch is a new one)
All English text that will be visible to users should be put in
app/src/main/res/values/strings.xml. Any text that is missing in a translation will fall back to the version in this file. Be aware that anything added to this file will need to be translated, so be very concise with wording and try to add as few things as possible. Look for existing strings to use first. If there is untranslatable text that you don't want to keep as a string constant in a Java class, you can use the string resource file
Translations are done through our Weblate. To add a new language, click on the 'Start a new translation' button on at the bottom of the page.
This project is in the process of migrating to Kotlin, all new code must be written in Kotlin.
We try to follow the Kotlin Style Guide and make format the code according to the default ktlint codestyle.
You can check the codestyle by running
Existing code in Java should follow the Android Style Guide, which is what Android uses for their own source code.
@NotNull annotations are really helpful for Kotlin interoperability. Please don't submit new features written in Java.
We use Viewbinding to reference views. No contribution using another mechanism will be accepted.
There are useful extensions in
src/main/java/com/keylesspalace/tusky/util/ViewExtensions.kt that make working with viewbinding easier.
There are three themes in the app, so any visual changes should be checked with each of them to ensure they look appropriate no matter which theme is selected. Usually, you can use existing color attributes like
Any time you get a good chunk of work done it's good to make a commit. You can either uses Android Studio's built-in UI for doing this or running the commands:
git add . git commit -m "Describe the changes in this commit here."
Submitting Your Changes
- Make sure your branch is up-to-date with the
git fetch git rebase origin/develop
It may refuse to start the rebase if there's changes that haven't been committed, so make sure you've added and committed everything. If there were changes on develop to any of the parts of files you worked on, a conflict will arise when you rebase. Resolving a merge conflict is a good guide to help with this. After committing the resolution, you can run
git rebase --continue to finish the rebase. If you want to cancel, like if you make some mistake in resolving the conflict, you can always do
git rebase --abort.
- Push your local branch to your fork on GitHub by running
git push origin your-change-name.
- Then, go to the original project page and make a pull request. Select your fork/branch and use
developas the base branch.
- Wait for feedback on your pull request and be ready to make some changes
If you have any questions, don't hesitate to open an issue or contact Tusky@mastodon.social. Please also ask before you start implementing a new big feature.