Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 84fc413

Browse files
authoredDec 11, 2024··
Expose golang fqbn package for public use (#2768)
* Made FQBN parsing package public Because it may turn out useful for other projects. * 100% test coverage * Precompile validation regexp * Remove logrus dependency from i18n * Isolate locale-handling functions from i18n interface This changes allows to make a clean i18n package (without dependency on a specific implementation of the translation package) that, in turn, allows to export packages that internally use i18n with the minimal dependency load. * updated doc
1 parent ca446af commit 84fc413

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+296
-215
lines changed
 

‎Taskfile.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,24 +309,24 @@ tasks:
309309
i18n:update:
310310
desc: Updates i18n files
311311
cmds:
312-
- go run ./internal/i18n/cmd/main.go catalog generate . > ./internal/i18n/data/en.po
312+
- go run ./internal/locales/cmd/main.go catalog generate . > ./internal/locales/data/en.po
313313

314314
i18n:pull:
315315
desc: Pull i18n files from transifex
316316
cmds:
317-
- go run ./internal/i18n/cmd/main.go transifex pull ./internal/i18n/data
317+
- go run ./internal/locales/cmd/main.go transifex pull ./internal/locales/data
318318

319319
i18n:push:
320320
desc: Push i18n files to transifex
321321
cmds:
322-
- go run ./internal/i18n/cmd/main.go transifex push ./internal/i18n/data
322+
- go run ./internal/locales/cmd/main.go transifex push ./internal/locales/data
323323

324324
i18n:check:
325325
desc: Check if the i18n message catalog was updated
326326
cmds:
327327
- task: i18n:pull
328-
- git add -N ./internal/i18n/data
329-
- git diff --exit-code ./internal/i18n/data
328+
- git add -N ./internal/locales/data
329+
- git diff --exit-code ./internal/locales/data
330330

331331
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-mkdocs-task/Taskfile.yml
332332
website:check:

‎commands/instances.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
"github.com/arduino/arduino-cli/internal/arduino/sketch"
3939
"github.com/arduino/arduino-cli/internal/arduino/utils"
4040
"github.com/arduino/arduino-cli/internal/i18n"
41+
"github.com/arduino/arduino-cli/internal/locales"
4142
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
4243
paths "github.com/arduino/go-paths-helper"
4344
"github.com/sirupsen/logrus"
@@ -420,7 +421,7 @@ func (s *arduinoCoreServerImpl) Init(req *rpc.InitRequest, stream rpc.ArduinoCor
420421
// language of the CLI if the locale is different
421422
// after started.
422423
if locale, ok, _ := s.settings.GetStringOk("locale"); ok {
423-
i18n.Init(locale)
424+
locales.Init(locale)
424425
}
425426

426427
return nil

0 commit comments

Comments
 (0)
Please sign in to comment.