Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit cf99bb2

Browse files
committed
翻訳準備 (#1)
* 翻訳準備 * CIスクリプト修正
1 parent 3ad872a commit cf99bb2

File tree

6 files changed

+137
-110
lines changed

6 files changed

+137
-110
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ on:
33
branches:
44
- main
55
pull_request:
6-
branches:
7-
- main
8-
release:
9-
types:
10-
- published
11-
- released
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
1216

1317
name: "Build and check HTML"
1418

@@ -122,77 +126,24 @@ jobs:
122126
fail: true
123127
args: --base './_out/html-multi/' --no-progress --offline './_out/html-multi/**/*.html'
124128

125-
# This saved number is used by a workflow_run trigger. It
126-
# manages labels that indicate the status of the built HTML.
127-
- name: Save PR number
128-
if: github.event_name == 'pull_request'
129-
run: |
130-
mkdir -p ./pr
131-
echo ${{ github.event.number }} > ./pr/NR
132-
- uses: actions/upload-artifact@v4
133-
if: github.event_name == 'pull_request'
129+
- name: Upload artifact
130+
uses: actions/upload-pages-artifact@v3
134131
with:
135-
name: pr
136-
path: pr/
137-
132+
path: _out/html-multi
133+
134+
# Deployment job
138135
deploy:
139-
name: Deploy release
136+
if: github.ref == 'refs/heads/main'
137+
environment:
138+
name: github-pages
139+
url: ${{ steps.deployment.outputs.page_url }}
140140
runs-on: ubuntu-latest
141-
needs: [build]
142-
if: github.event_name == 'release'
143-
outputs:
144-
ref-url: ${{ steps.deploy-release.outputs.deploy-url }}
141+
needs: build
145142
steps:
146-
- name: Get generated HTML from artifact storage
147-
uses: actions/download-artifact@v4
148-
with:
149-
name: 'html'
150-
path: '_out/'
151-
152-
# deploy-alias computes a URL component for the PR preview. This
153-
# is so we can have a stable name to use for feedback on draft
154-
# material.
155-
- id: deploy-alias
156-
uses: actions/github-script@v7
157-
name: Compute Alias
158-
with:
159-
script: |
160-
if (process.env.PR) {
161-
return `pr-${process.env.PR}`
162-
} else {
163-
return 'deploy-preview-main';
164-
}
165-
env:
166-
PR: ${{ github.event.number }}
167-
168-
# deploy-info computes metadata that's shown in the Netlify interface
169-
# about the deployment (for non-PR deploys)
170-
- id: deploy-info
171-
name: Compute Deployment Metadata
172-
if: github.event_name != 'pull_request'
173-
run: |
174-
set -e
175-
echo "message=$(git log -1 --pretty=format:"%s")" >> "$GITHUB_OUTPUT"
176-
177-
# When a release is created in GH, push to the main site without proofreading info
178-
- name: Deploy releases when tags are pushed
179-
id: deploy-release
180-
uses: nwtgck/actions-netlify@v2.0
181-
if: github.event_name == 'release'
182-
with:
183-
publish-dir: _out/html-multi
184-
production-branch: main
185-
production-deploy: true
186-
github-token: ${{ secrets.GITHUB_TOKEN }}
187-
deploy-message: |
188-
Release from tag ${{ github.ref }}
189-
enable-commit-comment: false
190-
enable-pull-request-comment: false
191-
fails-without-credentials: true
192-
env:
193-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
194-
NETLIFY_SITE_ID: "447031bf-9a96-4cee-831b-1f73599a7cb2"
195-
143+
- name: Deploy to GitHub Pages
144+
id: deployment
145+
uses: actions/deploy-pages@v4
146+
196147

197148
check-links:
198149
name: Check links

.github/workflows/pr-title.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

GLOSSARY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# 対訳表
2+
3+
| 英語 | 日本語 |
4+
| --- | --- |
5+
6+
7+
# 英語表現をそのまま用いている単語
8+
9+
| 用語 |
10+
| --- |

Manual.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ open Verso.Genre Manual
2020

2121
set_option pp.rawOnError true
2222

23+
/-
2324
#doc (Manual) "The Lean Language Reference" =>
25+
-/
26+
#doc (Manual) "The Lean Language Reference 日本語訳" =>
2427
%%%
2528
tag := "lean-language-reference"
2629
%%%
2730

31+
**注意:** この翻訳は有志による **非公式** 翻訳です。原文の最新版は [こちら](https://lean-lang.org/doc/reference/latest/) です。
32+
33+
_CAUTION:_ This is an **Unofficial** translation by volunteers.
34+
The latest version of original is [here](https://lean-lang.org/doc/reference/latest/).
2835

2936
This is the _Lean Language Reference_, an in-progress reference work on Lean.
3037
It is intended to be a comprehensive, precise description of Lean: a reference work in which Lean users can look up detailed information, rather than a tutorial intended for new users.
@@ -143,7 +150,17 @@ file := some "the-index"
143150

144151
{theIndex}
145152

153+
# この翻訳について
154+
155+
この翻訳は有志による **非公式** 翻訳です。翻訳に際して分かりやすさのために表現を大きく変えた箇所があります。また、用語の訳が一般的でない・誤りを含む可能性があります。必要に応じて原文 [Lean Language Reference](https://lean-lang.org/doc/reference/latest/)([GitHub](https://github.com/leanprover/reference-manual))をご覧ください。
156+
157+
原文にはライセンスが無かったため、原著者様より許諾をいただいて翻訳させていただいています。([Zulip Chat](https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/Discussion.20thread.20for.20Lean.20Language.20Reference/near/478724278))。
158+
159+
誤字脱字・内容の誤りの指摘・フォークからのPull Request・フォークによる翻訳の改変等歓迎いたします。ご指摘は [当該リポジトリ](https://github.com/lean-ja/reference-manual-ja) にてIssue・Pull Requestで受け付けております。
160+
161+
翻訳に際して、機械翻訳サービス [DeepL翻訳](https://www.deepl.com/ja/translator) を参考にしました。
146162

163+
この翻訳は原文のcommit [2fbf58d9210323e4ebc0a002d9f761074da462cf](https://github.com/leanprover/reference-manual/commit/2fbf58d9210323e4ebc0a002d9f761074da462cf) に基づいています。
147164

148165
::::::draft
149166

README.md

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,69 @@
1-
# Lean Language Reference
1+
# Lean Language Reference 日本語訳
22

3-
The Lean Language Reference is intended as a comprehensive, precise description of Lean. It is first and foremost a reference work in which Lean users can look up detailed information, rather than a tutorial for new users.
3+
* [原文](https://lean-lang.org/doc/reference/latest/)
4+
* [原文のソースコード](https://github.com/leanprover/reference-manual)
5+
* [対訳表](/GLOSSARY.md)
46

5-
This new reference has been rebuilt from the ground up in Verso. This means that all example code is type checked, the source code contains tests to ensure that it stays up-to-date with respect to changes in Lean, and we can add any features that we need to improve the documentation. Verso also makes it easy to integrate tightly with Lean, so we can show function docstrings directly, mechanically check descriptions of syntax against the actual parser, and insert cross-references automatically.
7+
## 翻訳する際のルール
68

9+
### 方針
710

8-
## Reading the Manual
11+
* なるべく直訳を心がける。
12+
* 読みやすさの観点から以下は直訳から変えて良い。
13+
* 文構造の変更
14+
* 原文で1文だったところを2文に分ける
15+
* 文の前半と後半を入れ替える
16+
* 代名詞の明確化
17+
* `it``that`等で記述されている中で読んだときにわかりづらそうな箇所
18+
* 助動詞のニュアンスの変更
19+
* `can`で書かれている文章で「~ができます」などの訳し方が日本語的に自然でない場合等
20+
* 受動態⇔能動態
21+
* 特に無生物主語だったり、主語がyouの場合など
22+
* 和訳箇所の前後や文脈に無い情報は基本的に入れない。
23+
* 訳注は以下の場合に記載する。
24+
* 最新情報に対する記述が古くなっている場合
25+
* 記述が間違っている場合
26+
* 文意を把握するにあたって記述および情報が足りていない場合
927

10-
The latest release of this reference manual can be read [here](https://lean-lang.org/doc/reference/latest/).
28+
### 表記ルール
1129

12-
For developers:
13-
* The output of building the current state of the `main` branch can be read [here](https://lean-reference-manual-review.netlify.app/).
14-
* Each pull request in this repository causes two separate previews to be generated, one with extra information that's only useful to those actively working on the text, such as TODO notes and symbol coverage progress bars. These are posted by a bot to the PR after the first successful build.
30+
* 文体は常に敬体(です・ます調)とする。
31+
* 英文をコメントアウトして、その直下に和訳を書く。
32+
* 和訳文を改行すると、その位置に空白が入ってしまうので段落内で改行しない。
33+
* 句読点には `` `` を用いる。
34+
* 英数字には半角を用いる。
35+
* 記号の全角・半角は『[JTF日本語標準スタイルガイド(翻訳用)](https://www.jtf.jp/tips/styleguide)』の「3 記号の表記と用途」に準拠する。
36+
* 全角:`` `` `` `` `` `` `` `` `` `` `` `` ``
37+
* 半角:`/` `,`(数字の桁区切り)`.`(小数点)`-` `"` `` ` `` ` `(スペース)
38+
* 同格の語句の並列には中黒 `` を用いる。
39+
* カタカナ複合語の区切りには中黒を用いない。ただし、人名や熟語など、同格の語句の並列と誤解される可能性の低い箇所では中黒を用いてもよい。
40+
* 原文で `_` を用いて強調表示されている単語は、`**和訳単語**(元の英単語)`と訳す。ただし、専門用語ではない単語や、文が強調表示されている場合は、英語を併記しない。
41+
* 原文例:`This pattern is called _structural recursion_.`
42+
* 和訳例:`このパターンは**構造的再帰**(structural recursion)と呼ばれます。`
43+
* 3音以上のカタカナ語の末尾の長音記号「ー」は省く。
44+
* カタカナ語のままで違和感のない用語はカタカナ語のまま使う。
45+
* 原則として全角文字列とアルファベットまたはインラインコードとが隣接した場合は半角スペースを入れるが、見た目の字幅が小さな全角記号(```` を除く全ての全角記号)の前後では半角スペースを入れない。
46+
* 全角文字列と数字が隣接した場合も半角スペースを入れない。
1547

16-
## Building the Reference Manual Locally
48+
## 翻訳に貢献したい方へ
1749

18-
To build the manual, run the following command:
50+
* 競合を防ぐため、翻訳開始したとき、ファイルごとに draft PR を出してください。
51+
* 1つのPRに含める変更は少なめにしてください。
52+
53+
## ローカルでのビルド方法
54+
55+
1. TeX Live と Python をインストールする
56+
57+
2. 下記コマンドでビルドする
1958

2059
```
2160
lake exe generate-manual --depth 2
2261
```
2362

24-
Then run a local web server on its output:
63+
3. 下記コマンドでローカルでサーバを立てる
64+
2565
```
2666
python3 -m http.server 8880 --directory _out/html-multi &
2767
```
2868

29-
Then open <http://localhost:8880> in your browser.
30-
31-
## Contributing
32-
33-
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
34-
69+
4. ブラウザで <http://localhost:8880> にアクセスする

README.origin.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Lean Language Reference
2+
3+
The Lean Language Reference is intended as a comprehensive, precise description of Lean. It is first and foremost a reference work in which Lean users can look up detailed information, rather than a tutorial for new users.
4+
5+
This new reference has been rebuilt from the ground up in Verso. This means that all example code is type checked, the source code contains tests to ensure that it stays up-to-date with respect to changes in Lean, and we can add any features that we need to improve the documentation. Verso also makes it easy to integrate tightly with Lean, so we can show function docstrings directly, mechanically check descriptions of syntax against the actual parser, and insert cross-references automatically.
6+
7+
8+
## Reading the Manual
9+
10+
The latest release of this reference manual can be read [here](https://lean-lang.org/doc/reference/latest/).
11+
12+
For developers:
13+
* The output of building the current state of the `main` branch can be read [here](https://lean-reference-manual-review.netlify.app/).
14+
* Each pull request in this repository causes two separate previews to be generated, one with extra information that's only useful to those actively working on the text, such as TODO notes and symbol coverage progress bars. These are posted by a bot to the PR after the first successful build.
15+
16+
## Building the Reference Manual Locally
17+
18+
To build the manual, run the following command:
19+
20+
```
21+
lake exe generate-manual --depth 2
22+
```
23+
24+
Then run a local web server on its output:
25+
```
26+
python3 -m http.server 8880 --directory _out/html-multi &
27+
```
28+
29+
Then open <http://localhost:8880> in your browser.
30+
31+
## Contributing
32+
33+
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
34+

0 commit comments

Comments
 (0)