File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Original file line number Diff line number Diff line change @@ -419,7 +419,9 @@ func (s *arduinoCoreServerImpl) Init(req *rpc.InitRequest, stream rpc.ArduinoCor
419
419
// Refreshes the locale used, this will change the
420
420
// language of the CLI if the locale is different
421
421
// after started.
422
- i18n .Init (s .settings .GetString ("locale" ))
422
+ if locale , ok , _ := s .settings .GetStringOk ("locale" ); ok {
423
+ i18n .Init (locale )
424
+ }
423
425
424
426
return nil
425
427
}
Original file line number Diff line number Diff line change @@ -19,20 +19,14 @@ import (
19
19
"context"
20
20
21
21
"github.com/arduino/arduino-cli/internal/cli/configuration"
22
- "github.com/arduino/arduino-cli/internal/i18n"
23
22
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
24
23
"github.com/arduino/arduino-cli/version"
25
24
)
26
25
27
26
// NewArduinoCoreServer returns an implementation of the ArduinoCoreService gRPC service
28
27
// that uses the provided version string.
29
28
func NewArduinoCoreServer () rpc.ArduinoCoreServiceServer {
30
- settings := configuration .NewSettings ()
31
-
32
- // Setup i18n
33
- i18n .Init (settings .Locale ())
34
-
35
- return & arduinoCoreServerImpl {settings : settings }
29
+ return & arduinoCoreServerImpl {settings : configuration .NewSettings ()}
36
30
}
37
31
38
32
type arduinoCoreServerImpl struct {
You can’t perform that action at this time.
0 commit comments