-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translations update #1545
Merged
Merged
Translations update #1545
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
12bfde7
avoid using variable keys with i18n
emlys 9dff0e6
avoid translation template variables where possible
emlys 0223b0d
add new messages into es translation files
emlys 218cbc9
extract message catalog template and update es catalog from it
emlys 8c545b2
extract message catalog template and update zh catalog from it
emlys 58d33f0
add new messages into zh translation files
emlys 59ecd73
minor updates to invest translation readme
emlys f9a3fd5
extract message catalog template and update zh catalog from it
emlys 1f78fef
minor updates to workbench translation docs
emlys 7d70242
translations for data download test
emlys bf38e77
add new messages into es translation files
emlys 305de2c
add new messages into zh translation files
emlys e53094d
update ES message catalog with new translations
emlys 8f8c9a6
add new workbench translations for ES
emlys 276c74c
add no-python-format flag to gettext strings with percents
emlys 7632025
Merge branch 'main' into translations-update
emlys 82b3d43
add new translations for zh
emlys 99c00be
update to UG revision with new translations; add history note
emlys f3bf6ba
Merge branch 'main' into translations-update
emlys f80212f
add pyyaml requirement to docs requirements for ug
emlys 642516d
Merge branch 'translations-update' of https://github.com/emlys/invest…
emlys 71c245f
correct numbering of steps in workbench readme
emlys 710e19c
Merge branch 'main' into translations-update
emlys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What relies on the
pyyaml
dependency?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See natcap/invest.users-guide@df9acf8