Skip to content

Commit 6cc1a3a

Browse files
gomazarashikimushun11013w36zj6
authored
docs/reference/model/link/の翻訳 (#119)
Co-authored-by: Shunsuke KIMURA <[email protected]> Co-authored-by: 3w36zj6 <[email protected]>
1 parent 99156da commit 6cc1a3a

File tree

1 file changed

+29
-29
lines changed
  • crates/typst-library/src/model

1 file changed

+29
-29
lines changed

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

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ use crate::introspection::Location;
1313
use crate::layout::Position;
1414
use crate::text::TextElem;
1515

16-
/// Links to a URL or a location in the document.
16+
/// URLや文書中の位置へのリンク。
1717
///
18-
/// By default, links do not look any different from normal text. However,
19-
/// you can easily apply a style of your choice with a show rule.
18+
/// デフォルトでは、リンクの外見は通常のテキストと変わりません。
19+
/// しかし、showルールを使うことで、簡単に任意のスタイルを適用できます。
2020
///
21-
/// # Example
21+
/// #
2222
/// ```example
2323
/// #show link: underline
2424
///
@@ -30,35 +30,35 @@ use crate::text::TextElem;
3030
/// ]
3131
/// ```
3232
///
33-
/// # Hyphenation
34-
/// If you enable hyphenation or justification, by default, it will not apply to
35-
/// links to prevent unwanted hyphenation in URLs. You can opt out of this
36-
/// default via `{show link: set text(hyphenate: true)}`.
33+
/// # ハイフネーション
34+
/// ハイフネーションや両端揃えを有効にしていても、意図しないURL中のハイフネーションを防ぐため、
35+
/// デフォルトではリンクには適用されません。
36+
/// これを無効化するには、`{show link: set text(hyphenate: true)}`を使用します。
3737
///
38-
/// # Syntax
39-
/// This function also has dedicated syntax: Text that starts with `http://` or
40-
/// `https://` is automatically turned into a link.
38+
/// # 構文
39+
/// この関数には専用の構文もあります。
40+
/// `http://`や`https://`で始まるテキストは、自動的にリンクに変換されます。
4141
#[elem(Show)]
4242
pub struct LinkElem {
43-
/// The destination the link points to.
43+
/// リンクの遷移先。
4444
///
45-
/// - To link to web pages, `dest` should be a valid URL string. If the URL
46-
/// is in the `mailto:` or `tel:` scheme and the `body` parameter is
47-
/// omitted, the email address or phone number will be the link's body,
48-
/// without the scheme.
45+
/// - Webページにリンクする場合、`dest`は有効なURL文字列である必要があります。
46+
/// `mailto:``tel:`のURLスキームを含むURLが指定され、
47+
/// かつ`body`パラメーターが省略された場合、
48+
/// URLスキームを除いたメールアドレスまたは電話番号がリンクの本文になります。
4949
///
50-
/// - To link to another part of the document, `dest` can take one of three
51-
/// forms:
52-
/// - A [label] attached to an element. If you also want automatic text
53-
/// for the link based on the element, consider using a
54-
/// [reference]($ref) instead.
50+
/// - 文書中の別の部分にリンクする場合、
51+
/// `dest`には次の3つのうちいずれかの形式を用いることができます。
52+
/// - 要素に付与された[label]
53+
/// 要素に基づいて自動的にリンクの本文を生成したい場合は、
54+
/// [reference]($ref)の使用を検討してください。
5555
///
56-
/// - A [`location`] (typically retrieved from [`here`], [`locate`] or
57-
/// [`query`]).
56+
/// - [`location`](通常は[`here`][`locate`]
57+
/// [`query`]から取得される)。
5858
///
59-
/// - A dictionary with a `page` key of type [integer]($int) and `x` and
60-
/// `y` coordinates of type [length]. Pages are counted from one, and
61-
/// the coordinates are relative to the page's top left corner.
59+
/// - [integer]($int)型の`page`キーと[length]型の`x`座標、`y`座標を持つ辞書。
60+
/// ページ番号は1から始まり、
61+
/// 座標はページの左上隅からの相対位置です。
6262
///
6363
/// ```example
6464
/// = Introduction <intro>
@@ -75,10 +75,10 @@ pub struct LinkElem {
7575
)]
7676
pub dest: LinkTarget,
7777

78-
/// The content that should become a link.
78+
/// リンクとして表示する内容。
7979
///
80-
/// If `dest` is an URL string, the parameter can be omitted. In this case,
81-
/// the URL will be shown as the link.
80+
/// `dest`がURL文字列の場合、このパラメーターは省略可能です。
81+
/// この場合、URLがリンクとして表示されます。
8282
#[required]
8383
#[parse(match &dest {
8484
LinkTarget::Dest(Destination::Url(url)) => match args.eat()? {

0 commit comments

Comments
 (0)