Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed locales (translations) not being detected with default config #2724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
cmaglie merged 6 commits into arduino:master from cmaglie:fix_i18n
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed locales (translations) not being detected with default config
  • Loading branch information
cmaglie committed Nov 6, 2024
commit 1625f0c1cf1d49b94f50b68a08b5104a8fc8e80c
1 change: 0 additions & 1 deletion commands/service_settings_test.go
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func TestGetAll(t *testing.T) {
"user": `+defaultUserDir.GetEncodedValue()+`
},
"library": {},
"locale": "en",
"logging": {
"format": "text",
"level": "info"
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/configuration/defaults.go
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions internal/integrationtest/config/config_test.go
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -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{"LC_ALL": "it"})
require.NoError(t, err)
require.Contains(t, string(out), "Comandi disponibili")

out, _, err = cli.RunWithCustomEnv(map[string]string{"LC_ALL": "en"})
require.NoError(t, err)
require.Contains(t, string(out), "Available Commands")
}

AltStyle によって変換されたページ (->オリジナル) /