The Wayback Machine - https://web.archive.org/web/20210911024034/https://github.com/arduino/arduino-cli/pull/1370
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

Expand i18n coverage to all relevant strings #1370

Merged
merged 2 commits into from Aug 5, 2021
Merged

Conversation

@per1234
Copy link
Contributor

@per1234 per1234 commented Jul 28, 2021

Please check if the PR fulfills these requirements

  • 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)
  • What kind of change does this PR introduce?

Enhancement

  • What is the current behavior?

Although an effective internationalization (AKA "i18n") framework is already in place in the Arduino CLI code base (#676), the actual coverage of the interface's strings is very minimal, intended only to serve as an initial proof of concept to evaluate the system.

  • What is the new behavior?

This provides internationalization of the strings of the Arduino CLI code base. It will now be possible to completely
translate the primary Arduino CLI user interface.

No breaking change.

  • Other information:

Scope

We decided that the log messages would be excluded from the internationalization scope for now. The reason is that the addition of these strings would significantly increase the workload on the community translators, while generally being of less visibility and/or importance to the users. Even though on an individual basis there are surely specific log messages of higher importance than specific non-log strings that were internationalized, the log/non-log dichotomy provided an objective criterion for determining which strings were in scope for this initial effort. Perhaps we will expand the i18n coverage at some time in the future after there has been good progress on the initial translation effort.

Notes

Some techniques were employed to facilitate translation:

  • Code references were moved out of internationalized strings in cases where a translator might mistake them for prose and translate them.
  • Indices were added to printf verbs when multiple were present in a string. This allows the translator to easily insert them at the appropriate location in the sentence structure without being required to understand the Go printf syntax and without being restricted to their relative order in the English language source string.
cli/lib/search.go Outdated Show resolved Hide resolved
cli/upload/upload.go Outdated Show resolved Hide resolved
@@ -142,7 +142,7 @@ func identify(pm *packagemanager.PackageManager, port *discovery.Port) ([]*rpc.B
logrus.Debug("Board not recognized")
} else if err != nil {
// this is bad, bail out
return nil, errors.Wrap(err, "error getting board info from Arduino Cloud")
return nil, errors.Wrap(err, tr("error getting board info from Arduino Cloud"))

This comment has been minimized.

@silvanocerza

silvanocerza Aug 5, 2021
Contributor

Should Arduino Cloud be translated? 🤔

This comment has been minimized.

@per1234

per1234 Aug 5, 2021
Author Contributor

My guess is no, but this might be one of those cases where the loss of context in "error getting board info from %s" makes it more difficult for the translator to interpret the meaning?

I'm not really sure. I am not sufficiently experienced in this area to be able to make judgements at this level.

commands/board/list.go Outdated Show resolved Hide resolved
commands/upload/upload.go Outdated Show resolved Hide resolved
@per1234 per1234 force-pushed the per1234:expand-i18n branch from 8437f5e to 1a407a0 Aug 5, 2021
This provides internationalization of the strings of the Arduino CLI code base. It will now be possible to completely
translate the primary Arduino CLI user interface.

We decided that the log messages would be excluded from the internationalization scope for now. The reason is that the
addition of these strings would significantly increase the workload on the community translators, while generally being
of less visibility and/or importance to the users. Even though on an individual basis there are surely specific log
messages of higher importance than specific non-log strings that were internationalized, the log/non-log dichotomy
provided an objective criterion for determining which strings were in scope for this initial effort. Perhaps we will
expand the i18n coverage at some time in the future after there has been good progress on the initial translation effort.

Some techniques were employed to facilitate translation:

- Code references were moved out of strings in cases where a translator might mistake them for prose and translate them.
- Indices were added to printf verbs when multiple were present in a string. This allows the translator to easily insert
  them at the appropriate location in the sentence structure without being required to understand the Go printf syntax
  and without being restricted to their relative order in the English language source string.

Co-authored-by: Silvano Cerza <[email protected]>
@per1234 per1234 force-pushed the per1234:expand-i18n branch from 1a407a0 to a9a6455 Aug 5, 2021
@per1234 per1234 merged commit e31a717 into arduino:master Aug 5, 2021
7 checks passed
7 checks passed
@github-actions
verify-links
Details
@github-actions
test-matrix (ubuntu-20.04)
Details
@github-actions
validate
Details
@github-actions
test-matrix (windows-latest)
Details
@github-actions
test-matrix (macOS-latest)
Details
@github-actions
create-test-artifacts
Details
license/cla Contributor License Agreement is signed.
Details
@per1234 per1234 deleted the per1234:expand-i18n branch Aug 5, 2021
@silvanocerza silvanocerza mentioned this pull request Aug 9, 2021
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants