Skip to content

Commit

Permalink
fixing links
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jul 31, 2021
1 parent 1ab363a commit ee37c33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

The server sends emails to users upon creation of a new account and when the user requests to rest the password:

* [server/templ/email-validation-en.templ](server/templ/email-validation-en.templ)
* [server/templ/email-password-reset-en.templ](server/templ/email-password-reset-en.templ)
* [../server/templ/email-validation-en.templ](server/templ/email-validation-en.templ)
* [../server/templ/email-password-reset-en.templ](server/templ/email-password-reset-en.templ)

Create a copy of the files naming them `email-password-reset-XX.teml` and `email-validation-XX.templ` where `XX` is the [ISO-631-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code of the new language. Translate the content and send a pull request with the new files. If you don't know how to create a pull request then just sent the files in any way you can.

## Webapp

The translations are located in two places: [src/i18n/](src/i18n/) and [service-worker.js](service-worker.js).
The translations are located in two places: [/src/i18n/](/tinode/webapp/src/i18n/) and [/service-worker.js](/tinode/webapp/service-worker.js).

In order to add a translation, copy `src/i18n/en.json` to a file named `src/i18n/XX.json` where `XX` is the [BCP-47](https://tools.ietf.org/rfc/bcp/bcp47.txt) code of the new language. If in doubt how to choose the BCP-47 language code, use a two letter [ISO-631-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). Only the `"translation":` line have to be translated, the `"defaultMessage"`, `"description"` etc should NOT be translated, they serve as help only, i.e.:

Expand Down Expand Up @@ -41,7 +41,7 @@ Please send a pull request with the new files. If you don't know how to create a
## Android
A single file needs to be translated: https://github.com/tinode/tindroid/app/src/main/res/values/strings.xml
A single file needs to be translated: [/tinode/tindroid/app/src/main/res/values/strings.xml](/tinode/tindroid/app/src/main/res/values/strings.xml)
Create a new directory `values-XX` in [app/src/main/res](app/src/main/res), where `XX` is a two-letter [ISO-631-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code , optionally followed by a two letter [ISO 3166-1-alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) region code (preceded by lowercase r), for example `pt-rBR`: Brazilian Portuguese.
Expand Down

0 comments on commit ee37c33

Please sign in to comment.