-
Notifications
You must be signed in to change notification settings - Fork 22
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
itfor Italian. - Add your new language to the
LANGUAGESvariable within the Django settings.py at/myproject/settings.py(see here). - Create a new
.pomessage file viadjango-admin makemessages -l itwhereitis the local name of your language. - Add your translations to the
.pofile. Typically located at/locale/<locale>/LC_MESSAGES/django.ponow. Ensure to translate all relevant strings. - Compile the
.poto.moviadjango-admin compilemessages --locale it, whereitis 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.pofile 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.poand.mofiles.
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.