Skip to content

Commit 9de376f

Browse files
authored
fix: ソースコードがtypst-libraryへ移動したことへの対応 (#121)
Signed-off-by: Shunsuke Kimura <[email protected]>
1 parent 2813590 commit 9de376f

File tree

21 files changed

+147
-4784
lines changed

21 files changed

+147
-4784
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Typst日本語ドキュメント翻訳プロジェクトにご興味をお持ち
1818
1919
1. このGitHubリポジトリをフォークします。
2020
2. ドキュメントの実体は、主にMarkdownファイルおよびコンパイラのソースコード内のコメントの2種類から構成されています。それぞれ、下記の注意書きに従って翻訳作業をお願いします。
21-
1. `./crates/typst/src/`内の`.rs`ファイル群は、Typstのコンパイラのソースコードです。ソースコード内に含まれている、**既存のコメントを直接書き換えて翻訳してください**
22-
- 例1:[Reference > Foundations](https://typst.app/docs/reference/foundations/)を翻訳する際は、`./crates/typst/src/foundations/mod.rs`のコメントを編集してください。
23-
- 例2:[Reference > Foundations > Arguments](https://typst.app/docs/reference/foundations/arguments/)を翻訳する際は、`./crates/typst/src/foundations/args.rs`のコメントを編集してください。
21+
1. `./crates/typst-library/src/`内の`.rs`ファイル群は、Typstのコンパイラのソースコードです。ソースコード内に含まれている、**既存のコメントを直接書き換えて翻訳してください**
22+
- 例1:[Reference > Foundations](https://typst.app/docs/reference/foundations/)を翻訳する際は、`./crates/typst-library/src/foundations/mod.rs`のコメントを編集してください。
23+
- 例2:[Reference > Foundations > Arguments](https://typst.app/docs/reference/foundations/arguments/)を翻訳する際は、`./crates/typst-library/src/foundations/args.rs`のコメントを編集してください。
2424
2. `./docs`内のMarkdownファイル群は、Typstのチュートリアルや入門ガイドなど、言語リファレンス以外のページの本体です。**既存のMarkdownファイルを直接書き換えて翻訳してください**
2525
3. 翻訳の際の文体や表記は[翻訳ガイドライン](./TRANSLATING_GUIDELINES.md)を参照してください。ドキュメントの最新バージョンへの追従は管理者が一括で行っているため、日本語ドキュメントと公式ドキュメントのバージョンが異なる場合でも、日本語ドキュメントで管理されている原文を優先してください。
2626
4. 翻訳作業の途中でも、Draft Pull Requestを作成して、翻訳の進捗状況を共有することができます。

crates/typst-library/src/model/bibliography.rs

Lines changed: 34 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,33 @@ use crate::text::{
4343
};
4444
use crate::World;
4545

46-
/// A bibliography / reference listing.
46+
/// 参考文献 / 引用文献リスト。
4747
///
48-
/// You can create a new bibliography by calling this function with a path
49-
/// to a bibliography file in either one of two formats:
48+
/// 次の2つの形式のどちらかの参考文献ファイルへのパスを指定してこの関数を呼び出すと、新しい引用文献リストを作成できます。
5049
///
51-
/// - A Hayagriva `.yml` file. Hayagriva is a new bibliography file format
52-
/// designed for use with Typst. Visit its
53-
/// [documentation](https://github.com/typst/hayagriva/blob/main/docs/file-format.md)
54-
/// for more details.
55-
/// - A BibLaTeX `.bib` file.
50+
/// - Hayagriva `.yml` ファイル。
51+
/// HayagrivaはTypstで使用するためにデザインされた新しい書誌ファイルフォーマットです。
52+
/// 詳しくは[ドキュメント](https://github.com/typst/hayagriva/blob/main/docs/file-format.md)をご覧ください。
53+
/// - BibLaTeX `.bib` ファイル。
5654
///
57-
/// As soon as you add a bibliography somewhere in your document, you can start
58-
/// citing things with reference syntax (`[@key]`) or explicit calls to the
59-
/// [citation]($cite) function (`[#cite(<key>)]`). The bibliography will only
60-
/// show entries for works that were referenced in the document.
55+
/// 文書内に参考文献を追加すると、参照構文(`[@key]`)や引用関数の明示的な呼び出し(`[#cite(<key>)]`)を使って[引用]($cite)を始めることができます。
56+
/// 参考文献リストには、文書内で参照された作品の文献だけが表示されます。
6157
///
62-
/// # Styles
63-
/// Typst offers a wide selection of built-in
64-
/// [citation and bibliography styles]($bibliography.style). Beyond those, you
65-
/// can add and use custom [CSL](https://citationstyles.org/) (Citation Style
66-
/// Language) files. Wondering which style to use? Here are some good defaults
67-
/// based on what discipline you're working in:
58+
/// # スタイル
59+
/// Typstは、内蔵の[引用と文献スタイル]($bibliography.style)を幅広く取り揃えています。
60+
/// さらに、独自の[CSL](https://citationstyles.org/)(Citation Style Language)ファイルを追加して使用することもできます。
61+
/// どのスタイルを使えばいいか迷う方のために、分野ごとによく使われるスタイルを以下の表にまとめています。
6862
///
69-
/// | Fields | Typical Styles |
63+
/// | 分野 | Typical Styles |
7064
/// |-----------------|--------------------------------------------------------|
71-
/// | Engineering, IT | `{"ieee"}` |
72-
/// | Psychology, Life Sciences | `{"apa"}` |
73-
/// | Social sciences | `{"chicago-author-date"}` |
74-
/// | Humanities | `{"mla"}`, `{"chicago-notes"}`, `{"harvard-cite-them-right"}` |
75-
/// | Economics | `{"harvard-cite-them-right"}` |
76-
/// | Physics | `{"american-physics-society"}` |
65+
/// | 工学、IT | `{"ieee"}` |
66+
/// | 心理学、ライフサイエンス | `{"apa"}` |
67+
/// | 社会科学 | `{"chicago-author-date"}` |
68+
/// | 人文学 | `{"mla"}`, `{"chicago-notes"}`, `{"harvard-cite-them-right"}` |
69+
/// | 経済学 | `{"harvard-cite-them-right"}` |
70+
/// | 物理学 | `{"american-physics-society"}` |
7771
///
78-
/// # Example
72+
/// #
7973
/// ```example
8074
/// This was already noted by
8175
/// pirates long ago. @arrgh
@@ -102,35 +96,30 @@ pub struct BibliographyElem {
10296
)]
10397
pub sources: Derived<OneOrMultiple<DataSource>, Bibliography>,
10498

105-
/// The title of the bibliography.
99+
/// 参考文献のタイトル。
106100
///
107-
/// - When set to `{auto}`, an appropriate title for the
108-
/// [text language]($text.lang) will be used. This is the default.
109-
/// - When set to `{none}`, the bibliography will not have a title.
110-
/// - A custom title can be set by passing content.
101+
/// - `{auto}`に設定すると、[テキストの言語]($text.lang)に適したタイトルが表示されます。これがデフォルトです。
102+
/// - `{none}`に設定すると、参考文献のタイトルは何も表示されません。
103+
/// - 独自のタイトルはコンテンツで渡します。
111104
///
112-
/// The bibliography's heading will not be numbered by default, but you can
113-
/// force it to be with a show-set rule:
105+
/// 参考文献の見出しはデフォルトでは番号が振られませんが、show-setルールで強制的に見出し番号をつけることも可能です。
114106
/// `{show bibliography: set heading(numbering: "1.")}`
115107
pub title: Smart<Option<Content>>,
116108

117-
/// Whether to include all works from the given bibliography files, even
118-
/// those that weren't cited in the document.
109+
/// 文書内で引用されていないものも含めて、参考文献ファイルにあるすべての文献を出力するかどうか。
119110
///
120-
/// To selectively add individual cited works without showing them, you can
121-
/// also use the `cite` function with [`form`]($cite.form) set to `{none}`.
111+
/// 個々の引用文献を表示させずに追加するには、 [`form`]($cite.form) を `{none}`として [`cite`]($cite) 関数を使用します。
122112
#[default(false)]
123113
pub full: bool,
124114

125-
/// The bibliography style.
115+
/// 参考文献スタイル。
126116
///
127-
/// This can be:
128-
/// - A string with the name of one of the built-in styles (see below). Some
129-
/// of the styles listed below appear twice, once with their full name and
130-
/// once with a short alias.
131-
/// - A path string to a [CSL file](https://citationstyles.org/). For more
132-
/// details about paths, see the [Paths section]($syntax/#paths).
133-
/// - Raw bytes from which a CSL style should be decoded.
117+
/// 以下のいずれかの方法で指定します。
118+
/// - 組み込みスタイル(下記参照)のいずれかの名前を持つ文字列。
119+
/// 以下に挙げるスタイルのいくつかは、フルネームと短いエイリアスの2回表示されています。
120+
/// - [CSL ファイル](https://citationstyles.org/)へのパスを示す文字列。
121+
/// パスに関する詳細は[Pathセクション]($syntax/#paths)を参照してください。
122+
/// - CSLスタイルがデコードされるべき生バイト。
134123
#[parse(match args.named::<Spanned<CslSource>>("style")? {
135124
Some(source) => Some(CslStyle::load(engine.world, source)?),
136125
None => None,

0 commit comments

Comments
 (0)