-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1545 from emlys/translations-update
Translations update
- Loading branch information
Showing
16 changed files
with
10,093 additions
and
6,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ Sphinx>=1.3.1,!=1.7.1 | |
sphinx-rtd-theme | ||
sphinx-intl | ||
sphinx-reredirects | ||
pyyaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ When we are ready to get a new batch of translations, here is the process. These | |
pybabel extract \ | ||
--no-wrap \ | ||
--project InVEST \ | ||
--msgid-bugs-address [email protected] \ | ||
--version $(python -m setuptools_scm) \ | ||
--msgid-bugs-address [email protected] \ | ||
--copyright-holder "Natural Capital Project" \ | ||
--output src/natcap/invest/internationalization/messages.pot \ | ||
src/ | ||
|
@@ -38,14 +39,14 @@ pybabel update \ | |
--input-file src/natcap/invest/internationalization/messages.pot \ | ||
--output-file src/natcap/invest/internationalization/locales/$LL/LC_MESSAGES/messages.po | ||
``` | ||
This looks through the source code for strings wrapped in the `gettext(...)` function and writes them to the message catalog template. Then it updates the message catalog for the specificed language. New strings that don't yet have a translation will have an empty `msgstr` value. Previously translated messages that are no longer needed will be commented out but remain in the file. This will save translator time if they're needed again in the future. | ||
|
||
2. Check that the changes look correct, then commit: | ||
``` | ||
git diff | ||
git add src/natcap/invest/internationalization/messages.pot src/natcap/invest/internationalization/locales/$LL/LC_MESSAGES/messages.po | ||
git commit -m "extract message catalog template and update $LL catalog from it" | ||
``` | ||
This looks through the source code for strings wrapped in the `gettext(...)` function and writes them to the message catalog template. Then it updates the message catalog for the specificed language. New strings that don't yet have a translation will have an empty `msgstr` value. Previously translated messages that are no longer needed will be commented out but remain in the file. This will save translator time if they're needed again in the future. | ||
|
||
3. Send `src/natcap/invest/internationalization/locales/$LL/LC_MESSAGES/messages.po` to the translator and wait to get it back. The translator will fill in the `msgstr` values for any new or edited messages. | ||
|
||
|
Oops, something went wrong.