mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
generate the cheatsheet for each supported language
This commit is contained in:
parent
f6ca450d36
commit
c453bfeb32
1 changed files with 9 additions and 7 deletions
|
@ -25,17 +25,19 @@ type bindingSection struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
langs := []string{"pl", "nl", "en"}
|
||||
mConfig, _ := config.NewAppConfig("", "", "", "", "", true)
|
||||
|
||||
for _, lang := range langs {
|
||||
os.Setenv("LC_ALL", lang)
|
||||
mApp, _ := app.NewApp(mConfig)
|
||||
lang := mApp.Tr.GetLanguage()
|
||||
file, _ := os.Create("Keybindings_" + lang + ".md")
|
||||
|
||||
bindingSections := getBindingSections(mApp)
|
||||
|
||||
content := formatSections(mApp, bindingSections)
|
||||
|
||||
writeString(file, content)
|
||||
}
|
||||
}
|
||||
|
||||
func writeString(file *os.File, str string) {
|
||||
_, err := file.WriteString(str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue