Compile .mo files

This commit is contained in:
Griatch 2021-05-29 17:30:20 +02:00
parent d482d2bec0
commit ecf757ba7c
9 changed files with 69 additions and 18 deletions

View file

@ -3,8 +3,44 @@
*Internationalization* (often abbreviated *i18n* since there are 18 characters *Internationalization* (often abbreviated *i18n* since there are 18 characters
between the first "i" and the last "n" in that word) allows Evennia's core between the first "i" and the last "n" in that word) allows Evennia's core
server to return texts in other languages than English - without anyone having server to return texts in other languages than English - without anyone having
to edit the source code. Take a look at the `locale` directory of the Evennia to edit the source code.
installation, there you will find which languages are currently supported.
Language-translations are done by volunteers. Therefore language support can
vary a lot depending on when they were last updated. Below are all languages
(besides English) with som level of support. Generally, any language not
updated after May 2021 will be missing translations.
```eval_rst
+---------------+----------------------+--------------+
| Language Code | Language | Last updated |
+===============+======================+==============+
| es | Spanish | Aug 2019 |
+---------------+----------------------+--------------+
| fr | French | Nov 2018 |
+---------------+----------------------+--------------+
| it | Italian | Feb 2015 |
+---------------+----------------------+--------------+
| ko | Korean(simplified) | Sep 2019 |
+---------------+----------------------+--------------+
| la | Latin | Feb 2021 |
+---------------+----------------------+--------------+
| po | Polish | Feb 2019 |
+---------------+----------------------+--------------+
| pt | Portugese | Dec 2015 |
+---------------+----------------------+--------------+
| ru-RU | Russian (Russia) | Apr 2020 |
+---------------+----------------------+--------------+
| sv | Swedish | June 2021 |
+---------------+----------------------+--------------+
| zh-Hans | Chinese (simplified) | May 2019 |
+---------------+----------------------+--------------+
```
Language translations are found in the [evennia/locale](github:evennia/locale/)
folder. Read below if you want to help improve an existing translation of
contribute a new one.
## Changing server language ## Changing server language
@ -12,16 +48,26 @@ Change language by adding the following to your `mygame/server/conf/settings.py`
file: file:
```python ```python
USE_I18N = True USE_I18N = True
LANGUAGE_CODE = 'en' LANGUAGE_CODE = 'en'
``` ```
Here `'en'` should be changed to the abbreviation for one of the supported Here `'en'` (the default English) should be changed to the abbreviation for one
languages found in `locale/`. Restart the server to activate i18n. The of the supported languages found in `locale/` (and in the list above). Restart
two-character international language codes are found the server to activate i18n.
[here](http://www.science.co.il/Language/Codes.asp).
```important::
Even for a 'fully translated' language you will still see English text
in many places when you start Evennia. This is because we expect you (the
developer) to know English (you are reading this manual after all). So we
translate hard-coded strings that the end player may see - things you can't
easily change from your mygame/ folder. Outputs from Commands and
Typeclasses are generally not translated, nor are command/log outputs -
and these are likely to be the brunt of the text the player will see.
```
> Windows Note: If you get errors concerning `gettext` or `xgettext` on Windows, > Windows Note: If you get errors concerning `gettext` or `xgettext` on Windows,
> see the > see the
@ -29,6 +75,7 @@ two-character international language codes are found
> A self-installing and up-to-date version of gettext for Windows (32/64-bit) is > A self-installing and up-to-date version of gettext for Windows (32/64-bit) is
> available on [Github](https://github.com/mlocati/gettext-iconv-windows). > available on [Github](https://github.com/mlocati/gettext-iconv-windows).
## Translating Evennia ## Translating Evennia
```important:: ```important::
@ -36,8 +83,7 @@ two-character international language codes are found
Evennia offers translations of hard-coded strings in the server, things like Evennia offers translations of hard-coded strings in the server, things like
"Connection closed" or "Server restarted", strings that end users will see and "Connection closed" or "Server restarted", strings that end users will see and
which game devs are not supposed to change on their own. Text you see in the log which game devs are not supposed to change on their own. Text you see in the log
file or on the command line (like error messages) are generally *not* translated file or on the command line/log are *not* translated.
(this is a part of Python).
In addition, text in default Commands and in default Typeclasses will *not* be In addition, text in default Commands and in default Typeclasses will *not* be
translated by switching *i18n* language. To translate Commands and Typeclass translated by switching *i18n* language. To translate Commands and Typeclass
@ -46,14 +92,15 @@ two-character international language codes are found
*i18n* code to commands tend to add complexity to code that is *meant* to be *i18n* code to commands tend to add complexity to code that is *meant* to be
changed anyway. One of the goals of Evennia is to keep the user-changeable code changed anyway. One of the goals of Evennia is to keep the user-changeable code
as clean and easy- to-read as possible. as clean and easy- to-read as possible.
``` ```
Translations are found in the core `evennia/` library, under Translations are found in the core `evennia/` library, under
`evennia/evennia/locale/`. You must make sure to have cloned this repository `evennia/evennia/locale/`. You must make sure to have cloned this repository
from [Evennia's github](github:evennia) before you can proceed. from [Evennia's github](github:evennia) before you can proceed.
If you cannot find your language in `evennia/evennia/locale/` it's because noone has If you cannot find your language in `evennia/evennia/locale/` it's because noone
translated it yet. Alternatively you might have the language but find the has translated it yet. Alternatively you might have the language but find the
translation bad ... You are welcome to help improve the situation! translation bad ... You are welcome to help improve the situation!
To start a new translation you need to first have cloned the Evennia repositry To start a new translation you need to first have cloned the Evennia repositry

View file

@ -1,5 +1,5 @@
# Toc # Toc
- [API root](api/evennia-api.rst)
- [Coding/Coding Introduction](Coding/Coding-Introduction) - [Coding/Coding Introduction](Coding/Coding-Introduction)
- [Coding/Coding Overview](Coding/Coding-Overview) - [Coding/Coding Overview](Coding/Coding-Overview)
- [Coding/Continuous Integration](Coding/Continuous-Integration) - [Coding/Continuous Integration](Coding/Continuous-Integration)

View file

@ -1,4 +1,4 @@
# Latin translator # Spanish
# Copyright (C) Evennia # Copyright (C) Evennia
# This file is distributed under the same license as the Evennia package. # This file is distributed under the same license as the Evennia package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.

View file

@ -1,8 +1,7 @@
# The French translation for the Evennia server. # The French translation for the Evennia server.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) 2018
# This file is distributed under the same license as the Evennia package. # This file is distributed under the same license as the Evennia package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # Vincent Le Geoff <vincent-lg <vincent.legoff.srs@gmail.com>, 2018
# Maintained by: vincent-lg <vincent.legoff.srs@gmail.com>, 2018-
# #
msgid "" msgid ""
msgstr "" msgstr ""

View file

@ -1,4 +1,4 @@
# Evennia (Beta 0.5.0) Traduzione in Italiano # Evennia Traduzione in Italiano
# Prima bozza : versione 0.1 (2015/03/03) # Prima bozza : versione 0.1 (2015/03/03)
# di/by Tristano Ajmone <tajmone@gmail.com>, 2015. # di/by Tristano Ajmone <tajmone@gmail.com>, 2015.
# #

View file

@ -1,4 +1,4 @@
# EVENNIA Beta 0.5.0 - Tradução em Português # EVENNIA - Tradução em Português
# Copyright (C) 2015, Daniel Dias Rodrigues (a.k.a. Nerun) # Copyright (C) 2015, Daniel Dias Rodrigues (a.k.a. Nerun)
# This file is distributed under the same license as the Evennia package. # This file is distributed under the same license as the Evennia package.
# Nerun <nerunblogs@gmail.com>, 2015. # Nerun <nerunblogs@gmail.com>, 2015.

View file

@ -1,3 +1,8 @@
# Evennia Russian translation
# Copyright (C) 2019
# This file is distributed under the same license as the Evennia package.
# AUTHOR <EMAIL>, 2019
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Evennia Russian Translation v0.1\n" "Project-Id-Version: Evennia Russian Translation v0.1\n"