diff --git a/commands/service_settings_test.go b/commands/service_settings_test.go index 1c77856a336..89f7b11c3f7 100644 --- a/commands/service_settings_test.go +++ b/commands/service_settings_test.go @@ -62,7 +62,6 @@ func TestGetAll(t *testing.T) { "user": `+defaultUserDir.GetEncodedValue()+` }, "library": {}, - "locale": "en", "logging": { "format": "text", "level": "info" diff --git a/internal/cli/configuration/defaults.go b/internal/cli/configuration/defaults.go index a810265785a..40f8b472cdb 100644 --- a/internal/cli/configuration/defaults.go +++ b/internal/cli/configuration/defaults.go @@ -73,7 +73,7 @@ func SetDefaults(settings *Settings) { setKeyTypeSchema("network.user_agent_ext", "") // locale - setDefaultValueAndKeyTypeSchema("locale", "en") + setKeyTypeSchema("locale", "") } // InjectEnvVars change settings based on the environment variables values diff --git a/internal/integrationtest/config/config_test.go b/internal/integrationtest/config/config_test.go index 6e57eebf72f..caf82d03934 100644 --- a/internal/integrationtest/config/config_test.go +++ b/internal/integrationtest/config/config_test.go @@ -931,3 +931,16 @@ func TestConfigViaEnvVars(t *testing.T) { require.NoError(t, err) require.Equal(t, "20\n\n", string(out)) } + +func TestI18N(t *testing.T) { + env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) + defer env.CleanUp() + + out, _, err := cli.RunWithCustomEnv(map[string]string{"LANG": "it"}) + require.NoError(t, err) + require.Contains(t, string(out), "Comandi disponibili") + + out, _, err = cli.RunWithCustomEnv(map[string]string{"LANG": "en"}) + require.NoError(t, err) + require.Contains(t, string(out), "Available Commands") +}