Hello,
is it possible to install Arduino in French directly, or to configure it after installation? I can't find anything in the registry...
tis-arduino package in French
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Hello,
Here is a good idea (source: https://support.arduino.cc/hc/en-us/art ... rduino-IDE):
you can edit the preferences.txt file directly.
Close Arduino IDE.
Open the Arduino15 folder.
Open preferences.txt.
Find the editor.languages.current line.
Edit the value to read editor.languages.current=en.
Save the file.
Open Arduino IDE to see the changes.
Here is a good idea (source: https://support.arduino.cc/hc/en-us/art ... rduino-IDE):
you can edit the preferences.txt file directly.
Close Arduino IDE.
Open the Arduino15 folder.
Open preferences.txt.
Find the editor.languages.current line.
Edit the value to read editor.languages.current=en.
Save the file.
Open Arduino IDE to see the changes.
I couldn't find a preferences.txt file in the Arduino installation folder. But I just discovered that it's located in C:\Users\<user> \.arduinoIDE\arduino-cli.yaml which is modified.
I wanted to try this code:
But the ".arduinoIDE" folder is only created after the software is launched for the first time, so session_setup won't do anything... And what's more, my code is incorrect; I end up with an empty arduino-cli.yaml file 
I wanted to try this code:
Code: Select all
def session_setup():
## Changement de langue du logiciel vers français
settings_arduino = makepath(user_home_directory(),'.arduinoIDE','arduino-cli.yaml')
with open(settings_arduino, "rt") as file:
x = file.read()
with open(settings_arduino, "wt") as file:
x = x.replace("locale: en", "locale: fr")
fin.write(x)
- Attachments
-
- 2023-12-04 15_43_10-C__Users_informatique.DS_.arduinoIDE_arduino-cli.yaml - Notepad++ [Administrator.jpg (51.38 KB) Viewed 13129 times
Good morning,
Why not use a while loop? For example, something like this:
As for modifying the configuration file, I preferred to use a third-party script in AutoIt:
Regards,
Why not use a while loop? For example, something like this:
Code: Select all
import os
def session_setup():
try : # pour la gestion des erreurs
## Changement de langue du logiciel vers français
file_exist = False # initialise la variable file_exist
settings_arduino = makepath(user_home_directory(),'.arduinoIDE','arduino-cli.yaml')
while not file_exist: # boucle qui recommence tant que file_exist n'est pas vrai
if os.pah.exists(settings_arduino): # vérifie si le fichier de configuration existe
with open(settings_arduino, "rt") as file:
x = file.read()
with open(settings_arduino, "wt") as file:
x = x.replace("locale: en", "locale: fr")
fin.write(x)
file_exist = True
print("Le fichier arduino-cli.yaml a été mis à jour )
else :
file_exist = False # renvoi false à la variable file_exist sir le fichier n'éxiste pas
except Exception as e:
print(f"L'erreur suivante s'est produite : {e}")
As for modifying the configuration file, I preferred to use a third-party script in AutoIt:
Code: Select all
#include <FileConstants.au3>
#include <File.au3>
#include <StringConstants.au3>
Local $file_path = @UserProfileDir & "\.arduinoIDE\arduino-cli.yaml"
Local $yaml_file = @UserProfileDir & "\.arduinoIDE\arduino-cli.yaml"
Local $proxy_line = "proxy: ********************"
Local $file_exists = False
While (Not $file_exists)
If FileExists($file_path) Then
$file_exists = True
; Boucle pour tester si le proxy est présent
While StringInStr(FileRead($yaml_file), $proxy_line) = 0
; Ajout du proxy
FileWriteLine($yaml_file, "network:")
FileWriteLine($yaml_file, " proxy: **************************")
Sleep(1000) ; Attendre 1 seconde
WEnd
Else
Sleep(1000) ; Attendre 1 seconde
EndIf
WEnd- dcardon
- WAPT Expert
- Messages: 1929
- Registration: June 18, 2014 - 09:58
- Location: Saint Sébastien sur Loire
- Contact :
Hello everyone,
@gaelds I tested modifying the arduino-cli.yaml file automatically, but it doesn't seem to have any impact (but I can confirm that this file is indeed modified when there's a change in the GUI, but there are lots of other things that are copied at the same time too...
@Benoit, using autoit is not recommended; the Python part allows you to handle exceptions and other scenarios.
@Benoit, using a while loop is not recommended because it's more error-prone (in case of exceptions, etc.)
After spending half an hour with this software, I'm rather appalled by the poor (or nonexistent) packaging. The system-wide installation is a joke; the software copies everything into the user directory on first launch, a bit like:
And of course it doesn't work in AppLocker or SRP environments (as some say, "security is for the weak", they've clearly never seen ransomware at Arduino...).
There is no global configuration file, and the driver pre-loading is unreliable to say the least; blocking automatic updates should be included in a future version...
I have a colleague at the office who installed it on his son's machine yesterday (a recycled PC), the installation and launch took more than ten minutes, he went straight back to the latest version 1.x.
In short, I think Arduino does not want to be deployed in schools.
Sincerely,
Denis
@gaelds I tested modifying the arduino-cli.yaml file automatically, but it doesn't seem to have any impact (but I can confirm that this file is indeed modified when there's a change in the GUI, but there are lots of other things that are copied at the same time too...
@Benoit, using autoit is not recommended; the Python part allows you to handle exceptions and other scenarios.
@Benoit, using a while loop is not recommended because it's more error-prone (in case of exceptions, etc.)
After spending half an hour with this software, I'm rather appalled by the poor (or nonexistent) packaging. The system-wide installation is a joke; the software copies everything into the user directory on first launch, a bit like:
- a little bit in %HOMEPATH%/.arduinoIDE
- a little bit in %APPDATA%\roaming\arduino IDE
- a little bit in %APPDATA%\roaming\arduino-ide
- a lot in %APPDATA%\local\Arduino15 (>400MB)
- a lot in %APPDATA%\local\arduino-ide-updater (>130MB, just for the updater which we didn't originally want...)
And of course it doesn't work in AppLocker or SRP environments (as some say, "security is for the weak", they've clearly never seen ransomware at Arduino...).
There is no global configuration file, and the driver pre-loading is unreliable to say the least; blocking automatic updates should be included in a future version...
I have a colleague at the office who installed it on his son's machine yesterday (a recycled PC), the installation and launch took more than ten minutes, he went straight back to the latest version 1.x.
In short, I think Arduino does not want to be deployed in schools.
Sincerely,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
- dcardon
- WAPT Expert
- Messages: 1929
- Registration: June 18, 2014 - 09:58
- Location: Saint Sébastien sur Loire
- Contact :
Hi Geoffroy,
if this is a GPO for the initial Arduino 2 configuration, could you explain how you set up your GPO? Perhaps we could use session_setup()? I haven't been able to do it consistently, so if you have the details of the steps involved, I'd appreciate it
!
Best regards,
Denis
if this is a GPO for the initial Arduino 2 configuration, could you explain how you set up your GPO? Perhaps we could use session_setup()? I haven't been able to do it consistently, so if you have the details of the steps involved, I'd appreciate it
Best regards,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
-
olaplanche
- Messages: 178
- Registration: January 26, 2017 - 11:11
I'm sharing my SRP-compatible arduino-ide package, with auto-update disabled and French as the default language:
Prerequisites:
* Configure the software in French for the first time, then copy the folder below to the root of the package:
Sincerely
Prerequisites:
* Configure the software in French for the first time, then copy the folder below to the root of the package:
* Create an unrestricted SRP on the folder "%AllUsersProfile%\Arduino15"C:\Users\%username%\AppData\Roaming\arduino-ide\Local Storage\leveldb
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_name_string = 'arduino-ide_%s_Windows_64bit.msi'
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = bin_name_string % package_version
all_user_data = makepath(programdata,'Arduino15')
# Installing the software
install_msi_if_needed(bin_name,
properties='/qn ALLUSERS=1',
timeout=1200
)
print('Restricting permissions on %s' % all_user_data)
if not isdir(all_user_data):
mkdirs(all_user_data)
run(r'icacls "%s" /t /grant *S-1-5-21-3299883279-2723331061-yyyyyyyyyy-xxxx:(OI)(CI)M' % all_user_data) # groupe AD ELEVES (Get-ADGroup -Identity ELEVES | select Name, SID)
run(r'icacls "%s" /t /grant *S-1-5-21-3299883279-2723331061-yyyyyyyyyy-xxxx:(OI)(CI)M' % all_user_data) # groupe AD PROFESSEUR (Get-ADGroup -Identity PROFESSEUR | select Name, SID)
print('Add Windows Firewall rules')
add_netfirewallrule(r"Arduino IDE", r"C:\program files\Arduino-IDE\Arduino IDE.exe", profile="Domain")
add_netfirewallrule(r"mdns-discovery", r"C:\ProgramData\arduino15\packages\builtin\tools\mdns-discovery\1.0.9\mdns-discovery.exe", profile="Domain")
# Installing Arduino IDE user settings
print('Copying Arduino IDE user settings to %s' % all_user_data)
copytree2("leveldb","%s\leveldb" % all_user_data)
def session_setup():
import tempfile
# Declaring local variables
all_user_data = makepath(programdata,'Arduino15')
# Set Arduino CLI language fr and librairies/data/downloads paths
pathfile = makepath(tempfile.gettempdir(),'arduino-cli.yaml')
currentuser = get_current_user()
configpath = makepath(r'c:\users',currentuser,'.arduinoIDE')
datafile = r"""board_manager:
additional_urls: []
daemon:
port: "50051"
directories:
builtin:
libraries: C:\ProgramData\Arduino15\libraries
data: C:\ProgramData\Arduino15
downloads: C:\ProgramData\Arduino15\staging
user: C:\Users\%s\Documents\Arduino
library:
enable_unsafe_install: false
locale: fr
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: false
""" % currentuser
fichier = open(pathfile, "w")
fichier.write(datafile)
fichier.close()
mkdirs(configpath)
filecopyto(pathfile,configpath)
remove_file(pathfile)
# Disable Update Notification
pathfile = makepath(tempfile.gettempdir(),'settings.json')
currentuser = get_current_user()
configpath = makepath(r'c:\users',currentuser,'.arduinoIDE')
datafile = r"""{
"window.titleBarStyle": "native",
"arduino.checkForUpdates": false
}
"""
fichier = open(pathfile, "w")
fichier.write(datafile)
fichier.close()
mkdirs(configpath)
filecopyto(pathfile,configpath)
remove_file(pathfile)
# Set Arduino IDE language fr
leveldbpath = makepath(r'c:\users',currentuser,'AppData','Roaming','arduino-ide','Local Storage','leveldb')
if not isdir(leveldbpath):
mkdirs(leveldbpath)
copytree2("%s\leveldb" % all_user_data,leveldbpath)
def uninstall():
print('Uninstalling all_user_data')
remove_tree(makepath(programdata,'Arduino15'))
print('Uninstalling Windows Firewall rules')
remove_netfirewallrule("Arduino IDE")
remove_netfirewallrule("mdns-discovery")- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
-
olaplanche
- Messages: 178
- Registration: January 26, 2017 - 11:11
When I get tired of my current position, I'll let you know 
- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
