1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

Here i a fix for the error go complain on your pull

This commit is contained in:
Mark Kopenga 2018-08-17 17:22:30 +02:00 committed by Dawid Dziurla
parent bf5f3bb972
commit 0f145093fe
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B
4 changed files with 21 additions and 9 deletions

View File

@ -6,10 +6,10 @@ import (
)
// addDutch will add all dutch translations
func addDutch(i18nObject *i18n.Bundle) {
func addDutch(i18nObject *i18n.Bundle) error {
// add the translations
i18nObject.AddMessages(language.Dutch,
return i18nObject.AddMessages(language.Dutch,
&i18n.Message{
ID: "NotEnoughSpace",
Other: "Niet genoeg ruimte om de panelen te renderen",

View File

@ -15,9 +15,9 @@ import (
"golang.org/x/text/language"
)
func addEnglish(i18nObject *i18n.Bundle) {
func addEnglish(i18nObject *i18n.Bundle) error {
i18nObject.AddMessages(language.English,
return i18nObject.AddMessages(language.English,
&i18n.Message{
ID: "NotEnoughSpace",
Other: "Not enough space to render panels",

View File

@ -1,6 +1,8 @@
package i18n
import (
"log"
"github.com/Sirupsen/logrus"
"github.com/cloudfoundry/jibber_jabber"
"github.com/nicksnyder/go-i18n/v2/i18n"
@ -79,7 +81,17 @@ func (l *Localizer) GetLanguage() string {
// add translation file(s)
func addBundles(i18nBundle *i18n.Bundle) {
addPolish(i18nBundle)
addDutch(i18nBundle)
addEnglish(i18nBundle)
err := addPolish(i18nBundle)
if err != nil {
log.Fatal(err)
}
err = addDutch(i18nBundle)
if err != nil {
log.Fatal(err)
}
err = addEnglish(i18nBundle)
if err != nil {
log.Fatal(err)
}
}

View File

@ -5,9 +5,9 @@ import (
"golang.org/x/text/language"
)
func addPolish(i18nObject *i18n.Bundle) {
func addPolish(i18nObject *i18n.Bundle) error {
i18nObject.AddMessages(language.Polish,
return i18nObject.AddMessages(language.Polish,
&i18n.Message{
ID: "NotEnoughSpace",
Other: "Za mało miejsca do wyświetlenia paneli",