|
1 年之前 | |
---|---|---|
.. | ||
ar | 1 年之前 | |
bg | 1 年之前 | |
ca | 1 年之前 | |
cs_CZ | 1 年之前 | |
cy | 1 年之前 | |
de | 1 年之前 | |
de_CH | 1 年之前 | |
el | 1 年之前 | |
en | 1 年之前 | |
es | 1 年之前 | |
et | 1 年之前 | |
fa | 1 年之前 | |
fi | 1 年之前 | |
fr | 1 年之前 | |
he | 1 年之前 | |
hu | 1 年之前 | |
it | 1 年之前 | |
ja | 1 年之前 | |
ko | 1 年之前 | |
nb | 1 年之前 | |
nl | 1 年之前 | |
pl | 1 年之前 | |
pt | 1 年之前 | |
ro | 1 年之前 | |
ru | 1 年之前 | |
sk | 1 年之前 | |
sv | 1 年之前 | |
tr | 1 年之前 | |
uk | 1 年之前 | |
zh | 1 年之前 | |
zh_TW | 1 年之前 | |
README.md | 1 年之前 | |
wtforms.pot | 1 年之前 |
WTForms uses gettext to provide translations. Translations for various strings rendered by WTForms are created and updated by the community. If you notice that your locale is missing, or find a translation error, please submit a fix.
To create a translation, initialize a catalog in the new locale:
$ pybabel init --input-file src/wtforms/locale/wtforms.pot --output-dir src/wtforms/locale --domain wtforms --locale <your locale>
This will create some folders under the locale name and copy the template.
To add new translatable string to the catalog:
pybabel extract --copyright-holder="WTForms Team" --project="WTForms" --version="$(python -c 'import wtforms; print(wtforms.__version__)')" --output-file src/wtforms/locale/wtforms.pot src/wtforms
After creating a translation, or to edit an existing translation, open
the .po
file. While they can be edited by hand, there are also tools
that make working with gettext files easier.
Make sure the .po
file:
After working on the catalog, verify that it compiles and produces the correct translations.
$ pybabel compile --directory src/wtforms/locale --domain wtforms --statistics
Try loading your translations into some sample code to verify they look correct.
To submit your translation, create a pull request on GitHub.