1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-09-27 12:49:02 +00:00

New translations readme.md (Chinese Traditional)

This commit is contained in:
Matan Kushner 2023-11-02 18:24:30 +09:00
parent 860fd4fa68
commit 6064cabaed

View File

@ -206,6 +206,13 @@ detect_extensions = ['ts', '!video.ts', '!audio.ts']
| `add_newline` | `true` | Inserts blank line between shell prompts. |
| `palette` | `''` | Sets which color palette from `palettes` to use. |
| `palettes` | `{}` | Collection of color palettes that assign [colors](/advanced-config/#style-strings) to user-defined names. Note that color palettes cannot reference their own color definitions. |
| `follow_symlinks` | `true` | Follows symlinks to check if they're directories; used in modules such as git. |
::: tip
If you have symlinks to networked filesystems, consider setting `follow_symlinks` to `false`.
:::
### 範例
@ -237,7 +244,7 @@ mustard = '#af8700'
### Default Prompt Format
The default `format` is used to define the format of the prompt, if empty or no `format` is provided. 預設如下:
The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown:
```toml
format = '$all'
@ -473,7 +480,7 @@ very-long-subscription-name = 'vlsn'
## 電池
`battery` 模組顯示電池的電量以及現在的充電狀態。 這個模組只會在裝置的電量低於 10% 的時候看見。
The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%.
### 選項
@ -501,7 +508,7 @@ discharging_symbol = '💀 '
### 電池顯示
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). 如果沒有提供 `display`。 預設如下:
The `display` configuration option is used to define when the battery indicator should be shown (threshold), which symbol would be used (symbol), and what it would like (style). If no `display` is provided. The default is as shown:
```toml
[[battery.display]]
@ -513,7 +520,7 @@ The default value for the `charging_symbol` and `discharging_symbol` option is r
#### 選項
`display` 選項是一個下列表格的陣列。
The `display` option is an array of the following table.
| Option | 預設 | 說明 |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
@ -663,9 +670,9 @@ format = 'via [$name $version]($style)'
## 字元
`character` 模組在你的文字輸入處旁顯示一個字元 (通常是箭頭)。
The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal.
這個字元會告訴你最後的指令是成功還是失敗。 It can do this in two ways:
The character will tell you whether the last command was successful or not. It can do this in two ways:
- changing color (`red`/`green`)
- changing shape (``/`✖`)
@ -790,15 +797,15 @@ The `cobol` module shows the currently installed version of COBOL. By default, t
## 指令持續時間
`cmd_duration` 模組顯示最後一個指令執行所花費的時間。 這個模組只會在指令花費超過兩秒或是有設定 `min_time` 時,超過設定值時出現。
The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists.
::: warning 不要在 Bash 中設置 DEBUG trap
::: warning Do not hook the DEBUG trap in Bash
如果你在 `bash` 中使用 Starship不要在執行 `eval $(starship init $0)` 之後設置 `DEBUG` trap不然這個模組**會**壞掉。
If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break.
:::
想使用類似 preexec 功能的 Bash 使用者可以 [rcaloras 的 bash_preexec 框架](https://github.com/rcaloras/bash-preexec)。 只要在 `eval $(starship init $0)` 之前簡單地定義 `preexec_functions``precmd_functions` 兩個陣列,然後就可以照常進行。
Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal.
### 選項
@ -1059,11 +1066,11 @@ format = 'via [🦕 $version](green bold) '
## 資料夾
`directory` 模組顯示到現在資料夾的路徑,並裁減到前三層資料夾。 你的資料夾也會被裁減到你所在的 git 儲存庫的根目錄。
The `directory` module shows the path to your current directory, truncated to three parent folders. Your directory will also be truncated to the root of the git repo that you're currently in.
When using the `fish_style_pwd_dir_length` option, instead of hiding the path that is truncated, you will see a shortened name of each directory based on the number you enable for the option.
例如,給定一個右列的路徑 `~/Dev/Nix/nixpkgs/pkgs` 其中 `nixpkgs` 是儲存庫的根目錄,而且該選項被設定為 `1`。 你會看到 `~/D/N/nixpkgs/pkgs`,而在這個設定之前則是 `nixpkgs/pkgs`
For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, and the option set to `1`. You will now see `~/D/N/nixpkgs/pkgs`, whereas before it would have been `nixpkgs/pkgs`.
### 選項
@ -1084,7 +1091,7 @@ When using the `fish_style_pwd_dir_length` option, instead of hiding the path th
| `use_os_path_sep` | `true` | Use the OS specific path separator instead of always using `/` (e.g. `\` on Windows) |
<details>
<summary>這個模組有些進階設定選項可以控制顯示資料夾。</summary>
<summary>This module has a few advanced configuration options that control how the directory is displayed.</summary>
| Advanced Option | 預設 | 說明 |
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@ -1176,7 +1183,7 @@ format = 'via [🐋 $context](blue bold)'
## Dotnet
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. 如果這個資料夾已經選定一個 SDK則顯示這個 SDK 的版本。 如果沒有的話,則顯示最新安裝的 SDK 版本。
The `dotnet` module shows the relevant version of the [.NET Core SDK](https://dotnet.microsoft.com/) for the current directory. If the SDK has been pinned in the current directory, the pinned version is shown. Otherwise the module shows the latest installed version of the SDK.
By default this module will only be shown in your prompt when one or more of the following files are present in the current directory:
@ -1191,7 +1198,7 @@ By default this module will only be shown in your prompt when one or more of the
You'll also need the .NET Core SDK installed in order to use it correctly.
這個模組內部是使用它自己的機制來偵測版本。 一般來說這個模組有 `dotnet --version` 的兩倍快,但是它可能會在你的 .NET 專案有不尋常的資料夾結構時顯示不正確的版本。 如果精確度比速度更重要的話,你可以藉由設定模組中的 `heuristic = false` 選項來停用這個功能。
Internally, this module uses its own mechanism for version detection. Typically it is twice as fast as running `dotnet --version`, but it may show an incorrect version if your .NET project has an unusual directory layout. If accuracy is more important than speed, you can disable the mechanism by setting `heuristic = false` in the module options.
The module will also show the Target Framework Moniker (<https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks>) when there is a `.csproj` file in the current directory.
@ -1314,7 +1321,7 @@ format = 'via [ $version](cyan bold) '
## 環境變數
The `env_var` module displays the current value of a selected environment variables. 這個模組只在下列條件其中之一達到時顯示:
The `env_var` module displays the current value of a selected environment variables. The module will be shown only if any of the following conditions are met:
- `variable` 設定選項符合一個存在的環境變數。
- 沒有設定 `variable` 選項,但是有設定 `default` 選項。
@ -1638,7 +1645,7 @@ very-long-project-name = 'vlpn'
## Git 分支
`git_branch` 模組顯示現在的資料夾中使用中的儲存庫的分支。
The `git_branch` module shows the active branch of the repo in your current directory.
### 選項
@ -1717,7 +1724,7 @@ tag_symbol = '🔖 '
## Git State
`git_state` 模組會顯示在 git 儲存庫中的資料夾內以及會在有作業正在進行時顯示像是_REBASING_、_BISECTING_ 等等。 如果有進展的資訊 (像是 REBASING 3/10),也會一併顯示出來。
The `git_state` module will show in directories which are part of a git repository, and where there is an operation in progress, such as: _REBASING_, _BISECTING_, etc. If there is progress information (e.g., REBASING 3/10), that information will be shown too.
### 選項
@ -1761,7 +1768,7 @@ The `git_metrics` module will show the number of added and deleted lines in the
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -1799,7 +1806,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
## Git Status
`git_status` 模組顯示用來表示現在資料夾之中儲存庫狀態的符號。
The `git_status` module shows symbols representing the state of the repo in your current directory.
::: tip
@ -2139,7 +2146,7 @@ format = 'via [⎈ $version](bold white) '
## 主機名稱
`hostname` 模組顯示系統的主機名稱。
The `hostname` module shows the system hostname.
### 選項
@ -2229,7 +2236,7 @@ symbol = '🌟 '
## 工作
`jobs` 模組顯示現在正在執行中的工作。 這個模組只會在有背景工作正在執行時顯示。 The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The `jobs` module shows the current number of jobs running. The module will be shown only if there are background jobs running. The module will show the number of jobs running if there are at least 2 jobs, or more than the `number_threshold` config value, if it exists. The module will show a symbol if there is at least 1 job, or more than the `symbol_threshold` config value, if it exists. You can set both values to 0 in order to _always_ show the symbol and number of jobs, even if there are 0 jobs running.
The default functionality is:
@ -2377,7 +2384,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
When the module is enabled it will always be active, unless any of `detect_extensions`, `detect_files` or `detect_folders` have been set in which case the module will only be active in directories that match those conditions.
@ -2489,7 +2496,7 @@ context_alias = "gke-$cluster"
## 換行
`line_break` 模組將提示字元分成兩行。
The `line_break` module separates the prompt into two lines.
### 選項
@ -2582,13 +2589,13 @@ format = 'via [🌕 $version](bold blue) '
## 記憶體使用量
`memory_usage` 模組顯示現在系統記憶體與 swap 的使用量。
The `memory_usage` module shows current system memory and swap usage.
預設 swap 使用量會在系統總 swap 使用量不為 0 時顯示出來。
By default the swap usage is displayed if the total system swap is non-zero.
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -2747,7 +2754,7 @@ symbol = '🎣 '
## Nix-shell
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. 這個模組會在 nix-shell 環境中顯示。
The `nix_shell` module shows the [nix-shell](https://nixos.org/guides/nix-pills/developing-with-nix-shell.html) environment. The module will be shown when inside a nix-shell environment.
### 選項
@ -2961,7 +2968,7 @@ The [os_info](https://lib.rs/crates/os_info) crate used by this module is known
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3053,7 +3060,7 @@ Arch = "Arch is the best! "
## 套件版本
The `package` 模組在現在資料夾是一個套件的儲藏庫時出現,並顯示他的現在版本。 The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
The `package` module is shown when the current directory is the repository for a package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`, `poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards`, `daml` and `dart` packages.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) The `npm` package version is extracted from the `package.json` present in the current directory
- [**Cargo**](https://doc.rust-lang.org/cargo/) The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
@ -3468,7 +3475,7 @@ format = 'via [🦪 $version]($style) '
## Red
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). 這個模組將在下列其中一個條件滿足時顯示:
By default the `red` module shows the currently installed version of [Red](https://www.red-lang.org/). The module will be shown if any of the following conditions are met:
- The current directory contains a file with `.red` or `.reds` extension
@ -3506,7 +3513,7 @@ symbol = '🔴 '
## Ruby
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). 這個模組將在下列其中一個條件滿足時顯示:
By default the `ruby` module shows the currently installed version of [Ruby](https://www.ruby-lang.org/). The module will be shown if any of the following conditions are met:
- 目前資料夾中有一個 `Gemfile` 檔案
- The current directory contains a `.ruby-version` file
@ -3550,7 +3557,7 @@ symbol = '🔺 '
## Rust
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). 這個模組將在下列其中一個條件滿足時顯示:
By default the `rust` module shows the currently installed version of [Rust](https://www.rust-lang.org/). The module will be shown if any of the following conditions are met:
- 目前資料夾中有一個 `Cargo.toml` 檔案
- 現在資料夾中包含一個檔案具有 `.rs` 副檔名
@ -3635,7 +3642,7 @@ The `shell` module shows an indicator for currently used shell.
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3840,7 +3847,7 @@ The `status` module displays the exit code of the previous command. If $success_
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3901,7 +3908,7 @@ The `sudo` module displays if sudo credentials are currently cached. The module
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -3946,7 +3953,7 @@ disabled = false
## Swift
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). 這個模組將在下列其中一個條件滿足時顯示:
By default the `swift` module shows the currently installed version of [Swift](https://swift.org/). The module will be shown if any of the following conditions are met:
- The current directory contains a `Package.swift` file
- The current directory contains a file with the `.swift` extension
@ -4044,11 +4051,11 @@ format = '[🏎💨 $workspace]($style) '
## 時間
`time` 模組顯示目前的**當地**時間. `format` 設定值被 [`chrono`](https://crates.io/crates/chrono) crate 用來控制時間如何顯示。 請看 [chrono 的 strftime 文件](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html)來了解有那些選項可以使用。
The `time` module shows the current **local** time. The `format` configuration value is used by the [`chrono`](https://crates.io/crates/chrono) crate to control how the time is displayed. Take a look [at the chrono strftime docs](https://docs.rs/chrono/0.4.7/chrono/format/strftime/index.html) to see what options are available.
::: tip
這個模組預設是停用的。 想要啟用它的話,請在設定檔中將 `disabled` 設定為 `false`
This module is disabled by default. To enable it, set `disabled` to `false` in your configuration file.
:::
@ -4090,7 +4097,7 @@ time_range = '10:00:00-14:00:00'
## 使用者名稱
`username` 模組顯示現在使用中的使用者名稱。 這個模組將在下列其中一個條件滿足時顯示:
The `username` module shows active user's username. The module will be shown if any of the following conditions are met:
- The current user is root/admin
- 目前使用者並非登入時的使用者
@ -4241,7 +4248,7 @@ format = '[🆅 $repo](bold blue) '
## Zig
By default the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). 這個模組將在下列其中一個條件滿足時顯示:
By default the `zig` module shows the currently installed version of [Zig](https://ziglang.org/). The module will be shown if any of the following conditions are met:
- The current directory contains a `.zig` file