theia icon indicating copy to clipboard operation
theia copied to clipboard

Wait for plugins to deploy before restoring the current language

Open AlbyIanna opened this issue 2 years ago • 10 comments

Fixes #11471

AlbyIanna avatar Jul 27 '22 17:07 AlbyIanna

we will definitely have to deal with the problem of 90% of Theia not being translated.

This would be true only during the loading time, right?

But yes, I would go for the other solution too, I just couldn't find a way to await for the languages loading process. Probably I've just didn't dig deep enough (and also didn't know how waiting for it would affect the Theia loading time)

AlbyIanna avatar Jul 27 '22 20:07 AlbyIanna

This would be true only during the loading time, right?

Yes, but that's the issue. We already load translations during loading time. The /i18n/:locale endpoint not only returns metadata on languages, but all of the translations as well, since they need to be available at the time of loading the JS code.

msujew avatar Jul 27 '22 21:07 msujew

@msujew I see. Thanks for the tip, I think I've found a better solution here

if you like it, I'd gladly update this PR with that code.

AlbyIanna avatar Jul 28 '22 14:07 AlbyIanna

@AlbyIanna Sure, something similar should work for the Theia codebase as well 👍

Don't forget to sign the ECA by the way.

msujew avatar Jul 29 '22 12:07 msujew

@msujew done 👌

AlbyIanna avatar Aug 01 '22 07:08 AlbyIanna

You'll have to create a dedicated override in the plugin-ext package for the LocalizationBackendContribution and bind it there.

@msujew I'm not sure how to proceed here. Could you please provide me with an example of how to do that?

Also we can't accept your changes when you haven't signed the ECA. Please do so.

I should have done it now. Can you please confirm I did it right?

AlbyIanna avatar Aug 01 '22 09:08 AlbyIanna

I'm not sure how to proceed here. Could you please provide me with an example of how to do that?

Sure, I recently did something similar: There is a core LanguageQuickPickService, which is overriden in the vsx-registry package as VSXLanguageQuickPickService as the services in there aren't available in core.

I should have done it now. Can you please confirm I did it right?

Are you sure you did it with the mail that's in the commit? It doesn't seem to validate.

image

msujew avatar Aug 01 '22 09:08 msujew

Are you sure you did it with the mail that's in the commit? It doesn't seem to validate.

Yes, I'm sure about it because I received the confirmation e-mail after the registration.

This is what I see in my Eclipse Account: image

AlbyIanna avatar Aug 01 '22 11:08 AlbyIanna

Yes, I'm sure about it because I received the confirmation e-mail after the registration.

Alright, cool. It seems to work now. No idea why it didn't work previously.

msujew avatar Aug 01 '22 11:08 msujew

@msujew thanks for the feedback. In the last commit I've made some changes according to your requests 👍

AlbyIanna avatar Aug 01 '22 12:08 AlbyIanna

@AlbyIanna Are you still interested in contributing the changes? I still have a few outstanding comments before approving this.

msujew avatar Aug 11 '22 13:08 msujew

Hi @msujew, thanks for the review. Sorry for the delay in answering, I must have missed the notification 🙏 I will address your remarks soon.

AlbyIanna avatar Aug 11 '22 15:08 AlbyIanna