summaryrefslogtreecommitdiffstats
path: root/pkg/app/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/app/app.go')
-rw-r--r--pkg/app/app.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go
index fd8950ae7..9d3f53cc0 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -34,7 +34,7 @@ type App struct {
OSCommand *oscommands.OSCommand
GitCommand *commands.GitCommand
Gui *gui.Gui
- Tr *i18n.Localizer
+ Tr *i18n.TranslationSet
Updater *updates.Updater // may only need this on the Gui
ClientContext string
}
@@ -103,7 +103,7 @@ func NewApp(config config.AppConfigurer, filterPath string) (*App, error) {
}
var err error
app.Log = newLogger(config)
- app.Tr = i18n.NewLocalizer(app.Log)
+ app.Tr = i18n.NewTranslationSet(app.Log)
// if we are being called in 'demon' mode, we can just return here
app.ClientContext = os.Getenv("LAZYGIT_CLIENT_COMMAND")
@@ -138,7 +138,7 @@ func NewApp(config config.AppConfigurer, filterPath string) (*App, error) {
func (app *App) validateGitVersion() error {
output, err := app.OSCommand.RunCommandWithOutput("git --version")
// if we get an error anywhere here we'll show the same status
- minVersionError := errors.New(app.Tr.SLocalize("minGitVersionError"))
+ minVersionError := errors.New(app.Tr.MinGitVersionError)
if err != nil {
return minVersionError
}
@@ -193,7 +193,7 @@ func (app *App) setupRepo() (bool, error) {
}
// Offer to initialize a new repository in current directory.
- fmt.Print(app.Tr.SLocalize("CreateRepo"))
+ fmt.Print(app.Tr.CreateRepo)
response, _ := bufio.NewReader(os.Stdin).ReadString('\n')
if strings.Trim(response, " \n") != "y" {
// check if we have a recent repo we can open
@@ -275,7 +275,7 @@ func (app *App) Close() error {
func (app *App) KnownError(err error) (string, bool) {
errorMessage := err.Error()
- knownErrorMessages := []string{app.Tr.SLocalize("minGitVersionError")}
+ knownErrorMessages := []string{app.Tr.MinGitVersionError}
for _, message := range knownErrorMessages {
if errorMessage == message {
@@ -286,7 +286,7 @@ func (app *App) KnownError(err error) (string, bool) {
mappings := []errorMapping{
{
originalError: "fatal: not a git repository",
- newError: app.Tr.SLocalize("notARepository"),
+ newError: app.Tr.NotARepository,
},
}