- Notifications
You must be signed in to change notification settings - Fork5.9k
Use sphinx-intl to create Chinese versions and provide automated deployment to the gh-pages branch.#1109
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
xinetzone wants to merge8 commits intorealpython:masterChoose a base branch fromdaobook:xin
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Use sphinx-intl to create Chinese versions and provide automated deployment to the gh-pages branch.#1109
Changes fromall commits
Commits
Show all changes
8 commits Select commitHold shift + click to select a range
d53a598
+zh_CN
xinetzoneb6d0d26
modified: locales/zh_CN/LC_MESSAGES/notes.po
xinetzoneb6437b9
finish starting/which-python
xinetzoneaf0f0cf
finish starting/installation
xinetzonee12d3cc
modified: locales/zh_CN/LC_MESSAGES/starting.po
xinetzonee7ceaa0
modified: docs/conf.py
xinetzone0d5bd15
modified: locales/zh_CN/LC_MESSAGES/intro/learning.po
xinetzone36c8ddd
modified: locales/zh_CN/LC_MESSAGES/intro/news.po
xinetzoneFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
38 changes: 38 additions & 0 deletions.github/workflows/deploy.yml
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: deploy | ||
on: | ||
push: | ||
branches: | ||
- xin | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- uses: s-weigand/setup-conda@v1 | ||
- run: conda --version | ||
- run: which python | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install sphinx-intl | ||
- name: Build the book | ||
run: | | ||
sphinx-build -b gettext docs build/gettext | ||
sphinx-intl update -p build/gettext -l zh_CN | ||
sphinx-build -D language=zh_CN -b html docs build/html | ||
- name: GitHub Pages action | ||
uses: peaceiris/actions-gh-pages@v3.6.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: build/html | ||
user_name: "github-actions[bot]" | ||
user_email: "github-actions[bot]@users.noreply.github.com" |
5 changes: 4 additions & 1 deletiondocs/conf.py
This file contains hidden or 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
1 change: 1 addition & 0 deletionslocales/.gitignore
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
*.mo |
52 changes: 52 additions & 0 deletionslocales/zh_CN/LC_MESSAGES/404.po
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) 2011-2021 <a | ||
# href="https://www.kennethreitz.org/projects">Kenneth Reitz</a> & <a | ||
# href="https://realpython.com">Real Python</a>. <a | ||
# href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA | ||
# 3.0</a> | ||
# This file is distributed under the same license as the pythonguide | ||
# package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: pythonguide 0.0.1\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-11-18 16:06+0800\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.9.1\n" | ||
#: ../../docs/404.rst:5 | ||
msgid "404 — Not Found" | ||
msgstr "" | ||
#: ../../docs/404.rst:7 | ||
msgid "**Sorry, but we couldn't find the page you requested.**" | ||
msgstr "" | ||
#: ../../docs/404.rst:9 | ||
msgid "It looks like this was the result of either:" | ||
msgstr "" | ||
#: ../../docs/404.rst:11 | ||
msgid "a mistyped address" | ||
msgstr "" | ||
#: ../../docs/404.rst:12 | ||
msgid "an out-of-date link" | ||
msgstr "" | ||
#: ../../docs/404.rst:14 | ||
msgid "`Click here to go back to the homepage. <https://docs.python-guide.org/>`_" | ||
msgstr "" | ||
#: ../../docs/404.rst:16 | ||
msgid "Or, try `searching <https://docs.python-guide.org/search/>`_." | ||
msgstr "" | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.