summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorskanehira <sho19921005@gmail.com>2019-03-16 16:40:48 +0900
committerJesse Duffield <jessedduffield@gmail.com>2019-03-18 09:49:23 +1100
commitc453bfeb32d90a4c9202e11e8179b9b500e1a73b (patch)
tree3bfb17dc161252225b4a816ce791d1f8785e58b6 /scripts
parentf6ca450d364c693127f1239860cf065951feb611 (diff)
generate the cheatsheet for each supported language
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generate_cheatsheet.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/generate_cheatsheet.go b/scripts/generate_cheatsheet.go
index f8beaa457..529f37da8 100644
--- a/scripts/generate_cheatsheet.go
+++ b/scripts/generate_cheatsheet.go
@@ -25,16 +25,18 @@ type bindingSection struct {
}
func main() {
+ langs := []string{"pl", "nl", "en"}
mConfig, _ := config.NewAppConfig("", "", "", "", "", true)
- mApp, _ := app.NewApp(mConfig)
- lang := mApp.Tr.GetLanguage()
- file, _ := os.Create("Keybindings_" + lang + ".md")
- bindingSections := getBindingSections(mApp)
+ for _, lang := range langs {
+ os.Setenv("LC_ALL", lang)
+ mApp, _ := app.NewApp(mConfig)
+ file, _ := os.Create("Keybindings_" + lang + ".md")
- content := formatSections(mApp, bindingSections)
-
- writeString(file, content)
+ bindingSections := getBindingSections(mApp)
+ content := formatSections(mApp, bindingSections)
+ writeString(file, content)
+ }
}
func writeString(file *os.File, str string) {