Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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:master
base:master
Choose a base branch
Loading
fromdaobook:xin
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions.github/workflows/deploy.yml
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,7 @@

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language =None
language ='zh_CN'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand DownExpand Up@@ -286,3 +286,6 @@
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
}

locale_dirs = ['../locales']
gettext_compact = False # optional.
1 change: 1 addition & 0 deletionslocales/.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
*.mo
52 changes: 52 additions & 0 deletionslocales/zh_CN/LC_MESSAGES/404.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2011-2021 <a
# href="https://www.kennethreitz.org/projects">Kenneth Reitz</a> &amp; <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 ""

Loading

[8]ページ先頭

©2009-2025 Movatter.jp