Skip to content

Commit

Permalink
Updates to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
theriftlab committed Apr 16, 2024
1 parent fee8c3f commit e7a6923
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Immanuel is currently available in the following locales / languages:
* **pt_BR:** Brazilian Portuguese
* Coming soon: Spanish translation

See [the documentation](/docs/5-settings.md#locale) on how to switch. Documentation itself is not currently available in other translations.
See [the documentation](/docs/5-settings.md#locale) on how to switch. The documentation itself is not currently available in other translations. To contribute translations, see [below](#contributions).

## Quick Start

Expand Down Expand Up @@ -269,6 +269,28 @@ Immanuel is forever indebted to the pioneering work of Alois Treindl and Dieter

A big thank-you goes to Nathan Octavio who suggested translations, and who translated Immanuel into Brazilian Portuguese.

## Contributions

New translations for Immanuel's output are always welcome, although it is currently geared to Western-European languages. If you would like to contribute a translation, follow these steps:

* Fork the repo.
* Create a branch named after the locale, eg. `translations/pr_BR` - locale names for various languages can be found online, for example [here](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a), although you should use an underscore rather than a hyphen.
* Create a subdirectory in `/locales` named after your locale code, and another sub-directory under this called `LC_MESSAGES`.
* Copy `locales/immanuel.pot` into the new `LC_MESSAGES` sub-directory and rename it `immanuel.po`.
* For every English word in a `msgid` string, if there is a direct translation in your language, enter it in the following empty `msgstr`. For gendered adjectives, you will need to add all gendered variants using `msgctxt` like this:
```
msgctxt "masculine"
msgid "Applicative"
msgstr "Aplicativo"
msgctxt "feminine"
msgid "Applicative"
msgstr "Aplicativa"
```
* To map genders, a file `mappings.py` will need to be created under your new locale directory alongside `LC_MESSAGES`. See existing mapping files for an example of how to assign all of Immanuel's objects a gender for your language.
* Once all translations and gender-mapping is complete, you can either compile your `.po` file to an `.mo` file or simply leave this out and I will compile it. Commit your changes and create a pull request.
* If everything looks good, I will merge to master & prep a new release!

## Contact

Please post any issues, feature requests, PRs etc. on GitHub. For anything else email [email protected].

0 comments on commit e7a6923

Please sign in to comment.