mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-04 03:48:07 +02:00
added some commands
This commit is contained in:
parent
0c39347224
commit
6e518142b4
@ -5,7 +5,10 @@ import (
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
// addDutch will add all the translations
|
||||
func addDutch(i18nObject *i18n.Bundle) *i18n.Bundle {
|
||||
|
||||
// add the translations
|
||||
i18nObject.AddMessages(language.Dutch,
|
||||
&i18n.Message{
|
||||
ID: "NotEnoughSpace",
|
||||
@ -75,5 +78,7 @@ func addDutch(i18nObject *i18n.Bundle) *i18n.Bundle {
|
||||
Other: "uitchecken",
|
||||
},
|
||||
)
|
||||
|
||||
// return the new i18nObject
|
||||
return i18nObject
|
||||
}
|
||||
|
@ -9,12 +9,16 @@ import (
|
||||
// the function to setup the localizer
|
||||
func getlocalizer() *i18n.Localizer {
|
||||
|
||||
// detect the user's language
|
||||
userLang, _ := jibber_jabber.DetectLanguage()
|
||||
|
||||
// create a i18n bundle that can be used to add translations and other things
|
||||
var i18nObject = &i18n.Bundle{DefaultLanguage: language.English}
|
||||
|
||||
// add translation file(s)
|
||||
i18nObject = addDutch(i18nObject)
|
||||
|
||||
// return the new localizer that can be used to translate text
|
||||
return i18n.NewLocalizer(i18nObject, userLang)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user