-
Notifications
You must be signed in to change notification settings - Fork 3
Description
How to make new translation
First of all you should create translation files.
This bot uses pybabel for nice localization.
This is built in extension so you don't have to install it.
Step 1
So, open your cmd in the root of this project and run following command:
pybabel extract . -o locales/blackjack.pot
It creates .pot file and reads translation rows from code.
Step 2
Next command needs to create localization files:
pybabel init -i locales/blackjack.pot -d locales/ blackjack -l your_locale_name
Instead of "your_locale_name" type your locale name, for example it can be "en", "ru" either something else.
If all is okay you should see new folder in locales folder.
E.g. locales/your_locale_name/LC_MESSAGES
Step 3
Manually write translations
In order to this, jump to locales/your_locale_name/LC_MESSAGES/messages.po file.
Also, except translation, you can specify your authorship in this file.
Step 4
After you done with it, compile this file to finish work.
pybabel compile -d locales -D blackjack
That's all!
Now you can do pull request with your new awesome translations!