更簡潔的 reST 的 literal block 標記語法 #568
Closed
mattwang44
started this conversation in
General
Replies: 2 comments · 5 replies
-
原來還有這個寫法!我對於 rst 的認知真的太淺了 如果可以這樣寫的話我支持進行更改 我也想要自己實際測試看看能不能成功 |
Beta Was this translation helpful? Give feedback.
2 replies
-
這邊要更新到readme嗎 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR
當原文以
::
結尾時,希望譯文內用使用: ::
(全形冒號
x1+空格
x1+半形冒號
x2)就好。Background
README 中有一段敘述
::
的用法(如下圖):也就是說當我們看到原文以
::
結尾時,應該要像這樣翻譯:這樣的建議是完全正確的,因為 rst 會需要
::
來確定接續的段落不是一個 rst markup 的 block(像是 code block),但是這樣的多行寫法並不是很方便。根據 rst 文件,(英文)標示 literal block 有三種語法:
其中
::
若前面為 line break 或空格則不會被 render、但若作為一個段落的結尾則為 render 成單個 colon。所以在中文譯文當中,除了這種基於上述第一種的寫法(也就是 readme 建議的寫法)外
也可以基於上述第二種寫法寫成下面這樣
也就是說在 po file 中看到原文以
::
結尾時,只要像以下這樣翻譯,就能顯示全形冒號並且同時成功標記接下來的段落是一個 literal blockBeta Was this translation helpful? Give feedback.
All reactions