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

Preloading Localization Occurs After Partial Internal Content Localization, Resulting in Localization Failure #12977

Closed
likesubject opened this issue Oct 6, 2023 · 1 comment · Fixed by #12993
Assignees
Labels
bug bugs found in the application electron issues related to the electron target localization issues related to localization/internalization/nls

Comments

@likesubject
Copy link

Bug Description:

When preloading localization is performed during the load process, it causes a failure in localizing the commands within CommonCommands. This issue arises because the first import statement in the code snippet already attempts to localize the commands within CommonCommands before the localization is fully loaded.

const { messagingFrontendModule } = require('@theia/core/lib/electron-browser/messaging/electron-messaging-frontend-module');
const container = new Container();
container.load(messagingFrontendModule);

This sequence of code triggers the localization process, but since the localization hasn't completed yet, it prevents proper localization for the commands within CommonCommands.

To resolve this issue, it is necessary to ensure that the localization process completes before attempting to localize any content, including the commands within CommonCommands.

Steps to Reproduce:

1.When setting the language to Chinese, I noticed that some translations are not working properly.

Additional Information

  • Operating System: windows10 electron
  • Theia Version: v1.42.1
@msujew
Copy link
Member

msujew commented Oct 6, 2023

I'll look into this once I'm back from vacation.

@msujew msujew self-assigned this Oct 6, 2023
@msujew msujew added localization issues related to localization/internalization/nls bug bugs found in the application electron issues related to the electron target labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application electron issues related to the electron target localization issues related to localization/internalization/nls
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants