Compare commits

..

6 Commits

Author SHA1 Message Date
Giacomo Cusinato
ad6df0d9e4 just a log 2025-11-05 18:32:06 +01:00
502E532E
93d27ea72a feat: add a copy button to serial monitor (#2718)
* Add a copy output button to serial monitor

If the arduino collects some data that you want to store on your
computer, a rather simple way is to write it to the serial monitor and
copy it to the clipboard. This commit introduces a button that copies
the whole content of the serial monitor to the clipboard to make this
rather simple. It is a new component added to the menu, and does not
change the behaviour of other compontents.

* Test merging lines to str in serial monitor utils

Adds a test for merging one or more lines to a single string. It is
supposed to just concatenate the content of the lines, without doing
anything else. This method is used when copying the serial monitor content to
the clipboard.

* Add copy output translation key

This serves as an addition to the previous commits. It is the result of
running `yarn i18n:generate` on the state after adding the copy output
button to the serial monitor (see 2df3f465). I hope that this will
resolve the current Github action failure.

* Improve readability for serial monitor utils

Replace return statement in inline method by direct statement, some
minor formatting changes. Does not affect the functionality.

* Rename linesToMergedStr in monitor-utils

Renames the method linesToMergedStr to joinLines in the serial monitor
utils. This brings the name more in line with truncateLines. No
functionality changes.

* Move label and icon registration for copy serial

Moves the registration of the label and icon for the copy output
button of the serial monitor to the toolbar item registration. Before,
it happened at the command registration, but is not necessary at this
level, as the icon and label are meant for the toolbar button only.

* Do not update widget when copying output

No longer updates the serial monitor output after its content is copied.
Copying the content does not change anything for the view, so there is
no need to update.
2025-11-05 16:56:04 +01:00
per1234
155f0aebaf Remove donation links from contributor guide
The Arduino company is no longer soliciting monetary donations. Community members who wish to contribute to the project
still have opportunities to do so via the other options listed here.
2025-10-10 21:56:12 -07:00
dependabot[bot]
3d8f3fa3e3 build(deps): Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 19:07:28 -07:00
dependabot[bot]
c1e5fbc8a5 build(deps): Bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 00:47:17 -07:00
Per Tillisch
ee4f74d566 Document localization capabilities in Translator Guide
The system used for localization of this project leverages the infrastructure and data that already exists for VS Code.
These assets are applicable to Arduino IDE 2.x due to the project being built on the Eclipse Theia IDE framework. In
this way, the Arduino IDE developers and community are only responsible for internationalization and localization of the
Arduino-specific strings (e.g., "Sketchbook") used in the IDE's UI.

The unfortunate downside to this approach is that there is a hard technical limit on localization of the project to
languages for which a VS Code "language pack" is available.

It will be helpful to clearly communicate the set of languages for which we are able to ship contributions from
translators.

Likewise, it will be useful to also communicate that, we are able to ship contributions of translations of Arduino CLI
user interface strings for any language. This is due to the fact that the Arduino CLI codebase uses a completely
different internationalization system that does not impose any technical limits on the scope of localization.
2025-07-15 19:32:12 -07:00
22 changed files with 145 additions and 54 deletions

View File

@@ -16,7 +16,7 @@ on:
- 'static/**'
- '*.md'
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
- '[0-9]+.[0-9]+.[0-9]+*'
workflow_dispatch:
inputs:
paid-runners:
@@ -133,22 +133,11 @@ env:
name: macOS_arm64_dmg
- path: '*macOS_arm64.zip'
name: macOS_arm64_zip
- config:
name: ARM Ubuntu 22.04
runs-on: ubuntu-22.04-arm
container: |
null
job-transfer-artifact-suffix: ARM_64bit
mergeable-channel-file: 'true'
artifacts:
- path: '*Linux_arm64.zip'
name: Linux_arm64_zip
- path: '*Linux_arm64.AppImage'
name: Linux_arm64_app_image
PAID_RUNNER_BUILD_DATA: |
# This system was implemented to allow selective use of paid GitHub-hosted runners, due to the Apple Silicon runner
# incurring a charge at that time. Free Apple Silicon runners are now available so the configuration was moved to
# `BASE_BUILD_DATA`, but the system was left in place for future use.
jobs:
run-determination:
runs-on: ubuntu-latest
@@ -171,7 +160,9 @@ jobs:
# There is no need to run the other jobs.
RESULT="false"
fi
echo "result=$RESULT" >> $GITHUB_OUTPUT
build-type-determination:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
@@ -208,11 +199,13 @@ jobs:
is_nightly="false"
channel_name="nightly"
fi
echo "is-release=$is_release" >> $GITHUB_OUTPUT
echo "is-nightly=$is_nightly" >> $GITHUB_OUTPUT
echo "channel-name=$channel_name" >> $GITHUB_OUTPUT
# Only attempt upload to Amazon S3 if the credentials are available.
echo "publish-to-s3=${{ secrets.AWS_ROLE_ARN != '' }}" >> $GITHUB_OUTPUT
select-targets:
needs: build-type-determination
runs-on: ubuntu-latest
@@ -239,6 +232,7 @@ jobs:
--output-format json \
'[.[].config]'
)"
artifact_matrix="$(
(
echo "${{ env.BASE_BUILD_DATA }}";
@@ -248,9 +242,11 @@ jobs:
--output-format json \
'map(.artifacts[] + (.config | pick(["job-transfer-artifact-suffix"])))'
)"
# The build matrix produces two macOS jobs (x86 and ARM) so the "channel update info files"
# generated by each must be merged.
merge_channel_files="true"
else
build_matrix="$(
echo "${{ env.BASE_BUILD_DATA }}" | \
@@ -258,25 +254,31 @@ jobs:
--output-format json \
'[.[].config]'
)"
artifact_matrix="$(
echo "${{ env.BASE_BUILD_DATA }}" | \
yq \
--output-format json \
'map(.artifacts[] + (.config | pick(["job-transfer-artifact-suffix"])))'
)"
merge_channel_files="false"
fi
# Set workflow step outputs.
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
delimiter="$RANDOM"
echo "build-matrix<<$delimiter" >> $GITHUB_OUTPUT
echo "$build_matrix" >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
delimiter="$RANDOM"
echo "artifact-matrix<<$delimiter" >> $GITHUB_OUTPUT
echo "$artifact_matrix" >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
echo "merge-channel-files=$merge_channel_files" >> $GITHUB_OUTPUT
build:
name: build (${{ matrix.config.name }})
needs:
@@ -288,7 +290,7 @@ jobs:
# to skip passing signing credentials to electron-builder
IS_WINDOWS_CONFIG: ${{ matrix.config.name == 'Windows' }}
INSTALLER_CERT_WINDOWS_CER: "/tmp/cert.cer"
# We are hardcoding the path for signtool because it is not present on the Windows PATH env var by default.
# We are hardcoding the path for signtool because is not present on the windows PATH env var by default.
# Keep in mind that this path could change when upgrading to a new runner version
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }}
@@ -308,17 +310,15 @@ jobs:
timeout-minutes: 90
steps:
- name: Install Chromium (ARM only)
if: matrix.config.name == 'ARM Ubuntu 22.04'
run: sudo apt-get update && sudo apt-get install -y chromium-browser
- name: Symlink custom working directory
shell: cmd
if: runner.os == 'Windows' && matrix.config.working-directory
run: |
if not exist "${{ matrix.config.working-directory }}" mklink /d "${{ matrix.config.working-directory }}" "C:\actions-runner\_work\arduino-ide\arduino-ide"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Node.js
if: runner.name != 'WINDOWS-SIGN-PC'
@@ -337,6 +337,7 @@ jobs:
install \
--global \
"yarn@${{ env.YARN_VERSION }}"
- name: Install Python 3.x
if: fromJSON(matrix.config.container) == null && runner.name != 'WINDOWS-SIGN-PC'
uses: actions/setup-python@v5
@@ -376,12 +377,15 @@ jobs:
export CSC_KEY_PASSWORD="${{ secrets[matrix.config.certificate-password-secret] }}"
export CSC_FOR_PULL_REQUEST=true
fi
npx node-gyp install
yarn install
yarn --cwd arduino-ide-extension build
yarn --cwd electron-app rebuild
yarn --cwd electron-app build
yarn --cwd electron-app package
# Both macOS jobs generate a "channel update info file" with same path and name. The second job to complete would
# overwrite the file generated by the first in the workflow artifact.
- name: Stage channel file for merge
@@ -395,9 +399,11 @@ jobs:
mv \
"${{ env.BUILD_ARTIFACTS_PATH }}/${{ needs.build-type-determination.outputs.channel-name }}-mac.yml" \
"${staged_channel_files_path}/${{ needs.build-type-determination.outputs.channel-name }}-mac-${{ runner.arch }}.yml"
# Set workflow environment variable for use in other steps.
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
echo "STAGED_CHANNEL_FILES_PATH=$staged_channel_files_path" >> "$GITHUB_ENV"
- name: Upload staged-for-merge channel file artifact
uses: actions/upload-artifact@v4
if: >
@@ -419,6 +425,7 @@ jobs:
shell: cmd
run: |
rmdir /s /q "${{ matrix.config.working-directory }}\${{ env.BUILD_ARTIFACTS_PATH }}"
merge-channel-files:
needs:
- build-type-determination
@@ -432,11 +439,12 @@ jobs:
run: |
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
echo "CHANNEL_FILES_PATH=${{ runner.temp }}/channel-files" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Download staged-for-merge channel file artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
merge-multiple: true
path: ${{ env.CHANNEL_FILES_PATH }}
@@ -470,6 +478,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- name: Install dependencies
run: yarn
@@ -479,6 +488,7 @@ jobs:
./scripts/merge-channel-files.js \
--channel "${{ needs.build-type-determination.outputs.channel-name }}" \
--input "${{ env.CHANNEL_FILES_PATH }}"
- name: Upload merged channel files job transfer artifact
uses: actions/upload-artifact@v4
with:
@@ -503,7 +513,7 @@ jobs:
steps:
- name: Download job transfer artifact that contains ${{ matrix.artifact.name }} tester build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}${{ matrix.artifact.job-transfer-artifact-suffix }}
path: ${{ env.BUILD_ARTIFACTS_FOLDER }}
@@ -523,7 +533,7 @@ jobs:
BODY: ${{ steps.changelog.outputs.BODY }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0 # To fetch all history for all branches and tags.
@@ -545,13 +555,16 @@ jobs:
fi
fi
echo -e "$BODY"
# Set workflow step output
# See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
DELIMITER="$RANDOM"
echo "BODY<<$DELIMITER" >> $GITHUB_OUTPUT
echo "$BODY" >> $GITHUB_OUTPUT
echo "$DELIMITER" >> $GITHUB_OUTPUT
echo "$BODY" > CHANGELOG.txt
- name: Upload changelog job transfer artifact
if: needs.build-type-determination.outputs.is-nightly == 'true'
uses: actions/upload-artifact@v4
@@ -587,7 +600,7 @@ jobs:
steps:
- name: Download all job transfer artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
merge-multiple: true
path: ${{ env.ARTIFACTS_FOLDER }}
@@ -602,6 +615,7 @@ jobs:
- name: Publish Nightly [S3]
run: |
aws s3 sync ${{ env.ARTIFACTS_FOLDER }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide/nightly
release:
needs:
- build-type-determination
@@ -629,7 +643,7 @@ jobs:
steps:
- name: Download all job transfer artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
merge-multiple: true
path: ${{ env.ARTIFACTS_FOLDER }}
@@ -639,6 +653,7 @@ jobs:
id: tag_name
run: |
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Publish Release [GitHub]
uses: svenstaro/upload-release-action@2.9.0
with:
@@ -660,6 +675,7 @@ jobs:
if: needs.build-type-determination.outputs.publish-to-s3 == 'true'
run: |
aws s3 sync ${{ env.ARTIFACTS_FOLDER }} s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-ide
clean:
# This job must run after all jobs that use the transfer artifact.
needs:

View File

@@ -40,7 +40,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Build and push to local registry
uses: docker/build-push-action@v6

View File

@@ -56,7 +56,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Node.js 18.17
uses: actions/setup-node@v4

View File

@@ -65,7 +65,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4

View File

@@ -64,7 +64,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4

View File

@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v4

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Node.js 18.17
uses: actions/setup-node@v4

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Node.js 18.17
uses: actions/setup-node@v4

View File

@@ -43,7 +43,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Log in to the Container registry
uses: docker/login-action@v3

View File

@@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Download JSON schema for labels configuration file
id: download-schema
@@ -106,10 +106,10 @@ jobs:
echo "flag=--dry-run" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Download configuration file artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
merge-multiple: true
pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*

View File

@@ -79,11 +79,10 @@ jobs:
- macos-latest
- ubuntu-latest
- windows-latest
- ubuntu-22.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Node.js
uses: actions/setup-node@v4

View File

@@ -46,9 +46,9 @@ See [**the contributor guide**](docs/CONTRIBUTING.md#contributor-guide) for more
See the [**development guide**](docs/development.md) for a technical overview of the application and instructions for building the code.
## Donations
### Support the project
This open source code was written by the Arduino team and is maintained on a daily basis with the help of the community. We invest a considerable amount of time in development, testing and optimization. Please consider [donating](https://www.arduino.cc/en/donate/) or [sponsoring](https://github.com/sponsors/arduino) to support our work, as well as [buying original Arduino boards](https://store.arduino.cc/) which is the best way to make sure our effort can continue in the long term.
This open source code was written by the Arduino team and is maintained on a daily basis with the help of the community. We invest a considerable amount of time in development, testing and optimization. Please consider [buying original Arduino boards](https://store.arduino.cc/) to support our work on the project.
## License

View File

@@ -44,6 +44,7 @@ export class ConfigServiceClient implements FrontendApplicationContribution {
}
onStart(): void {
console.log('just a test');
this.notificationCenter.onConfigDidChange((config) => this.use(config));
}

View File

@@ -67,3 +67,7 @@ export function truncateLines(
}
return [lines, charCount];
}
export function joinLines(lines: Line[]): string {
return lines.map((line: Line) => line.message).join('');
}

View File

@@ -52,6 +52,9 @@ export namespace SerialMonitor {
},
'vscode/output.contribution/clearOutput.label'
);
export const COPY_OUTPUT = {
id: 'serial-monitor-copy-output',
};
}
}
@@ -149,6 +152,12 @@ export class MonitorViewContribution
'Clear Output'
),
});
registry.registerItem({
id: SerialMonitor.Commands.COPY_OUTPUT.id,
command: SerialMonitor.Commands.COPY_OUTPUT.id,
icon: codicon('copy'),
tooltip: nls.localize('arduino/serial/copyOutput', 'Copy Output'),
});
}
override registerCommands(commands: CommandRegistry): void {
@@ -161,6 +170,15 @@ export class MonitorViewContribution
}
},
});
commands.registerCommand(SerialMonitor.Commands.COPY_OUTPUT, {
isEnabled: (widget) => widget instanceof MonitorWidget,
isVisible: (widget) => widget instanceof MonitorWidget,
execute: (widget) => {
if (widget instanceof MonitorWidget) {
widget.copyOutput();
}
},
});
if (this.toggleCommand) {
commands.registerCommand(this.toggleCommand, {
execute: () => this.toggle(),

View File

@@ -28,6 +28,7 @@ import {
import { MonitorModel } from '../../monitor-model';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { serialMonitorWidgetLabel } from '../../../common/nls';
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
@injectable()
export class MonitorWidget extends ReactWidget {
@@ -47,6 +48,7 @@ export class MonitorWidget extends ReactWidget {
*/
protected closing = false;
protected readonly clearOutputEmitter = new Emitter<void>();
protected readonly copyOutputEmitter = new Emitter<void>();
@inject(MonitorModel)
private readonly monitorModel: MonitorModel;
@@ -56,6 +58,8 @@ export class MonitorWidget extends ReactWidget {
private readonly boardsServiceProvider: BoardsServiceProvider;
@inject(FrontendApplicationStateService)
private readonly appStateService: FrontendApplicationStateService;
@inject(ClipboardService)
private readonly clipboardService: ClipboardService;
private readonly toDisposeOnReset: DisposableCollection;
@@ -102,6 +106,10 @@ export class MonitorWidget extends ReactWidget {
this.clearOutputEmitter.fire(undefined);
this.update();
}
copyOutput(): void {
this.copyOutputEmitter.fire();
}
override dispose(): void {
this.toDisposeOnReset.dispose();
@@ -247,6 +255,8 @@ export class MonitorWidget extends ReactWidget {
monitorModel={this.monitorModel}
monitorManagerProxy={this.monitorManagerProxy}
clearConsoleEvent={this.clearOutputEmitter.event}
copyOutputEvent={this.copyOutputEmitter.event}
clipboardService={this.clipboardService}
height={Math.floor(this.widgetHeight - 50)}
/>
</div>

View File

@@ -3,9 +3,10 @@ import { Event } from '@theia/core/lib/common/event';
import { DisposableCollection } from '@theia/core/lib/common/disposable';
import { areEqual, FixedSizeList as List } from 'react-window';
import dateFormat from 'dateformat';
import { messagesToLines, truncateLines } from './monitor-utils';
import { messagesToLines, truncateLines, joinLines } from './monitor-utils';
import { MonitorManagerProxyClient } from '../../../common/protocol';
import { MonitorModel } from '../../monitor-model';
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
export type Line = { message: string; timestamp?: Date; lineLen: number };
@@ -74,6 +75,9 @@ export class SerialMonitorOutput extends React.Component<
this.props.clearConsoleEvent(() =>
this.setState({ lines: [], charCount: 0 })
),
this.props.copyOutputEvent(() =>
this.props.clipboardService.writeText(joinLines(this.state.lines))
),
this.props.monitorModel.onChange(({ property }) => {
if (property === 'timestamp') {
const { timestamp } = this.props.monitorModel;
@@ -130,6 +134,8 @@ export namespace SerialMonitorOutput {
readonly monitorModel: MonitorModel;
readonly monitorManagerProxy: MonitorManagerProxyClient;
readonly clearConsoleEvent: Event<void>;
readonly copyOutputEvent: Event<void>;
readonly clipboardService: ClipboardService;
readonly height: number;
}

View File

@@ -2,6 +2,7 @@ import { expect } from 'chai';
import {
messagesToLines,
truncateLines,
joinLines,
} from '../../browser/serial/monitor/monitor-utils';
import { Line } from '../../browser/serial/monitor/serial-monitor-send-output';
import { set, reset } from 'mockdate';
@@ -15,6 +16,7 @@ type TestLine = {
charCount: number;
maxCharacters?: number;
};
expectedJoined?: string;
};
const date = new Date();
@@ -22,6 +24,7 @@ const testLines: TestLine[] = [
{
messages: ['Hello'],
expected: { lines: [{ message: 'Hello', lineLen: 5 }], charCount: 5 },
expectedJoined: 'Hello',
},
{
messages: ['Hello', 'Dog!'],
@@ -36,6 +39,7 @@ const testLines: TestLine[] = [
],
charCount: 10,
},
expectedJoined: 'Hello\nDog!'
},
{
messages: ['Dog!'],
@@ -67,6 +71,7 @@ const testLines: TestLine[] = [
{ message: "You're a good boy!", lineLen: 8 },
],
},
expectedJoined: "Hello Dog!\n Who's a good boy?\nYou're a good boy!",
},
{
messages: ['boy?\n', "You're a good boy!"],
@@ -116,6 +121,7 @@ const testLines: TestLine[] = [
{ message: 'Yo', lineLen: 2 },
],
},
expectedJoined: "Hello Dog!\nWho's a good boy?\nYo",
},
];
@@ -165,6 +171,10 @@ describe('Monitor Utils', () => {
});
expect(totalCharCount).to.equal(charCount);
}
if (testLine.expectedJoined) {
const joined_str = joinLines(testLine.expected.lines);
expect(joined_str).to.equal(testLine.expectedJoined);
}
});
});
});

View File

@@ -6,22 +6,20 @@ Thanks for your interest in contributing to this project!
There are several ways you can get involved:
| Type of contribution | Contribution method |
| ----------------------------------------- | -------------------------------------------------------------------------------- |
| - Support<br/>- Question<br/>- Discussion | Post on the [**Arduino Forum**][forum] |
| - Bug report<br/>- Feature request | Issue report (see the guide [**here**][issues]) |
| Testing | Beta testing, PR review (see the guide [**here**][beta-testing]) |
| Translation | See the guide [**here**][translate] |
| - Bug fix<br/>- Enhancement | Pull request (see the guide [**here**][prs]) |
| Monetary | - [Donate][donate]<br/>- [Sponsor][sponsor]<br/>- [Buy official products][store] |
| Type of contribution | Contribution method |
| ----------------------------------------- | ---------------------------------------------------------------- |
| - Support<br/>- Question<br/>- Discussion | Post on the [**Arduino Forum**][forum] |
| - Bug report<br/>- Feature request | Issue report (see the guide [**here**][issues]) |
| Testing | Beta testing, PR review (see the guide [**here**][beta-testing]) |
| Translation | See the guide [**here**][translate] |
| - Bug fix<br/>- Enhancement | Pull request (see the guide [**here**][prs]) |
| Monetary | [Buy official products][store] |
[forum]: https://forum.arduino.cc
[issues]: contributor-guide/issues.md#issue-report-guide
[beta-testing]: contributor-guide/beta-testing.md#beta-testing-guide
[translate]: contributor-guide/translation.md#translator-guide
[prs]: contributor-guide/pull-requests.md#pull-request-guide
[donate]: https://www.arduino.cc/en/donate/
[sponsor]: https://github.com/sponsors/arduino
[store]: https://store.arduino.cc
## Resources

View File

@@ -1,13 +1,41 @@
# Translator Guide
The text of the Arduino IDE interface is translated into several languages. The language can be selected in the dialog opened via **File > Preferences** in the Arduino IDE menus (**Arduino IDE > Preferences** for macOS users).
The text of the Arduino IDE user interface is translated into several languages. The language can be selected in the dialog opened via **File > Preferences** in the Arduino IDE menus (**Arduino IDE > Preferences** for macOS users).
Translating text and improving on existing translations is a valuable contribution to the project, helping make Arduino accessible to everyone.
The translations for the text found in the Arduino IDE come from several sources:
The translations for the text found in Arduino IDE come from several sources:
## Arduino IDE Text
The text of the Arduino IDE application can be translated to the following languages:
- čeština (Czech)
- Deutsch (German)
- Dutch
- español (Spanish)
- français (French)
- italiano (Italian)
- magyar (Hungarian)
- polski (Polish)
- português (Portuguese)
- Türkçe (Turkish)
- български (Bulgarian)
- русский (Russian)
- українська (Ukrainian)
- 한국어 (Korean)
- 中文(简体) (Chinese Simplified)
- 中文(繁體) (Chinese Traditional)
- 日本語 (Japanese)
---
⚠ Unfortunately the 3rd party localization system used by the Arduino IDE application imposes a technical limitation to that set of languages. For this reason, we are unable to add support to Arduino IDE for additional languages (see [`arduino/arduino-ide#1447`](https://github.com/arduino/arduino-ide/issues/1447) for details).
There is no technical limitation on the set of languages to which **Arduino CLI** can be translated. If you would like to contribute translations for a language not on the above list, you are welcome to [contribute to the **Arduino CLI** project](#arduino-cli-text).
---
Translations of Arduino IDE's text is done in the "**Arduino IDE 2.0**" project on the **Transifex** localization platform:
https://explore.transifex.com/arduino-1/ide2/

View File

@@ -435,6 +435,7 @@
"autoscroll": "Autoscroll",
"carriageReturn": "Carriage Return",
"connecting": "Connecting to '{0}' on '{1}'...",
"copyOutput": "Copy Output",
"message": "Message (Enter to send message to '{0}' on '{1}')",
"newLine": "New Line",
"newLineCarriageReturn": "Both NL & CR",