Skip to content

Commit

Permalink
Merge pull request #1545 from emlys/translations-update
Browse files Browse the repository at this point in the history
Translations update
  • Loading branch information
dcdenu4 authored Nov 22, 2024
2 parents ec88d78 + 710e19c commit 4aa3218
Show file tree
Hide file tree
Showing 16 changed files with 10,093 additions and 6,827 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Unreleased Changes
reflect changes in how InVEST is installed on modern systems, and also to
include images of the InVEST workbench instead of just broken links.
https://github.com/natcap/invest/issues/1660
* Updated translations for Spanish and Chinese
* natcap.invest now works with (and requires) ``gdal.UseExceptions``. A
``FutureWarning`` is raised on import if GDAL exceptions are not enabled.
* Workbench
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GIT_TEST_DATA_REPO_REV := 324abde73e1d770ad75921466ecafd1ec6297752

GIT_UG_REPO := https://github.com/natcap/invest.users-guide
GIT_UG_REPO_PATH := doc/users-guide
GIT_UG_REPO_REV := f203ec069f9f03560c9a85b268e67ebb6b994953
GIT_UG_REPO_REV := 5ee3616d4549baf3b1e44e0fcef485145389e29a

ENV = "./env"
ifeq ($(OS),Windows_NT)
Expand Down
1 change: 1 addition & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Sphinx>=1.3.1,!=1.7.1
sphinx-rtd-theme
sphinx-intl
sphinx-reredirects
pyyaml
5 changes: 3 additions & 2 deletions src/natcap/invest/internationalization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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.

Expand Down
Loading

0 comments on commit 4aa3218

Please sign in to comment.