# Translations

You want to contribute a new translation or update an existing one?
Already thanks in advance for your effort!
Here are some instructions that you can follow.

## Instructions for non developers

I need two types of translations from you.
The first one is for the texts that are displayed in the app.
And the second one is for the texts that are displayed in the app stores.

For the first one you can use this English [strings.xml](../app/src/main/res/values/strings.xml) file as a template.
Create a new file with the same content and replace the text between the `<string name="example">...</string>` tags with
a matching translation.
Some texts here contain special characters.
Please keep them in your texts as well.
`\n` creates a new line.
And `%1$s`, `%2$s` and `%1$d` are placeholders for text that the app generates dynamically.

For the second one you can use these three English files as templates:
[title.txt](../fastlane/metadata/android/en-US/title.txt),
[short_description.txt](../fastlane/metadata/android/en-US/short_description.txt) and
[full_description.txt](../fastlane/metadata/android/en-US/full_description.txt).
Just create translated versions of these files.

Now you can provide me the four translated files with the information for which specific language it is.
In the best case provide one of the language codes that are listed
[here](https://android.googlesource.com/platform/frameworks/base/+/android-10.0.0_r1/core/res/res/values/locale_config.xml).
You can either send a mail to <philipp.bobek@mailbox.org> and attach all the information.
Or you can open an issue here at [GitHub](https://github.com/Kr0oked/Compass/issues) and attach all the information.
I will take care to include your translation in the app.

## Instructions for developers

Please read the instructions for non developers first.
You need to translate the same files as described there.

For the strings.xml file, place it in a new appropriate directory in the [app/src/main/res](../app/src/main/res)
directory.
If the language can be used independent of the region then e.g. `values-de` is suitable for a German translation.
But if the region matters as for Brazilian Portuguese then e.g. `values-pt-rBR` is appropriate.
You don't have to include strings with the `translatable="false"` attribute.

For the app store texts, place them in a new appropriate directory in
the [fastlane/metadata/android](../fastlane/metadata/android) directory.
The suffix of this directory is different from the directory of the app texts.
You can find the correct suffix in this
[list](https://support.google.com/googleplay/android-developer/answer/9844778?hl=en#zippy=%2Cview-list-of-available-languages).
You don't have create any images for your translation like the screenshots.
I will take care of them later on.

You can also update the translations table in the [README](../README.md) file.

Then open a new [pull request](https://github.com/Kr0oked/Compass/pulls) with your changes an I will check it.
