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

Add missing translations #1431

Closed
3 tasks done
kittaakos opened this issue Sep 14, 2022 · 16 comments · Fixed by #1449
Closed
3 tasks done

Add missing translations #1431

kittaakos opened this issue Sep 14, 2022 · 16 comments · Fixed by #1449
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Sep 14, 2022

Describe the problem

The following problems were reported by users:
003
002
001

To reproduce

Open 2.0.0 IDE2, and set the language to non-English.

Expected behavior

All text defined by IDE2/Theia must be translated when a translation exists.


All text defined by IDE2/Theia

Not from the CLI.

Arduino IDE version

2.0.0

Operating system

N/A

Operating system version

n/a

Additional context

Go through the code and add the missing translations.

Keywords

  • localization
  • localized
  • l10n
  • internationalization
  • internationalized
  • i18n
  • translate
  • translation

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 14, 2022
@kittaakos kittaakos self-assigned this Sep 14, 2022
@per1234
Copy link
Contributor

per1234 commented Sep 14, 2022

The equivalent version of Eclipse Theia IDE framework (1.25.0), with the same version of the language pack (vscode-language-pack-zh-hans@1.53.2) has all these strings localized:

image

image

image

@kittaakos
Copy link
Contributor Author

kittaakos commented Sep 14, 2022

Replace in the SIW widget:

Screen Shot 2022-09-14 at 17 02 45

Serial/Network ports from the menus:
Screen Shot 2022-09-14 at 17 04 46

Install/Uninstall
Screen Shot 2022-09-14 at 17 29 44
Screen Shot 2022-09-14 at 17 29 48

Tooltips in SIW and Terminal:
Screen Shot 2022-09-14 at 17 28 11
Screen Shot 2022-09-14 at 17 27 26
Screen Shot 2022-09-14 at 17 27 22
Screen Shot 2022-09-14 at 17 27 16

Board select dialog:
Screen Shot 2022-09-14 at 17 37 01

Context menu item in view containers, such as Debug view:
Screen Shot 2022-09-14 at 17 29 03

@kittaakos
Copy link
Contributor Author

kittaakos commented Sep 14, 2022

Typo in translation keys: succesfullyInstalledPlatform and succesfullyUninstalledPlatform.

succesfully -> successfully

@g-castronovo
Copy link

g-castronovo commented Sep 15, 2022

The following strings are currently missing in en.json source file, therefore they are missing in all langs. It would be cool if we could add them next time or integrate with the older version of Arduino IDE which had them,
Host name, Port number, Username, Password
hhfhf
resources
resourcera
Couldn't open serial plotter
coula

@g-castronovo
Copy link

g-castronovo commented Sep 15, 2022

This string isn't missing 100%. the green button is the same content of the first sentence "Error while burning the bootloader". then for some reasons it's switching to Italian - which is my system operator language. "missing the programmer"? No idea what the source is .....
fff

@g-castronovo
Copy link

g-castronovo commented Sep 15, 2022

Menu bar to search inside the sketch- Find (translation is done but not present in the IDE),(it used to be)
Find in selection it's not inside en.json; "Close (escape)" - this is a weird and not present in the IDE. I swear some of these strings used to be done...
findinselections

@kittaakos
Copy link
Contributor Author

then for some reasons it's switching to Italian

me reasons it's switching to Italian - which is my system operator language. "missing the programmer"? No idea what the source is

The source is the CLI. IDE2 toasts the error message as-is from the CLI. There is a caveat here, IDE2 and CLI language can be configured separately. 🤦

I expect the following is going on:

  • copy error message does have a translation, your IDE2 language is Turkish,
  • the CLI language is Italian (see under ~/arduinoIDE/arduino-cli.yaml, I bet you have locale: it there),
  • and I do not know why it prints Error while burning bootloader instead of Bootloaderı yüklerken hata:

Thank you for reporting it.

@kittaakos
Copy link
Contributor Author

Replace it's not inside en.json, (it used to be) Find in selection it's not inside en.json; "Close (escape)" - this is a weird and not present in the IDE. I swear some of these strings used to be done...

It's logged here #1431 (comment).

@g-castronovo
Copy link

All is translated inside Transifex but not in the IDE
Default and More are missing strings in the en.json
morra

