msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 15 forks source link

No translation electron client on windows #4858

Open andreievg opened 1 month ago

andreievg commented 1 month ago

What went wrong? 😲

@adamdewey noticed during deployment that client app does not have translations on the discovery screen:

Screenshot 2024-09-24 at 11 16 25 PM

After some investigations we found that client app tries to access translations from: Screenshot 2024-09-24 at 11 17 26 PM

C:\Program Files\Open mSupply Desktop\resources\app\.webpack\renderer\main_window

Locale files are located in C:\Program Files\Open mSupply Desktop\resources\app\.webpack\renderer\

It looks like there is some caching which allows client to still use cached translations after re-install (this can be cleared by going to help -> developer tools -> application tab and clearing local storage, after which I get the same error on a cloud test server), relocating locale files to main_window seems to fix this, made a test tag from this branch, which is branched from this release, which just adds an extra place for locales to be moved after build

https://github.com/msupply-foundation/open-msupply/blob/56478af998b74b61f72e8aa6336f7f00fcf7fa67/client/packages/electron/webpack.plugins.ts#L36

Expected behaviour 🤔

Translations present in client app

How to Reproduce 🔨

Install v2.2.2 client app, clear cache completely by going to help -> developer tools -> application tab and clearing local storage, after app restart translations will be missing from client app (can go to the bottom right 'edit' next to server IP address to go back to discovery, if already connected to server)

Screenshot 2024-09-24 at 11 26 56 PM

Your environment 🌱

lache-melvin commented 1 month ago

Closing as was not reproducible in V2.2.3-RC1, might have been a build issue with v2.2.2

lache-melvin commented 1 month ago

Reopening, this was found again on this test build: v2.4.0-TEST_LL

Needs investigation - do we have a flaky build step? Or is something else causing the issue?

andreievg commented 4 weeks ago

Triage, if installer is tested with re-installation, we should be pretty safe