Description
Describe the problem
Arduino IDE 2.x has been localized to 17 languages thanks to the amazing work of the community translators.
Output exposed to Arduino IDE users when performing various operations often originates from the strings defined in the Arduino CLI codebase. These strings have also been localized. Arduino CLI must be configured by Arduino IDE to use the locale set in the "Language" field of the Arduino IDE preferences dialog.
By default, the Arduino IDE 2.x user interface is localized to English.
🐛 Arduino IDE 2.x does not configure the Arduino CLI locale by default, so Arduino CLI uses the system locale, resulting in inconsistent localization of the strings shown the Arduino IDE 2.x user interface.
To reproduce
-
Set your system locale to a non-English language that Arduino CLI has significant translation coverage for:
https://explore.transifex.com/arduino-1/arduino-cli/ -
Select File > Quit from the Arduino IDE menus if it is running.
-
Delete the following folders to adequately simulate a fresh installation of Arduino IDE 2.x:
Windows:-
%HOMEPATH%\.arduinoIDE\
(e.g.,
C:\Users\<username>\.arduinoIDE\
) -
%APPDATA%\arduino-ide\
(e.g.,
C:\Users\<user name>\AppData\Roaming\arduino-ide\
)
Linux:
-
~/.arduinoIDE/
-
~/.config/arduino-ide/
macOS:
-
~/.arduinoIDE/
-
~/Library/Application Support/arduino-ide/
-
-
Start Arduino IDE.
🙂 The UI is localized according to the locale set in the "Language" field of the Arduino IDE "Preferences" dialog (which defaults to "English"). -
Compile any sketch for any board.
-
Wait for the compilation to finish.
🐛 The output originating from Arduino CLI in the "Output" view is localized according to the system locale setting. -
Select File > Preferences... from the Arduino IDE menus.
-
Select any language other than "English" from the "Language" menu.
-
Click the OK button.
-
Select File > Preferences... from the Arduino IDE menus.
-
Select "English" from the "Language" menu.
-
Click the OK button.
-
Compile any sketch for any board.
-
Wait for the compilation to finish.
🙂 The output originating from Arduino CLI in the "Output" view is localized according to the locale set in the "Language" field of the Arduino IDE "Preferences" dialog.
Expected behavior
Arduino CLI locale configuration always matches the Arduino IDE locale configuration.
Arduino IDE version
Original report
Last verified with
2.2.1
Operating system
- Linux
- Windows
Operating system version
- Ubuntu 20.04
- Windows 11
Additional context
Arduino CLI locale is configured via the locale
key in the arduino-cli.yaml
configuration file:
https://arduino.github.io/arduino-cli/dev/configuration/
A source of potential confusion is that one of the log entries does show a locale
setting even though none is set in the arduino-cli.yaml
file:
2023-09-12T22:32:49.801Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/per/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/per/Documents/Arduino","additionalUrls":[],"network":"none","locale":"en"}
Originally reported by @CptHolzschnauz at #1614 (comment)
Related
Keywords
-
localization
-
localized
-
l10n
-
internationalization
-
internationalized
-
i18n
-
translate
-
translation
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details