@per1234
Copy link
Contributor

per1234 commented Sep 15, 2022

I swear some of these strings used to be done...

This can be caused by changes to the names of the internationalization keys in the Arduino IDE codebase.

For example, when the typo Akos reported here is fixed in the codebase, the string will go back into an untranslated state on Transifex. Hopefully translation memory can make any re-translations a simple process at least.

@g-castronovo
Copy link

Yes if it is identical, it will automatically filled in! No problem! It's just I cannot find those strings "More" and "Default" aren't' listed anymore inside Transifex. But I could be confused with IDE 2.0 or older IDE1.5 localisation

@kittaakos
Copy link
Contributor Author

kittaakos commented Sep 16, 2022

The equivalent version of Eclipse Theia IDE framework (1.25.0), with the same version of the language pack (vscode-language-pack-zh-hans@1.53.2) has all these strings localized:

For the record, it does not work for me with Theia 1.25.0 and the Chinese language pack manually installed:

Screen Shot 2022-09-16 at 09 10 47


Update: I have downloaded version 1.71.0 instead of 1.53.2. It explains why some translations were missing. See #1431 (comment)

@kittaakos
Copy link
Contributor Author

kittaakos commented Sep 16, 2022

I have found the cause of why Edit is missing. As of writing, IDE2 uses Theia 1.25.0, it requires the following translation entry to be present in the translation file (./plugins/vscode-language-pack-zh-hans/extension/translations/main.i18n.json):

{
  "vs/workbench/contrib/notebook/common/model/notebookTextModel": {
    "defaultEditLabel": "编辑"
  },
}

This entry 👆 is available in an older version of the Chinese language pack. Go to https://open-vsx.org/extension/MS-CEINTL/vscode-language-pack-zh-hans/1.53.2, download the VS Code extension, unpack it, and check the file.

This entry is unavailable in a more recent version of the Chinese language pack. See for example https://open-vsx.org/extension/MS-CEINTL/vscode-language-pack-zh-hans/1.71.0.

"vs/workbench/api/browser/mainThreadCustomEditors": {
  "defaultEditLabel": "编辑"
},

In summary, IDE2's Theia version (1.25.0) cannot deal with the newer version of language packs.

I see three options:

  • Bump the Theia version: it's a more extensive effort.
  • Downgrade the language pack versions: we need to check if everything is correct manually.
  • Leave as-is until we make the Theia version bump.

I will leave the decision to @davegarthsimpson.

The rest of the translation issues are fixed.

@kittaakos
Copy link
Contributor Author

resources
resourcera

This is not a bug. A resources folder in your sketchbook contains a sketch. IDE2 won't translate the filesystem.

Screen Shot 2022-09-16 at 16 37 16

Screen Shot 2022-09-16 at 16 37 39

@per1234
Copy link
Contributor

per1234 commented Sep 16, 2022

IDE2's Theia version (1.25.0) cannot deal with the newer version of language packs.

Good catch. I somehow missed that the language pack versions had been bumped in the IDE.

Leave as-is until we make the Theia version bump.

Is that even really a guaranteed solution? Theia 1.29.0 is still using VS Code API 1.53.2:

https://github.com/eclipse-theia/theia/blob/v1.29.0/dev-packages/application-package/src/api.ts#L21

It seems to me that the only correct approach is to keep language packs synced with the VS Code API version in use.

@kittaakos
Copy link
Contributor Author

Leave as-is until we make the Theia version bump.

Is that even really a guaranteed solution? Theia 1.29.0 is still using VS Code API 1.53.2:

Good point. We should probably start a discussion on the Theia forum.

It seems to me that the only correct approach is to keep language packs synced with the VS Code API version in use.

In this case, we have to go back to this commit. The vscode engine version matches what Theia supports.

kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 19, 2022
Aligned the languge pack versions.

Closes arduino#1431

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 19, 2022
Aligned the languge pack versions.

Closes arduino#1431

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 19, 2022
Aligned the languge pack versions.

Closes arduino#1431

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 21, 2022
Aligned the languge pack versions.

Closes arduino#1431

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Sep 26, 2022
Aligned the languge pack versions.

Closes arduino#1431

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Sep 26, 2022
Aligned the languge pack versions.

Closes #1431

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants