diff --git a/crates/typst-library/src/text/deco.rs b/crates/typst-library/src/text/deco.rs index 485d0edcf3..2f92b92641 100644 --- a/crates/typst-library/src/text/deco.rs +++ b/crates/typst-library/src/text/deco.rs @@ -262,15 +262,15 @@ impl Show for Packed { } } -/// Highlights text with a background color. +/// 背景色によるテキストハイライト。 /// -/// # Example +/// # 例 /// ```example /// This is #highlight[important]. /// ``` #[elem(Show)] pub struct HighlightElem { - /// The color to highlight the text with. + /// テキストをハイライトする色。 /// /// ```example /// This is #highlight( @@ -280,8 +280,8 @@ pub struct HighlightElem { #[default(Some(Color::from_u8(0xFF, 0xFD, 0x11, 0xA1).into()))] pub fill: Option, - /// The highlight's border color. See the - /// [rectangle's documentation]($rect.stroke) for more details. + /// ハイライトの枠線の色。 + /// 詳細は[rectangleのドキュメント]($rect.stroke)を参照してください。 /// /// ```example /// This is a #highlight( @@ -292,7 +292,7 @@ pub struct HighlightElem { #[fold] pub stroke: Sides>>, - /// The top end of the background rectangle. + /// 背景の長方形の上端。 /// /// ```example /// #set highlight(top-edge: "ascender") @@ -304,7 +304,7 @@ pub struct HighlightElem { #[default(TopEdge::Metric(TopEdgeMetric::Ascender))] pub top_edge: TopEdge, - /// The bottom end of the background rectangle. + /// 背景の長方形の下端。 /// /// ```example /// #set highlight(bottom-edge: "descender") @@ -316,8 +316,7 @@ pub struct HighlightElem { #[default(BottomEdge::Metric(BottomEdgeMetric::Descender))] pub bottom_edge: BottomEdge, - /// The amount by which to extend the background to the sides beyond - /// (or within if negative) the content. + /// コンテンツの外側に(負の値のときは内側に)背景を左右に拡張する量。 /// /// ```example /// A long #highlight(extent: 4pt)[background]. @@ -325,8 +324,8 @@ pub struct HighlightElem { #[resolve] pub extent: Length, - /// How much to round the highlight's corners. See the - /// [rectangle's documentation]($rect.radius) for more details. + /// 背景の角を丸める量。 + /// 詳細は[rectangleのドキュメント]($rect.radius)を参照してください。 /// /// ```example /// Listen #highlight( @@ -337,7 +336,7 @@ pub struct HighlightElem { #[fold] pub radius: Corners>>, - /// The content that should be highlighted. + /// ハイライトされるべきコンテンツ。 #[required] pub body: Content, } diff --git a/crates/typst-library/src/text/mod.rs b/crates/typst-library/src/text/mod.rs index 3aac15ba58..6b897c67d3 100644 --- a/crates/typst-library/src/text/mod.rs +++ b/crates/typst-library/src/text/mod.rs @@ -1014,15 +1014,15 @@ cast! { /// Metrics that describe the top edge of text. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Cast)] pub enum TopEdgeMetric { - /// The font's ascender, which typically exceeds the height of all glyphs. + /// フォントアセンダー。通常、これは全ての字形の高さを超えます。 Ascender, - /// The approximate height of uppercase letters. + /// 大文字の高さの近似値。 CapHeight, - /// The approximate height of non-ascending lowercase letters. + /// アセンダーを持たない小文字の高さの近似値。 XHeight, - /// The baseline on which the letters rest. + /// 文字が置かれるベースライン。 Baseline, - /// The top edge of the glyph's bounding box. + /// 字形が持つバウンディングボックスの上端。 Bounds, } @@ -1062,11 +1062,11 @@ cast! { /// Metrics that describe the bottom edge of text. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Cast)] pub enum BottomEdgeMetric { - /// The baseline on which the letters rest. + /// 文字が置かれるベースライン。 Baseline, - /// The font's descender, which typically exceeds the depth of all glyphs. + /// フォントディセンダー。通常、これは全ての字形の深さを超えます。 Descender, - /// The bottom edge of the glyph's bounding box. + /// 字形が持つバウンディングボックスの下端。 Bounds, } diff --git a/website/translation-status.json b/website/translation-status.json index 9c21954fed..d0cdf6afc7 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -63,7 +63,7 @@ "/docs/reference/model/table/": "untranslated", "/docs/reference/model/terms/": "untranslated", "/docs/reference/text/": "untranslated", - "/docs/reference/text/highlight/": "untranslated", + "/docs/reference/text/highlight/": "translated", "/docs/reference/text/linebreak/": "translated", "/docs/reference/text/lorem/": "untranslated", "/docs/reference/text/lower/": "untranslated",