Update CONTRIBUTING.md to reflect enum Step sort enforcement (#1111)

* Update CONTRIBUTING.md

* Formatting
This commit is contained in:
Gideon
2025-04-09 04:03:32 +02:00
committed by GitHub
parent 3dc8d31d57
commit 2bf6a2b100

View File

@@ -20,11 +20,11 @@ To add a new `step` to `topgrade`:
```rust
pub enum Step {
// Existed steps
// Existing steps
// ...
// Your new step here!
// You may want it to be sorted alphabetically because that looks great:)
// Make sure it stays sorted alphabetically because that looks great :)
Xxx,
}
```
@@ -78,7 +78,7 @@ To add a new `step` to `topgrade`:
to separate the steps, for example, for steps that are Linux-only, it goes
like this:
```
```rust
#[cfg(target_os = "linux")]
{
// Xxx is Linux-only
@@ -86,7 +86,7 @@ To add a new `step` to `topgrade`:
}
```
Congrats, you just added a new `step`:)
Congrats, you just added a new `step` :)
## Modification to the configuration entries
@@ -129,12 +129,12 @@ $ cargo test
Don't worry about other platforms, we have most of them covered in our CI.
## I18n
## I18n
If your PR introduces user-facing messages, we need to ensure they are translated.
Please add the translations to [`locales/app.yml`][app_yml]. For simple messages
without arguments (e.g., "hello world"), we can simply translate them according
(Tip: ChatGPT or similar LLMs is good at translation). If a message contains
If your PR introduces user-facing messages, we need to ensure they are translated.
Please add the translations to [`locales/app.yml`][app_yml]. For simple messages
without arguments (e.g., "hello world"), we can simply translate them according
(Tip: ChatGPT or similar LLMs is good at translation). If a message contains
arguments, e.g., "hello <NAME>", please follow this convention:
```yml