MOON
Server: Apache
System: Linux 54-179-220-51.cprapid.com 3.10.0-1160.144.1.el7.tuxcare.els4.x86_64 #1 SMP Tue Apr 7 08:40:40 UTC 2026 x86_64
User: hunarpak (1005)
PHP: 7.4.29
Disabled: NONE
Upload Files
File: //usr/share/imunify360-webshield/captcha/translations/README.MD
### Captcha Localization

In order to extract text to be translated from source code run:
```
cd <IMUNIFY360_WEBSHIELD_PATH>/captcha
pybabel extract -F babel.cfg -o extracted_translations.pot .
```
This creates the PO file template extracted_translations.pot

If you don't already have translation catalogs, you need to create them.
This is done using the pybabel init command:
```
pybabel init -i extracted_translations.pot -d translations/locale/ -l ru
pybabel init -i extracted_translations.pot -d translations/locale/ -l en
```

This should create files: translations/locale/{ru,en}/LC_MESSAGES/messages.po based on extracted_translations.pot
These files are where you put the actual translations.

When you modify templates, you generally need to sync the translation catalogs.
For that, you first perform a fresh extraction as described in the previous section,
so that the extracted_translations.pot file gets updated.
Then, you run the pybabel update command to merge the changes into the translation catalogs:

```
pybabel update -i extracted_translations.pot -d translations/locale/
```

[Here is a good instruction](https://github.com/python-babel/django-babel)