Theia Localization not working in 1.42.1 #1456
Replies: 12 comments
-
|
Posted by: Mark Sujew on 12/5/2023, 7:52:57 PM @chid.crushev Can you reproduce this issue on newer Theia versions? I.e. the latest supported version (1.44.0) or the latest community edition (1.43.1). Can you also reproduce it using the |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Chid Crushev on 12/7/2023, 6:29:32 PM @msujew , This is what I’ve found. When theia was upgraded from 1.41.0 to 1.42.0, the localization-backend-contribution.ts file(which has the logic for loading custom translations) was renamed to localization-server.ts Theia 1.41.0 localization-backend-contribution.ts eclipse-theia/theia/blob/v1.41.0/packages/core/src/node/i18n/localization-backend-contribution.ts// Copyright (C) 2021 TypeFox and others. import * as express from 'express'; This file has been truncated. show original Theia 1.42.0 localization-server.ts eclipse-theia/theia/blob/v1.42.0/packages/core/src/node/i18n/localization-server.ts// Copyright (C) 2021 TypeFox and others. import { inject, injectable } from 'inversify'; This file has been truncated. show original This configure function was responsible for sending & loading the custom translations in 1.41.0 from theia backend server. This was reworked/removed in1.42.0 which’s causing the translations not to load. (I think even with 1.43.0 & 1.44.0, this would be the same behavior) Any workaround on this? Regards, |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Mark Sujew on 12/7/2023, 8:15:42 PM Translations in Theia still work as expected for me in the latest version: The refactoring you have linked hasn’t removed any functionality. The feature was just moved from an HTTP endpoint to an RPC endpoint. However, it should still work as expected. Can you provide a reproducible example for this issue? |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Chid Crushev on 12/8/2023, 7:29:30 PM Sure, I was trying to see if at least the language translations pack will work instead of my custom translations I’ve & it has the same error as well. I started theia locally after making the below change in browser-app/package.json & I’m still seeing the strings not getting translated even from the language pack. In 1.42.1 browser-app/package.json, I made the following changes: Were you able to see the strings getting translated for 1.42.1 with this change? |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Chid Crushev on 12/8/2023, 7:29:49 PM @msujew ^ |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Mark Sujew on 12/8/2023, 9:33:21 PM Works for me as expected in 1.42.1 as well (note the German text in the menu bar): I’m using the Theia example app to test this, with the changes you’ve provided above. With “reproducible example” I mean something like a Git repo that I can clone to reproduce this. Maybe something in your own Theia extension prevents this from working correctly? |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Chid Crushev on 12/12/2023, 5:08:57 AM @msujew , I have found the root cause. In our browser/app package.json, we have the following:
After uncommenting the frontendPreload, I can see the language translations coming through. Any thoughts on why it is causing the problem? Also one more thing. I downloaded the language translation for German with version 1.81.0 because 1.42.1 can support until 1.81.0 But the sub menus inside the Selection are not getting translated. I also saw few more strings not getting translated as well on the startup page. Are you also facing the same & any thoughts why we’re seeing the inconsistency with this?( I have seen the translation packs working fine for 1.38.0 though) |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Mark Sujew on 12/12/2023, 10:48:30 AM
And I ask again: Can you provide a reproducible example? I have absolutely no idea what you’re doing in your preload module.
That’s a bug that was fixed with this PR which is included in Theia 1.43.0. |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Hyddel on 12/13/2023, 8:31:28 PM Chid and I are from the same team. Unfortunately, we are not able to provide a reproducile example but here is what’s happening: Currently, our frontendPreload and frontend points to a same module, let’s say:
One interesting thing to note is that if we remove the “frontendPreload” from theiaExtensions, then language translations are loading but that is required to load our custom websocket connection changes. Any inputs on this issue would be helpful. |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Mark Sujew on 12/13/2023, 9:36:48 PM
Yeah, that’s not going to work. Essentially lines line this: don’t work, because there isn’t a |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Hyddel on 12/13/2023, 11:49:09 PM I see. So, I have tried the following: I have created a preload-module where I have only one customization which is websocket one: so here is my setting: The frontend is pointing to all other customizations. Even then, language translations are not loading. |
Beta Was this translation helpful? Give feedback.
-
|
Posted by: Mark Sujew on 12/14/2023, 10:47:36 AM @hyddel You might be experiencing the same problem as in this issue. It would make sense to continue conversation in there. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Posted by: Chid Crushev on 12/5/2023, 7:08:59 PM
Hi team,
We are migrating from theia 1.38.0 to theia 1.42.1. We have our own localization and have it up & running for theia 1.38.0 by following the instructions from here. It works fine with theia 1.38.0, we don’t see any issues.
For theia 1.42.1, the localization is no longer working & we don’t see the strings getting translated for language switch.
I checked the CHANGELOGS.md and I don’t see any breaking changes introduced between 1.38.0 and 1.42.1 surrounding localization. Is there any breaking change introduced after 1.38.0? Can someone please help on this?
This is our custom localizations we’re overriding.
Regards,
Chid.
Beta Was this translation helpful? Give feedback.
All reactions