Skip to content
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

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

Merged
merged 6 commits into from
Nov 6, 2024

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 7, 2024

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Fixed incorrect locales detection.

What is the current behavior?

$ LANG=it arduino-cli
Arduino Command Line Interface (arduino-cli).

Usage:
  arduino-cli [command]

Examples:
  arduino-cli <command> [flags...]

Available Commands:
  board           Arduino board commands.
  burn-bootloader Upload the bootloader.
  cache           Arduino cache commands.
  compile         Compiles Arduino sketches.
  completion      Generates completion scripts
  config          Arduino configuration commands.
  core            Arduino core operations.
  daemon          Run the Arduino CLI as a gRPC daemon.
  debug           Debug Arduino sketches.
  help            Help about any command
  lib             Arduino commands about libraries.
  monitor         Open a communication port with a board.
  outdated        Lists cores and libraries that can be upgraded
  sketch          Arduino CLI sketch commands.
  update          Updates the index of cores and libraries
  upgrade         Upgrades installed cores and libraries.
  upload          Upload Arduino sketches.
  version         Shows version number of Arduino CLI.

Flags:
      --additional-urls strings   Comma-separated list of additional URLs for the Boards Manager.
      --config-dir string         Sets the default data directory (Arduino CLI will look for configuration file in this directory).
      --config-file string        The custom config file (if not specified the default will be used).
  -h, --help                      help for arduino-cli
      --json                      Print the output in JSON format.
      --log                       Print the logs on the standard output.
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be: text, json (default "text")
      --log-level string          Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic (default "info")
      --no-color                  Disable colored output.

Use "arduino-cli [command] --help" for more information about a command.

The en version is displayed instead of it

What is the new behavior?

$ LANG=it arduino-cli 
Interfaccia a linea di comando di Arduino (arduino-cli).

Uso: 
  arduino-cli [command]

Esempi:
  arduino-cli <comando> [flag...]

Comandi disponibili:
  board           Comandi delle schede Arduino.
  burn-bootloader Carica il bootloader.
  cache           Comandi della cache Arduino.
  compile         Compila gli sketch di Arduino.
  completion      Genera gli script di completamento
  config          Comandi di configurazione Arduino.
  core            Operazioni core Arduino
  daemon          Avvia la CLI di Arduino come demone gRPC.
  debug           Eseguire il debug degli sketch di Arduino
  help            Help about any command
  lib             Comandi Arduino riguardo le librerie.
  monitor         Apre una porta di comunicazione con una scheda.
  outdated        Elenca i core e le librerie che possono essere aggiornati
  sketch          Comandi degli sketch di Arduino CLI.
  update          Aggiorna l'indice dei core e delle librerie
  upgrade         Aggiorna i core e le librerie installate.
  upload          Carica gli sketch di Arduino.
  version         Mostra il numero di versione di Arduino CLI.

Flag:
      --additional-urls strings   Elenco separato da virgole degli URL aggiuntivi per il Boards Manager.
      --config-dir string         Imposta la directory predefinita dei dati (Arduino CLI cercherà il file di configurazione in questa directory).
      --config-file string        Il file di configurazione personalizzato (se non specificato, verrà utilizzato quello predefinito).
  -h, --help                      help for arduino-cli
      --json                      Stampa l'output in formato JSON.
      --log                       Stampa i log sull'output standard.
      --log-file string           Percorso del file in cui verranno scritti i log.
      --log-format string         Il formato di output dei log può essere: text, json (default "text")
      --log-level string          I messaggi con questo livello o superiore saranno registrati. I livelli validi sono: trace, debug, info, warn, error, fatal, panic (default "info")
      --no-color                  Disable colored output.

Usa "arduino-cli [command] --help"  per ulteriori informazioni su un comando.

Does this PR introduce a breaking change, and is titled accordingly?

Other information

@cmaglie cmaglie self-assigned this Oct 7, 2024
@cmaglie cmaglie added type: imperfection Perceived defect in any part of project topic: CLI Related to the command line interface labels Oct 7, 2024
@cmaglie cmaglie marked this pull request as draft October 7, 2024 16:49
@cmaglie cmaglie marked this pull request as ready for review November 6, 2024 15:12
@cmaglie cmaglie requested a review from umbynos November 6, 2024 15:13
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.55%. Comparing base (7ee4cf7) to head (01e72e3).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
commands/instances.go 0.00% 2 Missing and 1 partial ⚠️
internal/i18n/detect_windows.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2724      +/-   ##
==========================================
- Coverage   67.62%   67.55%   -0.07%     
==========================================
  Files         237      237              
  Lines       22354    22356       +2     
==========================================
- Hits        15116    15103      -13     
- Misses       6048     6063      +15     
  Partials     1190     1190              
Flag Coverage Δ
unit 67.55% <66.66%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmaglie cmaglie merged commit 4d450df into arduino:master Nov 6, 2024
98 checks passed
@cmaglie cmaglie deleted the fix_i18n branch November 6, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to the command line interface type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants