Do you want to contribute? You can contribute here at Github. By checking the code, trying the documentation, suggesting new tests, among other things.
add ingress here
add ingress here
add ingress here
What you are allowed to do with this code / repo. The license used is the MIT license. This means that you can do whatever you want with the source code, including using it in commercial software and contexts. However, there is no guarantee or liability for the code.
The multiple language support is built on gettext
in Python.
You could either follow the more technical suggestions below, or you perhaps would like an application such as Poedit (available on Macos, Linux and Windows).
To create a new language source file:
python3 <your path to pygettext.py > -d webperf-core -o locales/webperf-core.pot default.py checks.py
Copy the file to your locale, for Swedish it would be:
locales/sv/LC_MESSAGES/webperf-core.pot
Rename the file extension from .pot
to .po
After you have translated everything you should run the following command from the LC_MESSAGES folder:
python3 <your path to msgfmt.py> -o webperf-core.mo webperf-core.po
You now have support for a new language, please send it to the official repository using a pull request :)
Locate your pygettext.py file:
locate pygettext.py
It might be as follows:
/Library/Frameworks/Python.framework/Versions/3.8/share/doc/python3.8/examples/Tools/i18n/pygettext.py
Locate your msgfmt.py file:
locate msgfmt.py
It might be as follows:
/Library/Frameworks/Python.framework/Versions/3.8/share/doc/python3.8/examples/Tools/i18n/msgfmt.py
The command can be:
python3 /Library/Frameworks/Python.framework/Versions/3.8/share/doc/python3.8/examples/Tools/i18n/pygettext.py -d webperf-core -o locales/webperf-core.pot default.py