You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[breaking] Pass user locale preference directly to i18n package (#1365)
The user can configure their locale preference via the `locale` configuration key. This information is given priority by
the `github.com/arduino/arduino-cli/configuration` package over the automatically detected locale.
Previously, the `i18n` package got the configuration setting from the `github.com/arduino/arduino-cli/configuration`
package, but this will result in an import cycle when the `i18n` package is used to enable translation of the output
strings of the `configuration` package.
To avoid this, the caller now reads the configuration and passes the locale code to the `i18n` package via its `Init`
function:
i18n.Init("it")
The argument can be omitted if only automated locale detection is needed:
i18n.Init()
0 commit comments