From c4a684ce53a7134220d50bf2af9a02dcd22e648b Mon Sep 17 00:00:00 2001 From: kyu08 <49891479+kyu08@users.noreply.github.com> Date: Sun, 20 Jul 2025 19:55:32 +0900 Subject: [PATCH] Update `CONTRIBUTING.md` to clarify translation contribution process --- CONTRIBUTING.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 02dc8dd5a..3c2bab21d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -118,10 +118,24 @@ Lazygit supports [Nerd Fonts](https://www.nerdfonts.com) to render certain icons ## 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. Then you can access via `gui.Tr.YourNewText` (or `self.c.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!). +Boy that's a hard word to spell. Anyway, lazygit is translated into several languages within the pkg/i18n package. + +### For developers adding new text + +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 `self.c.Tr.YourNewText`, etc). Note, we use 'Sentence case' for everything (so no 'Title Case' or 'whatever-it's-called-when-there's-no-capital-letters-case') +### For translators + +Lazygit translations are managed through [Crowdin](https://crowdin.com/project/lazygit/). If you'd like to contribute translations: + +1. Join the Crowdin project at https://crowdin.com/project/lazygit/ +2. Select your target language and help translate missing strings +3. The translation files in `pkg/i18n/translations/` are managed by the maintainers - please don't edit them directly + +For detailed information about the translation process, including how maintainers sync translations, see `pkg/i18n/translations/README.md`. + ## Debugging The easiest way to debug lazygit is to have two terminal tabs open at once: one for running lazygit (via `go run main.go -debug` in the project root) and one for viewing lazygit's logs (which can be done via `go run main.go --logs` or just `lazygit --logs`).