pages/*, style-guide: update contents, fix Markdown (#10492)
* pages/*, style-guide: update pages, fix Markdown (commit 1) * Update pages * style-guide.de: update page * Apply suggestions from code review Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> * pip3: remove search command * rpm: update path placeholder Co-authored-by: pixel <pixel+github@chrissx.de> * Update pages/linux/pkgfile.md Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --------- Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: pixel <pixel+github@chrissx.de>
This commit is contained in:

committed by
GitHub

parent
587d8443d8
commit
2135714193
@@ -2,11 +2,11 @@
|
||||
|
||||
Diese Seite listet alle Regeln für `tldr`-Seiten auf.
|
||||
|
||||
## Layout
|
||||
## Layout
|
||||
|
||||
Eine Standard-`tldr`-Seite sollte dem folgenden Format entsprechen:
|
||||
|
||||
```
|
||||
```md
|
||||
# befehl
|
||||
|
||||
> Kurze Beschreibung.
|
||||
@@ -26,21 +26,21 @@
|
||||
Er wird automatisch bei jeder Pull Request ausgeführt,
|
||||
er kann aber auch manuell installiert werden, um seine Seiten schon vorher zu überprüfen:
|
||||
|
||||
```
|
||||
```sh
|
||||
npm install --global tldr-lint
|
||||
tldr-lint {{seite.md}}
|
||||
```
|
||||
```
|
||||
|
||||
Für andere Optionen von `tldr-lint`, wie zum Beispiel das Linten eines ganzen Verzeichnisses:
|
||||
[`tldr tldr-lint`](https://github.com/tldr-pages/tldr/blob/main/pages/common/tldr-lint.md). Alternativ, kann man auch den Alias `tldrl` verwenden.
|
||||
|
||||
Viele Clients unterstützen die `--render` Flag zum Anzeigen einer Seite:
|
||||
|
||||
```
|
||||
```sh
|
||||
tldr --render {{seite.md}}
|
||||
```
|
||||
```
|
||||
|
||||
## Token-Syntax
|
||||
## Token-Syntax
|
||||
|
||||
Eingaben der Nutzer\*innen sollten die `{{Token}}`-Syntax benutzen,
|
||||
damit `tldr`-Clients sie hervorheben können.
|
||||
@@ -77,15 +77,16 @@
|
||||
2. Dateiendungen, wie `.dll`.
|
||||
3. Befehle, wie `ls`.
|
||||
|
||||
## Serial Comma
|
||||
## Serial Comma
|
||||
|
||||
Benutze für eine Liste von 3 oder mehr Elementen ein [serial comma](https://en.wikipedia.org/wiki/Serial_comma), um Mehrdeutigkeiten zu verhindern.
|
||||
|
||||
> Delete the Git branches, tags and remotes.
|
||||
|
||||
Das obige Beispiel nutzt kein serial comma und ist somit mehrdeutig:
|
||||
* Lösche die Git Branches namens `tags` und `remotes`.
|
||||
* Lösche die Git Branches und die Git Tags und die Git Remotes.
|
||||
|
||||
- Lösche die Git Branches namens `tags` und `remotes`.
|
||||
- Lösche die Git Branches und die Git Tags und die Git Remotes.
|
||||
|
||||
Dies kann durch ein Komma vor "and" oder "or" gelöst werden.
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
## 레이아웃
|
||||
|
||||
각 페이지의 기본 포맷은 다음 템플릿과 일치해야 하며, 다음과 최대 8개의 명령어 예제를 포함해야 합니다:
|
||||
|
||||
```md
|
||||
# 명령어 이름
|
||||
|
||||
@@ -102,6 +103,7 @@ tldr --render path/to/tldr_page.md
|
||||
토큰을 선택할 때 다음의 가이드라인을 염두에 두십시오:
|
||||
|
||||
### Naming
|
||||
|
||||
- 짧지만 설명적인 토큰을 사용하세요.
|
||||
- 파일 및 디렉토리 경로에 대한 참조의 경우:
|
||||
`{{path/to/<placeholder>}}`의 포맷을 사용하세요.
|
||||
@@ -125,7 +127,7 @@ tldr --render path/to/tldr_page.md
|
||||
- 만약 명령어가 파일 시스템이나 장치에 돌이킬 수 없는 변경을 수행하는 경우, 모든 예제를 생각 없이 복사하여 붙여넣을 수 없도록 작성하십시오.
|
||||
예를 들어 `ddrescue --force --no-scrape /dev/sda /dev/sdb` 대신에 `ddrescue --force --no-scrape {{/dev/sdX}} {{/dev/sdY}}`를 사용하고, *block device*에 `/dev/sda1` 대신 `{{/dev/sdXY}}` 자리 표시자를 사용하세요.
|
||||
- 명령어가 많은 수의 명령어를 포함할 수 있는 경우, 다음과 같이 생략하여 표현하세요.
|
||||
`{{arg1 arg2 ...}}` 여러 옵션 중 하나가 가능한 경우 `{{either|or}}`로 작성합니다.
|
||||
`{{argument1 argument2 ...}}` 여러 옵션 중 하나가 가능한 경우 `{{either|or}}`로 작성합니다.
|
||||
|
||||
일반적으로, 토큰은 가능한 한 직관적이어야 합니다.
|
||||
명령을 사용하는 방법을 파악하고 값으로 채우십시오.
|
||||
@@ -150,8 +152,9 @@ tldr --render path/to/tldr_page.md
|
||||
> Git brances, tags, remotes를 삭제하세요.
|
||||
|
||||
위의 예는 직렬 쉼표를 사용하지 않으므로 다음 두 가지 중 하나를 의미할 수 있습니다.
|
||||
* `tags`와 `remotes`라는 Git branch들을 삭제하세요.
|
||||
* Git branches, Git tag, Git remotes를 모두 삭제하세요.
|
||||
|
||||
- `tags`와 `remotes`라는 Git branch들을 삭제하세요.
|
||||
- Git branches, Git tag, Git remotes를 모두 삭제하세요.
|
||||
|
||||
목록의 마지막 요소에서 "and" 또는 "or" 앞에 쉼표를 삽입하면 이 문제를 해결할 수 있습니다.
|
||||
|
||||
|
@@ -124,7 +124,7 @@ Keep the following guidelines in mind when choosing placeholders:
|
||||
- Use [`snake_case`](https://wikipedia.org/wiki/snake_case) for multi-word placeholders.
|
||||
- Use a generic placeholder rather than an actual value where a generic placeholder is available (but there is an exception to this listed below). For example, use
|
||||
`iostat {{1..infinity}}` rather than `iostat {{2}}`.
|
||||
- If there are several consecutive placeholders of the same type
|
||||
- If there are several consecutive placeholders of the same type
|
||||
which don't allow adding arbitrary text in them (ranges), then instead of generic placeholders use descriptive ones. For example prefer `input swipe {{x_position}} {{y_position}} {{x_position}} {{y_position}} {{seconds}}`
|
||||
instead of `input swipe {{-infinity..infinity}} {{-infinity..infinity}} {{-infinity..infinity}} {{-infinity..infinity}} {{1..infinity}}`.
|
||||
|
||||
@@ -195,8 +195,9 @@ since omitting it can create ambiguity.
|
||||
> Delete the Git branches, tags and remotes.
|
||||
|
||||
The example above does not use a serial comma, so this could mean one of two things:
|
||||
* Delete the Git branches named `tags` and `remotes`.
|
||||
* Delete all of the following: Git branches, Git tags, and Git remotes.
|
||||
|
||||
- Delete the Git branches named `tags` and `remotes`.
|
||||
- Delete all of the following: Git branches, Git tags, and Git remotes.
|
||||
|
||||
This can be resolved by inserting a comma before the "and" or "or" in the final element in the list.
|
||||
|
||||
@@ -206,7 +207,7 @@ This can be resolved by inserting a comma before the "and" or "or" in the final
|
||||
|
||||
On the `More information` line, prefer linking to the author's provided documentation.
|
||||
|
||||
When not available, use <https://manned.org> as the default fallback.
|
||||
When not available, use <https://manned.org> as the default fallback.
|
||||
|
||||
## Language-Specific Rules
|
||||
|
||||
@@ -217,19 +218,30 @@ When Chinese words, Latin words and Arabic numerals are written in the same sent
|
||||
The following guidelines are applied to Chinese (`zh`) and traditional Chinese (`zh_TW`) pages:
|
||||
|
||||
1. Place one space before/after English words and numbers.
|
||||
- For example, use `列出所有 docker 容器` rather than `列出所有docker容器`.
|
||||
- For example, use `宽度为 50 个字` rather than `宽度为50个字`.
|
||||
|
||||
- For example, use `列出所有 docker 容器` rather than `列出所有docker容器`.
|
||||
- For example, use `宽度为 50 个字` rather than `宽度为50个字`.
|
||||
|
||||
2. Place one space between numbers and units **except** degrees and percentages.
|
||||
- For example, use `容量 50 MB` rather than `容量 50MB`.
|
||||
- For instances of degree and percentage, use `50°C` and `50%` rather than `50 °C` and `50 %`.
|
||||
|
||||
- For example, use `容量 50 MB` rather than `容量 50MB`.
|
||||
- For instances of degree and percentage, use `50°C` and `50%` rather than `50 °C` and `50 %`.
|
||||
|
||||
3. No additional spaces before/after full-width punctuations.
|
||||
- For example, use `开启 shell,进入交互模式` rather than `开启 shell ,进入交互模式`
|
||||
|
||||
- For example, use `开启 shell,进入交互模式` rather than `开启 shell ,进入交互模式`
|
||||
|
||||
4. Use full-width punctuations except for long Latin clauses.
|
||||
- For example, use `嗨,你好。` rather than `嗨, 你好.`
|
||||
|
||||
- For example, use `嗨,你好。` rather than `嗨, 你好.`
|
||||
|
||||
5. Use a half-width punctuation to end a sentence when the last character is half-width.
|
||||
|
||||
- For example, use `将代码转化为 Python 3.` rather than `将代码转化为 Python 3。`
|
||||
|
||||
6. Use precise form for technical terms, and do not use unofficial Chinese abbreviations.
|
||||
- For example, use `Facebook` rather than `facebook`, `fb` or `脸书`.
|
||||
|
||||
- For example, use `Facebook` rather than `facebook`, `fb` or `脸书`.
|
||||
|
||||
In order to maintain readability and normalization, please comply with the 6 rules above as much as possible when translating pages into Chinese.
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
首先,你的页面应该看起来像这样:
|
||||
|
||||
```
|
||||
```md
|
||||
# 命令名称
|
||||
|
||||
> 短小精悍的描述。
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
你也可以在提交前在本地测试自己的贡献:
|
||||
|
||||
```
|
||||
```sh
|
||||
npm install --global tldr-lint
|
||||
tldr-lint {{page.md}}
|
||||
```
|
||||
@@ -37,11 +37,10 @@ tldr-lint {{page.md}}
|
||||
|
||||
如果你用 tldr-pages 的 Node.js 客户端,你可以在命令后加 `-f` (`--render`) 来在本地预览自己的页面:
|
||||
|
||||
```
|
||||
```sh
|
||||
tldr --render {{page.md}}
|
||||
```
|
||||
|
||||
|
||||
## 占位符(token)语法
|
||||
|
||||
当命令涉及用户自己提供的值时,请用 `{{token}}` 语法来使 `tldr` 客户端自动高亮它们:
|
||||
@@ -84,7 +83,7 @@ tldr --render {{page.md}}
|
||||
以下规则适用于中文(zh)和繁体中文(zh_TW):
|
||||
|
||||
1. 在西文单词和数字前后放置一个空格。
|
||||
例如:`列出所有 docker 容器` 而不是 `列出所有docker容器`。
|
||||
例如:`列出所有 docker 容器` 而不是 `列出所有docker容器`。
|
||||
例如:`宽度为 50 个字` 而不是 `宽度为50个字`。
|
||||
2. 除了度数和百分比,在数字和单位之间留一个空格。
|
||||
例如:`容量 50 MB` 而不是 `容量 50MB`。
|
||||
@@ -101,4 +100,3 @@ tldr --render {{page.md}}
|
||||
为保持可读性和一致性,将页面翻译成中文时,请尽可能遵守以上 6 条规则。
|
||||
|
||||
有关更多中西文混排规则的信息,请参考 [《中文文案排版指北》](https://github.com/sparanoid/chinese-copywriting-guidelines)。
|
||||
|
||||
|
Reference in New Issue
Block a user