Skip to content

Commit

Permalink
Merge pull request #7 from summer-breeze123/main
Browse files Browse the repository at this point in the history
第一次更新公告&Text部分翻译
  • Loading branch information
OrangeX4 committed Sep 10, 2023
2 parents f9ca2e8 + ea4e582 commit 9996d7e
Show file tree
Hide file tree
Showing 31 changed files with 3,728 additions and 3,718 deletions.
138 changes: 69 additions & 69 deletions docs/i18n/text/emph-en.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
route: /docs/reference/text/emph/
title: Emphasis
description: Documentation for the `emph` function.
part: null
outline:
- id: summary
name: Summary
children: []
- id: example
name: Example
children: []
- id: syntax
name: Syntax
children: []
- id: parameters
name: Parameters
children:
- id: parameters-body
name: body
children: []
body:
kind: func
content:
path:
- emph
display: Emphasis
keywords: null
oneliner: Emphasizes content by setting it in italics.
element: true
details: |-
<p>Emphasizes content by setting it in italics.</p>
<ul>
<li>If the current <a href="/docs/reference/text/text/#parameters-style">text style</a> is <code><span class="typ-str">&quot;normal&quot;</span></code>,
this turns it into <code><span class="typ-str">&quot;italic&quot;</span></code>.</li>
<li>If it is already <code><span class="typ-str">&quot;italic&quot;</span></code> or <code><span class="typ-str">&quot;oblique&quot;</span></code>,
it turns it back to <code><span class="typ-str">&quot;normal&quot;</span></code>.</li>
</ul>
<h2 id="example">Example</h2>
<div class="previewed-code"><pre><code>This is <span class="typ-emph">_emphasized._</span> <span class="typ-escape">\</span>
This is <span class="typ-func">#</span><span class="typ-func">emph</span><span class="typ-punct">[</span>too.<span class="typ-punct">]</span>
<span class="typ-key">#</span><span class="typ-key">show</span> <span class="typ-func">emph</span><span class="typ-punct">:</span> it <span class="typ-op">=&gt;</span> <span class="typ-punct">{</span>
<span class="typ-func">text</span><span class="typ-punct">(</span>blue<span class="typ-punct">,</span> it<span class="typ-punct">.</span>body<span class="typ-punct">)</span>
<span class="typ-punct">}</span>
This is <span class="typ-emph">_emphasized_</span> differently.
</code></pre><div class="preview"><img src="/assets/docs/e994151e9b1baafdc57d2fb5046ee42b.png" alt="Preview" width="480" height="190"/></div></div>
<h2 id="syntax">Syntax</h2>
<p>This function also has dedicated syntax: To emphasize content, simply
enclose it in underscores (<code>_</code>). Note that this only works at word
boundaries. To emphasize part of a word, you have to use the function.</p>
params:
- name: body
details: <p>The content to emphasize.</p>
example: null
types:
- content
strings: []
default: null
positional: true
named: false
required: true
variadic: false
settable: false
returns:
- content
methods: []
scope: []
children: []
route: /docs/reference/text/emph/
title: Emphasis
description: Documentation for the `emph` function.
part: null
outline:
- id: summary
name: Summary
children: []
- id: example
name: Example
children: []
- id: syntax
name: Syntax
children: []
- id: parameters
name: Parameters
children:
- id: parameters-body
name: body
children: []
body:
kind: func
content:
path:
- emph
display: Emphasis
keywords: null
oneliner: Emphasizes content by setting it in italics.
element: true
details: |-
<p>Emphasizes content by setting it in italics.</p>
<ul>
<li>If the current <a href="/docs/reference/text/text/#parameters-style">text style</a> is <code><span class="typ-str">&quot;normal&quot;</span></code>,
this turns it into <code><span class="typ-str">&quot;italic&quot;</span></code>.</li>
<li>If it is already <code><span class="typ-str">&quot;italic&quot;</span></code> or <code><span class="typ-str">&quot;oblique&quot;</span></code>,
it turns it back to <code><span class="typ-str">&quot;normal&quot;</span></code>.</li>
</ul>
<h2 id="example">Example</h2>
<div class="previewed-code"><pre><code>This is <span class="typ-emph">_emphasized._</span> <span class="typ-escape">\</span>
This is <span class="typ-func">#</span><span class="typ-func">emph</span><span class="typ-punct">[</span>too.<span class="typ-punct">]</span>
<span class="typ-key">#</span><span class="typ-key">show</span> <span class="typ-func">emph</span><span class="typ-punct">:</span> it <span class="typ-op">=&gt;</span> <span class="typ-punct">{</span>
<span class="typ-func">text</span><span class="typ-punct">(</span>blue<span class="typ-punct">,</span> it<span class="typ-punct">.</span>body<span class="typ-punct">)</span>
<span class="typ-punct">}</span>
This is <span class="typ-emph">_emphasized_</span> differently.
</code></pre><div class="preview"><img src="/assets/docs/e994151e9b1baafdc57d2fb5046ee42b.png" alt="Preview" width="480" height="190"/></div></div>
<h2 id="syntax">Syntax</h2>
<p>This function also has dedicated syntax: To emphasize content, simply
enclose it in underscores (<code>_</code>). Note that this only works at word
boundaries. To emphasize part of a word, you have to use the function.</p>
params:
- name: body
details: <p>The content to emphasize.</p>
example: null
types:
- content
strings: []
default: null
positional: true
named: false
required: true
variadic: false
settable: false
returns:
- content
methods: []
scope: []
children: []
60 changes: 30 additions & 30 deletions docs/i18n/text/emph-zh.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
route: /docs/reference/text/emph/
title: Emphasis
title: 强调(斜体)
description: Documentation for the `emph` function.
part: null
outline:
- id: summary
name: Summary
children: []
- id: example
name: Example
children: []
- id: syntax
name: Syntax
children: []
- id: parameters
name: Parameters
children:
- id: parameters-body
name: body
- id: summary
name: Summary
children: []
- id: example
name: Example
children: []
- id: syntax
name: Syntax
children: []
- id: parameters
name: Parameters
children:
- id: parameters-body
name: body
children: []
body:
kind: func
content:
path:
- emph
- emph
display: Emphasis
keywords: null
oneliner: 用斜体来突出内容。
Expand All @@ -46,22 +46,22 @@ body:
This is <span class="typ-emph">_emphasized_</span> differently.
</code></pre><div class="preview"><img src="/assets/docs/e994151e9b1baafdc57d2fb5046ee42b.png" alt="Preview" width="480" height="190"/></div></div>
<h2 id="syntax">Syntax</h2>
<p>这个功能还有特定的语法:要强调内容,只需用下划线 (_) 将其括起来。请注意,这仅在词边界起作用。要强调单词的一部分,你必须使用这个函数,例如"#emph[eng]lish",而"_eng_lish"会报错。</p>
<p>这个功能还有特定的语法:要强调内容,只需用下划线 (_) 将其括起来。请注意,这仅在词边界起作用。要强调单词的一部分,必须使用这个函数,例如"#emph[eng]lish",而"_eng_lish"会报错。</p>
params:
- name: body
details: <p>要强调的内容。</p>
example: null
types:
- content
strings: []
default: null
positional: true
named: false
required: true
variadic: false
settable: false
- name: body
details: <p>要强调的内容。</p>
example: null
types:
- content
strings: []
default: null
positional: true
named: false
required: true
variadic: false
settable: false
returns:
- content
- content
methods: []
scope: []
children: []
142 changes: 71 additions & 71 deletions docs/i18n/text/linebreak-en.yaml
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
route: /docs/reference/text/linebreak/
title: Line Break
description: Documentation for the `linebreak` function.
part: null
outline:
- id: summary
name: Summary
children: []
- id: example
name: Example
children: []
- id: syntax
name: Syntax
children: []
- id: parameters
name: Parameters
children:
- id: parameters-justify
name: justify
children: []
body:
kind: func
content:
path:
- linebreak
display: Line Break
keywords: null
oneliner: Inserts a line break.
element: true
details: |-
<p>Inserts a line break.</p>
<p>Advances the paragraph to the next line. A single trailing line break at the
end of a paragraph is ignored, but more than one creates additional empty
lines.</p>
<h2 id="example">Example</h2>
<div class="previewed-code"><pre><code><span class="typ-strong">*Date:*</span> 26.12.2022 <span class="typ-escape">\</span>
<span class="typ-strong">*Topic:*</span> Infrastructure Test <span class="typ-escape">\</span>
<span class="typ-strong">*Severity:*</span> High <span class="typ-escape">\</span>
</code></pre><div class="preview"><img src="/assets/docs/2df1c0e733c1628030900158678b67c9.png" alt="Preview" width="480" height="190"/></div></div>
<h2 id="syntax">Syntax</h2>
<p>This function also has dedicated syntax: To insert a line break, simply write
a backslash followed by whitespace. This always creates an unjustified
break.</p>
params:
- name: justify
details: |-
<p>Whether to justify the line before the break.</p>
<p>This is useful if you found a better line break opportunity in your
justified text than Typst did.</p>
example: |-
<div class="previewed-code"><pre><code><span class="typ-key">#</span><span class="typ-key">set</span> <span class="typ-func">par</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span>
<span class="typ-key">#</span><span class="typ-key">let</span> jb <span class="typ-op">=</span> <span class="typ-func">linebreak</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span>
I have manually tuned the <span class="typ-pol">#</span><span class="typ-pol">jb</span>
line breaks in this paragraph <span class="typ-pol">#</span><span class="typ-pol">jb</span>
for an <span class="typ-emph">_interesting_</span> result. <span class="typ-pol">#</span><span class="typ-pol">jb</span>
</code></pre><div class="preview"><img src="/assets/docs/71d5dafb28147bb22ac8ddaa28f4f93a.png" alt="Preview" width="480" height="190"/></div></div>
types:
- boolean
strings: []
default: <code><span class="typ-key">false</span></code>
positional: false
named: true
required: false
variadic: false
settable: true
returns:
- content
methods: []
scope: []
children: []
route: /docs/reference/text/linebreak/
title: Line Break
description: Documentation for the `linebreak` function.
part: null
outline:
- id: summary
name: Summary
children: []
- id: example
name: Example
children: []
- id: syntax
name: Syntax
children: []
- id: parameters
name: Parameters
children:
- id: parameters-justify
name: justify
children: []
body:
kind: func
content:
path:
- linebreak
display: Line Break
keywords: null
oneliner: Inserts a line break.
element: true
details: |-
<p>Inserts a line break.</p>
<p>Advances the paragraph to the next line. A single trailing line break at the
end of a paragraph is ignored, but more than one creates additional empty
lines.</p>
<h2 id="example">Example</h2>
<div class="previewed-code"><pre><code><span class="typ-strong">*Date:*</span> 26.12.2022 <span class="typ-escape">\</span>
<span class="typ-strong">*Topic:*</span> Infrastructure Test <span class="typ-escape">\</span>
<span class="typ-strong">*Severity:*</span> High <span class="typ-escape">\</span>
</code></pre><div class="preview"><img src="/assets/docs/2df1c0e733c1628030900158678b67c9.png" alt="Preview" width="480" height="190"/></div></div>
<h2 id="syntax">Syntax</h2>
<p>This function also has dedicated syntax: To insert a line break, simply write
a backslash followed by whitespace. This always creates an unjustified
break.</p>
params:
- name: justify
details: |-
<p>Whether to justify the line before the break.</p>
<p>This is useful if you found a better line break opportunity in your
justified text than Typst did.</p>
example: |-
<div class="previewed-code"><pre><code><span class="typ-key">#</span><span class="typ-key">set</span> <span class="typ-func">par</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span>
<span class="typ-key">#</span><span class="typ-key">let</span> jb <span class="typ-op">=</span> <span class="typ-func">linebreak</span><span class="typ-punct">(</span>justify<span class="typ-punct">:</span> <span class="typ-key">true</span><span class="typ-punct">)</span>
I have manually tuned the <span class="typ-pol">#</span><span class="typ-pol">jb</span>
line breaks in this paragraph <span class="typ-pol">#</span><span class="typ-pol">jb</span>
for an <span class="typ-emph">_interesting_</span> result. <span class="typ-pol">#</span><span class="typ-pol">jb</span>
</code></pre><div class="preview"><img src="/assets/docs/71d5dafb28147bb22ac8ddaa28f4f93a.png" alt="Preview" width="480" height="190"/></div></div>
types:
- boolean
strings: []
default: <code><span class="typ-key">false</span></code>
positional: false
named: true
required: false
variadic: false
settable: true
returns:
- content
methods: []
scope: []
children: []
Loading

0 comments on commit 9996d7e

Please sign in to comment.