From ef82f394312e6f1c100f5153187d5537d701384f Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 16 Aug 2022 08:08:39 +1000 Subject: [PATCH] better PR template --- .github/pull_request_template.md | 4 +++- CONTRIBUTING.md | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3c026290611..6c6a32467cb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,6 +3,8 @@ - **Please check if the PR fulfills these requirements** * [ ] Cheatsheets are up-to-date (run `go run scripts/cheatsheet/main.go generate`) -* [ ] Code has been formatted (run `go install mvdan.cc/gofumpt@latest && gofumpt -l -w .`) +* [ ] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [ ] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) +* [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] Docs (specifically `docs/Config.md`) have been updated if necessary +* [ ] You've read through your own file changes for silly mistakes etc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c6a68feae16..4de86725fbc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,9 +69,15 @@ by setting [`formatting.gofumpt`](https://github.com/golang/tools/blob/master/go } ``` +To run gofumpt from your terminal go: + +``` +go install mvdan.cc/gofumpt@latest && gofumpt -l -w . +``` + ## Internationalisation -Boy that's a hard word to spell. Anyway, lazygit is translated into several languages within the pkg/i18n package. If you need to render text to the user, you should add a new field to the TranslationSet struct in `pkg/i18n/english.go` and add the actual content within the `EnglishTranslationSet()` method in the same file. Although it is appreciated if you translate the text into other languages, it's not expected of you (google translate will likely do a bad job anyway!). +Boy that's a hard word to spell. Anyway, lazygit is translated into several languages within the pkg/i18n package. If you need to render text to the user, you should add a new field to the TranslationSet struct in `pkg/i18n/english.go` and add the actual content within the `EnglishTranslationSet()` method in the same file. Then you can access via `gui.Tr.YourNewText` (or `app.Tr.YourNewText`, etc). Although it is appreciated if you translate the text into other languages, it's not expected of you (google translate will likely do a bad job anyway!). ## Debugging