Skip to content

Commit d416c2f

Browse files
ultimatile3w36zj6
andauthored
/docs/reference/text/highlightの翻訳 (#257)
Co-authored-by: 3w36zj6 <[email protected]>
1 parent 7574288 commit d416c2f

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

crates/typst-library/src/text/deco.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ impl Show for Packed<StrikeElem> {
262262
}
263263
}
264264

265-
/// Highlights text with a background color.
265+
/// 背景色によるテキストハイライト。
266266
///
267-
/// # Example
267+
/// #
268268
/// ```example
269269
/// This is #highlight[important].
270270
/// ```
271271
#[elem(Show)]
272272
pub struct HighlightElem {
273-
/// The color to highlight the text with.
273+
/// テキストをハイライトする色。
274274
///
275275
/// ```example
276276
/// This is #highlight(
@@ -280,8 +280,8 @@ pub struct HighlightElem {
280280
#[default(Some(Color::from_u8(0xFF, 0xFD, 0x11, 0xA1).into()))]
281281
pub fill: Option<Paint>,
282282

283-
/// The highlight's border color. See the
284-
/// [rectangle's documentation]($rect.stroke) for more details.
283+
/// ハイライトの枠線の色。
284+
/// 詳細は[rectangleのドキュメント]($rect.stroke)を参照してください。
285285
///
286286
/// ```example
287287
/// This is a #highlight(
@@ -292,7 +292,7 @@ pub struct HighlightElem {
292292
#[fold]
293293
pub stroke: Sides<Option<Option<Stroke>>>,
294294

295-
/// The top end of the background rectangle.
295+
/// 背景の長方形の上端。
296296
///
297297
/// ```example
298298
/// #set highlight(top-edge: "ascender")
@@ -304,7 +304,7 @@ pub struct HighlightElem {
304304
#[default(TopEdge::Metric(TopEdgeMetric::Ascender))]
305305
pub top_edge: TopEdge,
306306

307-
/// The bottom end of the background rectangle.
307+
/// 背景の長方形の下端。
308308
///
309309
/// ```example
310310
/// #set highlight(bottom-edge: "descender")
@@ -316,17 +316,16 @@ pub struct HighlightElem {
316316
#[default(BottomEdge::Metric(BottomEdgeMetric::Descender))]
317317
pub bottom_edge: BottomEdge,
318318

319-
/// The amount by which to extend the background to the sides beyond
320-
/// (or within if negative) the content.
319+
/// コンテンツの外側に(負の値のときは内側に)背景を左右に拡張する量。
321320
///
322321
/// ```example
323322
/// A long #highlight(extent: 4pt)[background].
324323
/// ```
325324
#[resolve]
326325
pub extent: Length,
327326

328-
/// How much to round the highlight's corners. See the
329-
/// [rectangle's documentation]($rect.radius) for more details.
327+
/// 背景の角を丸める量。
328+
/// 詳細は[rectangleのドキュメント]($rect.radius)を参照してください。
330329
///
331330
/// ```example
332331
/// Listen #highlight(
@@ -337,7 +336,7 @@ pub struct HighlightElem {
337336
#[fold]
338337
pub radius: Corners<Option<Rel<Length>>>,
339338

340-
/// The content that should be highlighted.
339+
/// ハイライトされるべきコンテンツ。
341340
#[required]
342341
pub body: Content,
343342
}

crates/typst-library/src/text/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,15 +1014,15 @@ cast! {
10141014
/// Metrics that describe the top edge of text.
10151015
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Cast)]
10161016
pub enum TopEdgeMetric {
1017-
/// The font's ascender, which typically exceeds the height of all glyphs.
1017+
/// フォントアセンダー。通常、これは全ての字形の高さを超えます。
10181018
Ascender,
1019-
/// The approximate height of uppercase letters.
1019+
/// 大文字の高さの近似値。
10201020
CapHeight,
1021-
/// The approximate height of non-ascending lowercase letters.
1021+
/// アセンダーを持たない小文字の高さの近似値。
10221022
XHeight,
1023-
/// The baseline on which the letters rest.
1023+
/// 文字が置かれるベースライン。
10241024
Baseline,
1025-
/// The top edge of the glyph's bounding box.
1025+
/// 字形が持つバウンディングボックスの上端。
10261026
Bounds,
10271027
}
10281028

@@ -1062,11 +1062,11 @@ cast! {
10621062
/// Metrics that describe the bottom edge of text.
10631063
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Cast)]
10641064
pub enum BottomEdgeMetric {
1065-
/// The baseline on which the letters rest.
1065+
/// 文字が置かれるベースライン。
10661066
Baseline,
1067-
/// The font's descender, which typically exceeds the depth of all glyphs.
1067+
/// フォントディセンダー。通常、これは全ての字形の深さを超えます。
10681068
Descender,
1069-
/// The bottom edge of the glyph's bounding box.
1069+
/// 字形が持つバウンディングボックスの下端。
10701070
Bounds,
10711071
}
10721072

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"/docs/reference/model/table/": "untranslated",
6464
"/docs/reference/model/terms/": "untranslated",
6565
"/docs/reference/text/": "untranslated",
66-
"/docs/reference/text/highlight/": "untranslated",
66+
"/docs/reference/text/highlight/": "translated",
6767
"/docs/reference/text/linebreak/": "translated",
6868
"/docs/reference/text/lorem/": "untranslated",
6969
"/docs/reference/text/lower/": "untranslated",

0 commit comments

Comments
 (0)