mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
docs(i18n): new Crowdin translations (#1059)
This commit is contained in:
+111
-31
@@ -103,6 +103,7 @@ prompt_order = [
|
||||
"dotnet",
|
||||
"elixir",
|
||||
"elm",
|
||||
"erlang",
|
||||
"golang",
|
||||
"haskell",
|
||||
"java",
|
||||
@@ -120,6 +121,7 @@ prompt_order = [
|
||||
"env_var",
|
||||
"crystal",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
@@ -482,6 +484,28 @@ The `elm` module shows the currently installed version of Elm. 此组件将在
|
||||
symbol = " "
|
||||
```
|
||||
|
||||
## Erlang
|
||||
|
||||
The `erlang` module shows the currently installed version of Erlang/OTP. 此组件只有满足以下条件之一时才会被显示:
|
||||
|
||||
- 当前目录包含一个 `rebar.config` 文件.
|
||||
- 当前目录包含一个 `erlang.mk` 文件.
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | ------- | -------------------------------------------------------- |
|
||||
| `symbol` | `"🖧 "` | The symbol used before displaying the version of Erlang. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[erlang]
|
||||
symbol = "e "
|
||||
```
|
||||
## Environment Variable
|
||||
|
||||
`env_var` 组件显示选定的环境变量的当前值。 此组件只有满足以下条件之一时才会被显示:
|
||||
@@ -650,7 +674,7 @@ deleted = "🗑"
|
||||
|
||||
## Golang
|
||||
|
||||
`golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件时显示:
|
||||
`golang` 组件显示当前安装的 Golang 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `go.mod` 文件
|
||||
- 当前目录包含 `go.sum` 文件
|
||||
@@ -778,7 +802,7 @@ threshold = 4
|
||||
|
||||
## Julia
|
||||
|
||||
The `julia` module shows the currently installed version of Julia. 此组件将在符合以下任意条件时显示:
|
||||
The `julia` module shows the currently installed version of Julia. 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- The current directory contains a `Project.toml` file
|
||||
- The current directory contains a `Manifest.toml` file
|
||||
@@ -788,7 +812,7 @@ The `julia` module shows the currently installed version of Julia. 此组件将
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"∴ "` | The symbol used before displaying the version of Julia. |
|
||||
| `symbol` | `"ஃ "` | The symbol used before displaying the version of Julia. |
|
||||
| `style` | `"bold purple"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
|
||||
@@ -798,7 +822,7 @@ The `julia` module shows the currently installed version of Julia. 此组件将
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[julia]
|
||||
symbol = "👸 "
|
||||
symbol = "∴ "
|
||||
```
|
||||
## Kubernetes
|
||||
|
||||
@@ -921,13 +945,14 @@ truncation_symbol = ""
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ------------ | ------------ | ------------------ |
|
||||
| `use_name` | `false` | 显示 nix-shell 的名称。 |
|
||||
| `impure_msg` | `"impure"` | 自定义“impure”消息。 |
|
||||
| `pure_msg` | `"pure"` | 自定义“pure”消息。 |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `nix_shell` 组件。 |
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ------------ | ------------- | ------------------------------------------------- |
|
||||
| `use_name` | `false` | 显示 nix-shell 的名称。 |
|
||||
| `impure_msg` | `"impure"` | 自定义“impure”消息。 |
|
||||
| `pure_msg` | `"pure"` | 自定义“pure”消息。 |
|
||||
| `symbol` | `"❄️ "` | The symbol used before displaying the shell name. |
|
||||
| `style` | `"bold blue"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `nix_shell` 组件。 |
|
||||
|
||||
### 示例
|
||||
|
||||
@@ -939,11 +964,12 @@ disabled = true
|
||||
use_name = true
|
||||
impure_msg = "impure shell"
|
||||
pure_msg = "pure shell"
|
||||
symbol = "☃️ "
|
||||
```
|
||||
|
||||
## NodeJS
|
||||
|
||||
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件时显示:
|
||||
`nodejs` 组件显示当前安装的 NodeJS 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `package.json` 文件
|
||||
- The current directory contains a `.node-version` file
|
||||
@@ -969,7 +995,7 @@ symbol = "🤖 "
|
||||
|
||||
## Package Version
|
||||
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, and `gradle` packages.
|
||||
当前目录是软件包的代码仓库时,将显示 `package` 组件,并显示软件包当前版本。 The module currently supports `npm`, `cargo`, `poetry`, `composer`, `gradle`, `julia` and `mix` packages.
|
||||
|
||||
- **npm** —— `npm` 软件包版本从当前目录下的 `package.json` 中得到
|
||||
- **cargo** —— `cargo` 软件包的版本从当前目录下的 `Cargo.toml` 中得到
|
||||
@@ -977,16 +1003,18 @@ symbol = "🤖 "
|
||||
- **composer** —— `composer` 软件包版本从当前目录下的 `composer.json` 中得到
|
||||
- **gradle** – The `gradle` package version is extracted from the `build.gradle` present
|
||||
- **julia** - The package version is extracted from the `Project.toml` present
|
||||
- **mix** - The `mix` package version is extracted from the `mix.exs` present
|
||||
|
||||
> ⚠ 此组件显示的是源代码在当前目录中的软件包的版本,而不是包管理器的版本。
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ---------- | ------------ | --------------------- |
|
||||
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `package` 组件。 |
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ----------------- | ------------ | --------------------------------------------------------- |
|
||||
| `symbol` | `"📦 "` | 这个字段的内容会显示在当前软件包版本之前。 |
|
||||
| `style` | `"bold red"` | 此组件的样式。 |
|
||||
| `display_private` | `false` | Enable displaying version for packages marked as private. |
|
||||
| `disabled` | `false` | 禁用 `package` 组件。 |
|
||||
|
||||
### 示例
|
||||
|
||||
@@ -999,7 +1027,7 @@ symbol = "🎁 "
|
||||
|
||||
## PHP
|
||||
|
||||
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件时显示:
|
||||
`php` 组件显示当前安装的 PHP 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含一个 `composer.json` 文件
|
||||
- The current directory contains a `.php-version` file
|
||||
@@ -1035,20 +1063,23 @@ symbol = "🔹 "
|
||||
- 当前目录包含 `.python-version` 文件
|
||||
- 当前目录包含 `requirements.txt` 文件
|
||||
- 当前目录包含 `pyproject.toml` 文件
|
||||
- 当前目录包含一个使用 `.py` 扩展名的文件
|
||||
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
|
||||
- 当前目录包含 `Pipfile` 文件
|
||||
- 当前目录包含一个 `tox.ini` 文件
|
||||
- 当前目录包含一个 `setup.py` 文件
|
||||
- The current directory contains a `__init__.py` file
|
||||
- 当前处于一个活跃的 python 虚拟环境中
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| -------------------- | --------------- | ----------------------------------------- |
|
||||
| `symbol` | `"🐍 "` | 这个字段的内容会显示在当前 Python 版本之前。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
|
||||
| `pyenv_prefix` | `"pyenv "` | 在 pyenv 版本前显示的前缀(默认显示 `pyenv MY_VERSION`) |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `python` 组件。 |
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| -------------------- | --------------- | -------------------------------------------------------------------------- |
|
||||
| `symbol` | `"🐍 "` | 这个字段的内容会显示在当前 Python 版本之前。 |
|
||||
| `pyenv_version_name` | `false` | 使用 pyenv 获取 Python 版本 |
|
||||
| `pyenv_prefix` | `"pyenv "` | 在 pyenv 版本前显示的前缀(默认显示 `pyenv MY_VERSION`) |
|
||||
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
|
||||
| `style` | `"bold yellow"` | 此组件的样式。 |
|
||||
| `disabled` | `false` | 禁用 `python` 组件。 |
|
||||
|
||||
### 示例
|
||||
|
||||
@@ -1063,7 +1094,7 @@ pyenv_prefix = "foo "
|
||||
|
||||
## Ruby
|
||||
|
||||
`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件时显示:
|
||||
`ruby` 组件显示当前安装的 Ruby 版本。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `Gemfile` 文件
|
||||
- The current directory contains a `.ruby-version` file
|
||||
@@ -1114,8 +1145,6 @@ symbol = "⚙️ "
|
||||
|
||||
The `singularity` module shows the current singularity image, if inside a container and `$SINGULARITY_NAME` is set.
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
@@ -1138,7 +1167,7 @@ symbol = "📦 "
|
||||
|
||||
## Terraform
|
||||
|
||||
`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件将在符合以下任意条件时显示:
|
||||
`terraform` 组件显示当前选定的 terraform 工作区和版本。 默认情况下不会显示 terraform 版本,因为当使用大量插件时,当前版本 terraform 查询版本号很慢。 此组件将在符合以下任意条件之一时显示:
|
||||
|
||||
- 当前目录包含 `.terraform` 目录
|
||||
- 当前目录包含一个使用 `.tf` 扩展名的文件
|
||||
@@ -1220,3 +1249,54 @@ utc_time_offset = "-5"
|
||||
[username]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Custom commands
|
||||
|
||||
The `custom` modules show the output of some arbitrary commands.
|
||||
|
||||
These modules will be shown if any of the following conditions are met:
|
||||
- The current directory contains a file whose name is in `files`
|
||||
- The current directory contains a directory whose name is in `directories`
|
||||
- The current directory contains a file whose extension is in `extensions`
|
||||
- The `when` command returns 0
|
||||
|
||||
::: tip
|
||||
|
||||
Multiple custom modules can be defined by using a `.`.
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
|
||||
The order in which custom modules are shown can be individually set by setting `custom.foo` in `prompt_order`. By default, the `custom` module will simply show all custom modules in the order they were defined.
|
||||
|
||||
:::
|
||||
|
||||
### 配置项
|
||||
|
||||
| 字段 | 默认值 | 描述 |
|
||||
| ------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `command` | | The command whose output should be printed. |
|
||||
| `when` | | A shell command used as a condition to show the module. The module will be shown if the command returns a `0` status code. |
|
||||
| `shell` | | The path to the shell to use to execute the command. If unset, it will fallback to STARSHIP_SHELL and then to "sh". |
|
||||
| `描述` | `"<custom module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `files` | `[]` | The files that will be searched in the working directory for a match. |
|
||||
| `directories` | `[]` | The directories that will be searched in the working directory for a match. |
|
||||
| `extensions` | `[]` | The extensions that will be searched in the working directory for a match. |
|
||||
| `symbol` | `""` | The symbol used before displaying the command output. |
|
||||
| `style` | `"bold green"` | 此组件的样式。 |
|
||||
| `prefix` | `""` | Prefix to display immediately before the command output. |
|
||||
| `suffix` | `""` | Suffix to display immediately after the command output. |
|
||||
| `disabled` | `false` | Disables this `custom` module. |
|
||||
|
||||
### 示例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[custom.foo]
|
||||
command = "echo foo" # shows output of command
|
||||
files = ["foo"] # can specify filters
|
||||
when = """ test "$HOME" == "$PWD" """
|
||||
prefix = " transcending "
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user