docs(i18n): New Crowdin updates (#2834)

This commit is contained in:
Matan Kushner
2021-07-10 17:15:23 -04:00
committed by GitHub
parent 9f337d15e7
commit cc32c7214b
56 changed files with 1658 additions and 503 deletions
+13
View File
@@ -138,3 +138,16 @@ description: Starship 是適合任何 shell 的最小、極速、高度客製化
eval `starship init tcsh`
```
#### Nushell
::: warning This will change in the future. Only nu version v0.33 or higher is supported. ::: Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
+47 -6
View File
@@ -102,7 +102,7 @@ A conditional format string wrapped in `(` and `)` will not render if all variab
For example:
- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region.
- `(@$region)` will show nothing if the variable `region` is `None` or empty string, otherwise `@` followed by the value of region.
- `(some text)` will always show nothing since there are no variables wrapped in the braces.
- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`.
@@ -185,6 +185,7 @@ $vcsh\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$hg_branch\
$docker_context\
@@ -391,7 +392,7 @@ By default it only changes color. If you also want to change its shape take a lo
::: warning
`error_symbol` is not supported on elvish shell.
`error_symbol` is not supported on elvish and nu shell.
:::
@@ -745,7 +746,7 @@ truncation_symbol = "…/"
## Docker Context
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default`.
The `docker_context` module shows the currently active [Docker context](https://docs.docker.com/engine/context/working-with-contexts/) if it's not set to `default` or if the `DOCKER_HOST` or `DOCKER_CONTEXT` environment variables are set (as they are meant to override the context in use).
### 選項
@@ -804,7 +805,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
| Option | 預設 | 說明 |
| ------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
| `format` | `"via [$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `".NET "` | 在顯示 dotnet 版本之前用的符號。 |
| `heuristic` | `true` | 使用更快速的版本偵測法來保持 starship 的速度。 |
@@ -1169,6 +1170,46 @@ format = '[\($state( $progress_current of $progress_total)\)]($style) '
cherry_pick = "[🍒 PICKING](bold red)"
```
## Git Metrics
The `git_metrics` module will show the number of added and deleted lines in the current git repository.
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
:::
### 選項
| Option | 預設 | 說明 |
| --------------- | -------------------------------------------------------- | ---------------------------------- |
| `added_style` | `"bold green"` | The style for the added count. |
| `deleted_style` | `"bold red"` | The style for the deleted count. |
| `format` | `'[+$added]($added_style) [-$deleted]($deleted_style) '` | The format for the module. |
| `disabled` | `true` | Disables the `git_metrics` module. |
### Variables
| 變數 | 範例 | 說明 |
| ----------------- | --- | ------------------------------------------- |
| added | `1` | The current number of added lines |
| deleted | `2` | The current number of deleted lines |
| added_style\* | | Mirrors the value of option `added_style` |
| deleted_style\* | | Mirrors the value of option `deleted_style` |
\*: This variable can only be used as a part of a style string
### 範例
```toml
# ~/.config/starship.toml
[git_metrics]
added_style = "bold blue"
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
```
## Git Status
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
@@ -1416,7 +1457,7 @@ symbol = "🌟 "
::: warning
This module is not supported on tcsh.
This module is not supported on tcsh and nu.
:::
@@ -2505,7 +2546,7 @@ The `status` module displays the exit code of the previous command. The module w
:::
::: warning This module is not supported on elvish shell. :::
::: warning This module is not supported on elvish and nu shell. :::
### 選項
+14
View File
@@ -263,6 +263,20 @@
eval `starship init tcsh`
```
#### Nushell
**Warning** This will change in the future. Only nu version v0.33 or higher is supported. Add the following to your nu config file. You can check the location of this file by running `config path` in nu.
```toml
startup = [
"mkdir ~/.cache/starship",
"starship init nu | save ~/.cache/starship/init.nu",
"source ~/.cache/starship/init.nu"
]
prompt = "starship_prompt"
```
## 🤝 貢獻
我們歡迎具有**各式各樣能力**的貢獻者! 如果你正在尋找容易加入的方法,試試看標註為「[good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue)」的 issue。