Skip to content

Commit 503457b

Browse files
cmaglieper1234
andcommitted
Apply suggestions from code review
Co-authored-by: per1234 <[email protected]>
1 parent 49e64ff commit 503457b

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

cli/upload/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func NewCommand() *cobra.Command {
6868

6969
func checkFlagsConflicts(command *cobra.Command, args []string) {
7070
if importFile != "" && importDir != "" {
71-
feedback.Errorf(tr("error: %[1]s and %[2]s flags cannot be used together", "--input-file", "--input-dir"))
71+
feedback.Errorf(tr("error: %s and %s flags cannot be used together", "--input-file", "--input-dir"))
7272
os.Exit(errorcodes.ErrBadArgument)
7373
}
7474
}

commands/upload/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ func determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sk
526526
// Case 1: importFile flag has been specified
527527
if importFile != "" {
528528
if importDir != "" {
529-
return nil, "", fmt.Errorf(tr("%[1]s and %[2]s cannot be used together", "importFile", "importDir"))
529+
return nil, "", fmt.Errorf(tr("%s and %s cannot be used together", "importFile", "importDir"))
530530
}
531531

532532
// We have a path like "path/to/my/build/SketchName.ino.bin". We are going to

i18n/data/en.po

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ msgstr ""
55
msgid "%[1]s %[2]s Version: %[3]s Commit: %[4]s Date: %[5]s"
66
msgstr "%[1]s %[2]s Version: %[3]s Commit: %[4]s Date: %[5]s"
77

8-
#: commands/upload/upload.go:529
9-
msgid "%[1]s and %[2]s cannot be used together"
10-
msgstr "%[1]s and %[2]s cannot be used together"
11-
128
#: legacy/builder/fail_if_imported_library_is_wrong.go:37
139
msgid "%[1]s folder is no longer supported! See %[2]s for more information"
1410
msgstr "%[1]s folder is no longer supported! See %[2]s for more information"
@@ -37,6 +33,10 @@ msgstr "%[1]s, protocol version: %[2]d"
3733
msgid "%s already downloaded"
3834
msgstr "%s already downloaded"
3935

36+
#: commands/upload/upload.go:529
37+
msgid "%s and %s cannot be used together"
38+
msgstr "%s and %s cannot be used together"
39+
4040
#: cli/output/rpc_progress.go:76
4141
msgid "%s downloaded"
4242
msgstr "%s downloaded"
@@ -133,8 +133,8 @@ msgid "Already installed %s"
133133
msgstr "Already installed %s"
134134

135135
#: legacy/builder/resolve_library.go:34
136-
msgid "Alternatives for %s:"
137-
msgstr "Alternatives for %s:"
136+
msgid "Alternatives for %[1]s: %[2]s"
137+
msgstr "Alternatives for %[1]s: %[2]s"
138138

139139
#: cli/lib/search.go:171
140140
msgid "Architecture: %s"
@@ -2560,8 +2560,8 @@ msgid "error querying Arduino Cloud Api"
25602560
msgstr "error querying Arduino Cloud Api"
25612561

25622562
#: cli/upload/upload.go:71
2563-
msgid "error: %[1]s and %[2]s flags cannot be used together"
2564-
msgstr "error: %[1]s and %[2]s flags cannot be used together"
2563+
msgid "error: %s and %s flags cannot be used together"
2564+
msgstr "error: %s and %s flags cannot be used together"
25652565

25662566
#: arduino/resources/install.go:67
25672567
msgid "extracting archive: %s"
@@ -3075,10 +3075,6 @@ msgstr "reading package root dir: %s"
30753075
msgid "reading sketch metadata %[1]s: %[2]s"
30763076
msgstr "reading sketch metadata %[1]s: %[2]s"
30773077

3078-
#: legacy/builder/wipeout_build_path_if_build_options_changed.go:49
3079-
msgid "rebuilding all"
3080-
msgstr "rebuilding all"
3081-
30823078
#: commands/upload/upload.go:472
30833079
msgid "recipe not found '%s'"
30843080
msgstr "recipe not found '%s'"
@@ -3313,6 +3309,10 @@ msgstr "writing sketch metadata %[1]s: %[2]s"
33133309
msgid "wrong format in server response"
33143310
msgstr "wrong format in server response"
33153311

3312+
#: legacy/builder/wipeout_build_path_if_build_options_changed.go:49
3313+
msgid "{0} invalid, rebuilding all"
3314+
msgstr "{0} invalid, rebuilding all"
3315+
33163316
#: legacy/builder/builder_utils/utils.go:323
33173317
#: legacy/builder/builder_utils/utils.go:329
33183318
#: legacy/builder/builder_utils/utils.go:393

i18n/rice-box.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

legacy/builder/resolve_library.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func ResolveLibrary(ctx *types.Context, header string) *libraries.Library {
3131

3232
logger := ctx.GetLogger()
3333
if ctx.Verbose {
34-
logger.Println(constants.LOG_LEVEL_INFO, tr("Alternatives for %s:", header), candidates)
34+
logger.Println(constants.LOG_LEVEL_INFO, tr("Alternatives for %[1]s: %[2]s", header, candidates))
3535
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf("ResolveLibrary(%s)", header))
3636
logger.Println(constants.LOG_LEVEL_INFO, fmt.Sprintf(" -> %s: %s", tr("candidates"), candidates))
3737
}

legacy/builder/wipeout_build_path_if_build_options_changed.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (s *WipeoutBuildPathIfBuildOptionsChanged) Run(ctx *types.Context) error {
4646

4747
var prevOpts *properties.Map
4848
if err := json.Unmarshal([]byte(previousBuildOptionsJson), &prevOpts); err != nil || prevOpts == nil {
49-
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, ", "+tr("rebuilding all"), constants.BUILD_OPTIONS_FILE)
49+
ctx.GetLogger().Println(constants.LOG_LEVEL_DEBUG, tr("{0} invalid, rebuilding all"), constants.BUILD_OPTIONS_FILE)
5050
return doCleanup(ctx.BuildPath)
5151
}
5252

0 commit comments

Comments
 (0)