mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-02-16 17:41:21 +01:00
CONTRIBUTING: Improve translation guidelines
This commit is contained in:
parent
9b917e79b1
commit
3530263083
@ -135,14 +135,30 @@ The list of language tags (generally two letters)
|
|||||||
and locales (generally of the form `xx_XX`)
|
and locales (generally of the form `xx_XX`)
|
||||||
can be found in this stackoverflow answer: https://stackoverflow.com/a/7989085
|
can be found in this stackoverflow answer: https://stackoverflow.com/a/7989085
|
||||||
|
|
||||||
### Translations
|
### Updating translation
|
||||||
|
|
||||||
Translations are always welcome !
|
The text used in the app is written in `res/values-<language_tag>/strings.xml`.
|
||||||
|
|
||||||
See for example: 1723288 (Latvian), baf867a (French).
|
The list of language tags can be found in this stackoverflow answer:
|
||||||
The app can be translated by writing `res/values-<language code>/strings.xml`
|
https://stackoverflow.com/a/7989085
|
||||||
(for example `values-fr`, `values-lv`), based on the default:
|
The first part before the `_` is used, for example,
|
||||||
`res/values/strings.xml` (English).
|
`res/values-fr/strings.xml` for French,
|
||||||
|
`res/values-lv/strings.xml` for Latvian.
|
||||||
|
|
||||||
|
Commented-out lines indicate missing translations:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<!-- <string name="pref_layouts_add">Add an alternate layout</string> -->
|
||||||
|
```
|
||||||
|
|
||||||
|
They can be translated by removing the `<!--` and `-->` parts and changing the
|
||||||
|
text.
|
||||||
|
|
||||||
|
### Adding a translation
|
||||||
|
|
||||||
|
The `res/values-<language_tag>/strings.xml` file must be created by copying the
|
||||||
|
default translation in `res/values/strings.xml`, which contain the structure of
|
||||||
|
the file and the English strings.
|
||||||
|
|
||||||
To check that `strings.xml` is formatted correctly, run
|
To check that `strings.xml` is formatted correctly, run
|
||||||
`python sync_translations.py`. This will modify your files.
|
`python sync_translations.py`. This will modify your files.
|
||||||
@ -152,7 +168,7 @@ The store description is found in `metadata/android/<locale>/`,
|
|||||||
The short description must not exceed 80 characters.
|
The short description must not exceed 80 characters.
|
||||||
Translating changelogs is not useful.
|
Translating changelogs is not useful.
|
||||||
|
|
||||||
The app name might be partially translated, the "unexpected" word should remain
|
The app name might be partially translated, the "Unexpected" word should remain
|
||||||
untranslated.
|
untranslated.
|
||||||
|
|
||||||
As translations need to be updated regularly, you can subscribe to this issue
|
As translations need to be updated regularly, you can subscribe to this issue
|
||||||
|
Loading…
Reference in New Issue
Block a user