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

Commitdf66209

Browse files
committed
preview support
1 parent14788bd commitdf66209

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

‎.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/cpython
2+
/venv

‎README.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
파이썬 한국어 번역
2+
==========================
3+
4+
파이썬 안정판만을 번역하고, 현재는 3.6 입니다. 번역은 3.6 브랜치에 들어있고, master 브랜치에는 번역 작업을 보조하는 도구들이 들어있습니다.
5+
6+
번역팀에 문의가 있으신 분들은 http://www.flowdas.com/pages/python-docs-ko.html 를 참고 바랍니다.
7+
8+
교정을 위한 프리뷰 빌드하기
9+
---------------------------------------
10+
11+
저장소를 fork 한 후에 git clone 하면 master 브랜치의 작업 사본이 만들어집니다. 이 디렉토리에서 다음과 같은 명령을 실행합니다.
12+
13+
::
14+
15+
python3 -m venv venv
16+
venv/bin/python -m pip install -r requirements.txt
17+
./build.py
18+
19+
이제 ``cpython/Doc/build/html/index.html`` 에 프리뷰 파일이 만들어집니다.
20+
21+
한편 ``cpython/locale/ko/LC_MESSAGES`` 디렉토리에는 여러분이 fork 한 저장소의 3.6 브랜치의 작업 사본이 만들어집니다.
22+
23+
이제 ``cpython/locale/ko/LC_MESSAGES`` 디렉토리의 파일들을 번역한 후에, ``./build.py`` 를 실행하면 프리뷰가 업데이트 됩니다.

‎build.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env python3
2+
importos
3+
importsubprocess
4+
5+
VERSION='3.6'
6+
7+
8+
defshell(cmd,capture=False,chdir=None):
9+
opts= {
10+
'shell':True,
11+
'stdin':subprocess.PIPE,
12+
}
13+
cwd=os.getcwd()ifchdirelseNone
14+
ifchdir:
15+
os.chdir(chdir)
16+
try:
17+
ifcapture:
18+
opts['stderr']=subprocess.STDOUT
19+
opts['universal_newlines']=True
20+
returnsubprocess.check_output(cmd,**opts)
21+
else:
22+
returnsubprocess.check_call(cmd,**opts)
23+
finally:
24+
ifcwd:
25+
os.chdir(cwd)
26+
27+
28+
defgit_clone(repository,directory,branch=None):
29+
shell("git clone --depth 1 --no-single-branch {} {}".format(repository,directory))
30+
ifbranch:
31+
shell("git -C {} checkout {}".format(directory,branch))
32+
33+
34+
defprepare_env():
35+
ifnotos.path.exists('cpython'):
36+
git_clone('git@github.com:python/cpython.git','cpython',VERSION)
37+
38+
locale_dir=os.path.join('cpython','locale','ko','LC_MESSAGES')
39+
ifnotos.path.exists(locale_dir):
40+
locale_repo=shell('git config --get remote.origin.url',capture=True).strip()
41+
git_clone(locale_repo,locale_dir,VERSION)
42+
43+
44+
defbuild():
45+
doc_dir=os.path.join('cpython','Doc')
46+
shell(
47+
"make VENVDIR=../../venv SPHINXOPTS='-D locale_dirs=../locale -D language=ko -D gettext_compact=0' autobuild-stable-html",
48+
chdir=doc_dir)
49+
50+
51+
defmain():
52+
prepare_env()
53+
build()
54+
55+
56+
if__name__=='__main__':
57+
main()

‎requirements.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
alabaster==0.7.10
2+
Babel==2.4.0
3+
certifi==2018.1.18
4+
chardet==3.0.4
5+
docutils==0.14
6+
idna==2.6
7+
imagesize==1.0.0
8+
Jinja2==2.10
9+
MarkupSafe==1.0
10+
Pygments==2.2.0
11+
pyparsing==2.2.0
12+
pytz==2018.4
13+
requests==2.18.4
14+
six==1.11.0
15+
snowballstemmer==1.2.1
16+
Sphinx==1.7.4
17+
sphinx-rtd-theme==0.3.0
18+
blurb==1.0.6
19+
sphinxcontrib-websupport==1.0.1
20+
typing==3.6.1
21+
urllib3==1.22
22+
python-docs-theme==0.0.1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp