mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Fix running lazygit with a language other than English on Windows (#3705)
On Windows, trying to use lazygit with a language other than English would result in the error message `open translations\ja.json: file does not exist`.
This commit is contained in:
commit
6da4f9a787
1 changed files with 2 additions and 2 deletions
|
@ -3,8 +3,8 @@ package i18n
|
|||
import (
|
||||
"embed"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/cloudfoundry/jibber_jabber"
|
||||
|
@ -83,7 +83,7 @@ func getSupportedLanguageCodes() ([]string, error) {
|
|||
}
|
||||
|
||||
func readLanguageFile(languageCode string) (*TranslationSet, error) {
|
||||
jsonData, err := embedFS.ReadFile(filepath.Join("translations", languageCode+".json"))
|
||||
jsonData, err := embedFS.ReadFile(fmt.Sprintf("translations/%s.json", languageCode))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue