-
Notifications
You must be signed in to change notification settings - Fork 5
96 ‐ Contributing
VoucherVault supports multiple languages already.
If your language is currently missing, I am happy for your translation contribution.
To do so, please clone the VoucherVault repository, add your new translations and create a pull request afterwards.
I'll then review the PR and likely merge it.
- Identify the local name of your language to add. For example
it
for Italian. - Add your new language to the
LANGUAGES
variable within the Django settings.py at/myproject/settings.py
(see here). - Create a new
.po
message file viadjango-admin makemessages -l it
whereit
is the local name of your language. - Add your translations to the
.po
file. Typically located at/locale/<locale>/LC_MESSAGES/django.po
now. Ensure to translate all relevant strings. - Compile the
.po
to.mo
viadjango-admin compilemessages --locale it
, whereit
is the local name of your newly added language. - Spawn the VoucherVault app via
python3 manage.py runserver --insecure
. Validate that all strings are translated correcly by choosing your newly added language from the left sidebar. Adjust and recompile the.po
file if necessary. - If everything is translated, create a PR with your newly added language. Please file in the new directory created at
/locale/
with your final.po
and.mo
files.
More details here:
Warning
It may be that some keywords such as voucher
, giftcard
etc. are not translated everywhere.
If so, you can add such missing strings for translation manually to the .po
file.
Typically, the following strings should be added at the end of the .po
file and translated manually:
msgid "giftcard"
msgstr "<YOUR-TRANSLATION>"
msgid "loyaltycard"
msgstr "<YOUR-TRANSLATION>"
msgid "voucher"
msgstr "<YOUR-TRANSLATION>"
msgid "coupon"
msgstr "<YOUR-TRANSLATION>"
msgid "Threshold"
msgstr "<YOUR-TRANSLATION>"
If you are a seasoned Django developer, I am happy to review and accept your Pull Request (PR).
To do so, please clone the VoucherVault repository, add your code changes or new features and create a pull request with a good description afterwards.
I'll then review the PR, if the SAST scanning by Bandit was successful. Likely merge, if the code is understandable and feature/change works.