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

Commit 87937d2

Browse files
committed
翻訳準備 (#1)
* 翻訳準備 * CIスクリプト修正
1 parent ade9c55 commit 87937d2

File tree

6 files changed

+140
-138
lines changed

6 files changed

+140
-138
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@ 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 deploy sites
1418

1519
jobs:
1620
build:
1721
name: Build site and generate HTML
1822
runs-on: ubuntu-latest
19-
outputs:
20-
ref-url: ${{ steps.deploy.outputs.deploy-url }}
2123

2224
steps:
2325
- name: Install deps for figures (OS packages)
@@ -129,100 +131,24 @@ jobs:
129131
fail: true
130132
args: --base './_out/html-multi/' --no-progress --offline './_out/html-multi/**/*.html'
131133

132-
# deploy-alias computes a URL component for the PR preview. This
133-
# is so we can have a stable name to use for feedback on draft
134-
# material.
135-
- id: deploy-alias
136-
uses: actions/github-script@v7
137-
name: Compute Alias
138-
with:
139-
script: |
140-
if (process.env.PR) {
141-
return `pr-${process.env.PR}`
142-
} else {
143-
return 'deploy-preview-main';
144-
}
145-
env:
146-
PR: ${{ github.event.number }}
147-
148-
# deploy-info computes metadata that's shown in the Netlify interface
149-
# about the deployment (for non-PR deploys)
150-
- id: deploy-info
151-
name: Compute Deployment Metadata
152-
if: github.event_name != 'pull_request'
153-
run: |
154-
set -e
155-
echo "message=$(git log -1 --pretty=format:"%s")" >> "$GITHUB_OUTPUT"
156-
157-
# When a release is created in GH, push to the main site without proofreading info
158-
- name: Deploy releases when tags are pushed
159-
id: deploy-release
160-
uses: nwtgck/actions-netlify@v2.0
161-
if: github.event_name == 'release'
134+
- name: Upload artifact
135+
uses: actions/upload-pages-artifact@v3
162136
with:
163-
publish-dir: _out/html-multi
164-
production-branch: main
165-
production-deploy: true
166-
github-token: ${{ secrets.GITHUB_TOKEN }}
167-
deploy-message: |
168-
Release from tag ${{ github.ref }}
169-
enable-commit-comment: false
170-
enable-pull-request-comment: false
171-
fails-without-credentials: true
172-
env:
173-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
174-
NETLIFY_SITE_ID: "447031bf-9a96-4cee-831b-1f73599a7cb2"
175-
176-
# When pushing to `main` or a PR branch, deploy what it would look like if this were released
177-
- name: Deploy current draft
178-
id: deploy-draft
179-
uses: nwtgck/actions-netlify@v2.0
180-
if: github.event_name == 'push' || github.event_name == 'pull_request'
181-
with:
182-
publish-dir: _out/html-multi
183-
production-branch: main
184-
production-deploy: true
185-
github-token: ${{ secrets.GITHUB_TOKEN }}
186-
deploy-message: |
187-
${{ github.event_name == 'pull_request' && format('pr#{0}: {1}', github.event.number, github.event.pull_request.title) || format('ref/{0}: {1}', github.ref_name, steps.deploy-info.outputs.message) }}
188-
alias: ${{ steps.deploy-alias.outputs.result }}
189-
enable-commit-comment: false
190-
enable-pull-request-comment: false
191-
github-deployment-environment: |
192-
${{ github.event_name == 'pull_request' && format('lean-ref-pr-#{0}', github.event.number) || 'lean-ref' }}
193-
github-deployment-description: |
194-
Draft without proofreading info
195-
fails-without-credentials: true
196-
env:
197-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
198-
NETLIFY_SITE_ID: "32e0f63e-7a18-4bf9-87f4-713650c7db70"
199-
200-
# When pushing to `main` or a PR branch, deploy it with proofreading info as well
201-
- name: Deploy with proofreading info (draft mode, for PRs)
202-
id: deploy-draft-proofreading
203-
uses: nwtgck/actions-netlify@v2.0
204-
if:
205-
github.event_name == 'pull_request'
206-
with:
207-
publish-dir: _out/draft/html-multi
208-
production-branch: main
209-
production-deploy: false
210-
github-token: ${{ secrets.GITHUB_TOKEN }}
211-
deploy-message: |
212-
${{ github.event_name == 'pull_request' && format('pr#{0} proofreading: {1}', github.event.number, github.event.pull_request.title) }}
213-
alias: draft-${{ steps.deploy-alias.outputs.result }}
214-
enable-commit-comment: false
215-
enable-pull-request-comment: false
216-
github-deployment-environment: |
217-
${{ github.event_name == 'pull_request' && format('lean-ref-pr-draft-#{0}', github.event.number) }}
218-
github-deployment-description: |
219-
Draft with proofreading info
220-
fails-without-credentials: true
221-
env:
222-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
223-
NETLIFY_SITE_ID: "32e0f63e-7a18-4bf9-87f4-713650c7db70"
224-
225-
137+
path: _out/html-multi
138+
139+
# Deployment job
140+
deploy:
141+
if: github.ref == 'refs/heads/main'
142+
environment:
143+
name: github-pages
144+
url: ${{ steps.deployment.outputs.page_url }}
145+
runs-on: ubuntu-latest
146+
needs: build
147+
steps:
148+
- name: Deploy to GitHub Pages
149+
id: deployment
150+
uses: actions/deploy-pages@v4
151+
226152

227153
check-links:
228154
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
@@ -18,11 +18,18 @@ open Verso.Genre Manual
1818

1919
set_option pp.rawOnError true
2020

21+
/-
2122
#doc (Manual) "The Lean Language Reference" =>
23+
-/
24+
#doc (Manual) "The Lean Language Reference 日本語訳" =>
2225
%%%
2326
tag := "lean-language-reference"
2427
%%%
2528

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

2734
This is the _Lean Language Reference_, an in-progress reference work on Lean.
2835
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 for new users.
@@ -147,7 +154,17 @@ file := some "the-index"
147154

148155
{theIndex}
149156

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

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

152169
::::::draft
153170

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)