sleek icon indicating copy to clipboard operation
sleek copied to clipboard

Auto detection of Russian language crashes app on 1st start

Open kden416 opened this issue 2 years ago • 11 comments

Sleek version 1.1.7 / 1.1.8-rc2 and Microsoft Store version won't start. Terminal output have error: Persisted data located at: C:\Users\user\AppData\Local\Programs\sleek\user-preferences.json TypeError: Cannot create property 'functionName' on string 'Error in getTranslations(): TypeError: Cannot read properties of undefined (reading 'translation')' at createWindow (C:\Users\user\AppData\Local\Programs\sleek\resources\app.asar\src\main.js:896:24) [12180:0404/103117.376:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is

kden416 avatar Apr 04 '22 10:04 kden416

@kden416 thanks for reporting this. I installed it from Windows Store and didn't see any error popping up. Are you upgrading from an old version? And if so would mind sharing your preferences file with me? It's located at C:\Users\user\AppData\Local\Programs\sleek\user-preferences.json and you can either post it here or send it to ransome [at ] duck dot com.

Also I would like to ask you two things:

  1. Can you check if this still happens with https://github.com/ransome1/sleek/releases/tag/v1.1.8-rc.3
  2. if 1. didn't help can you backup the user-preferences.json file and then delete the original one and try to start sleek again?

ransome1 avatar Apr 04 '22 10:04 ransome1

  1. user-preferences.json deletion has no effect
  2. v1.1.8-rc.3 started, but blank window with controls.

user-preferences.json: { "width": 1100, "height": 700, "horizontal": 160, "vertical": 240, "maximizeWindow": false, "darkmode": true, "notifications": true, "useTextarea": false, "compactView": false, "matomoEvents": false, "drawerWidth": "500", "showDueIsPast": true, "showDueIsFuture": true, "showDueIsToday": true, "showHidden": false, "showCompleted": true, "sortCompletedLast": false, "invertSorting": false, "zoom": "100", "tray": false, "showEmptyFilters": true, "sortByFile": false, "dismissedNotifications": [], "dismissedMessages": [], "hideFilterCategories": [], "files": [], "sortBy": [ "priority", "due", "contexts", "projects", "date" ], "selectedFilters": [] }

kden416 avatar Apr 04 '22 11:04 kden416

@kden416 what language did you set in Windows itself?

ransome1 avatar Apr 04 '22 11:04 ransome1

@ransome1 my language is russian in Manjaro linux all works fine

kden416 avatar Apr 04 '22 11:04 kden416

That's odd. Let's see if I can reproduce this somehow.

ransome1 avatar Apr 04 '22 11:04 ransome1

@kden416 are you experiencing the same issues when you switch your language (in Windows) to english?

ransome1 avatar Apr 04 '22 11:04 ransome1

@ransome1 apparently, problem with system language. If I set english as system language, all works fine with 1.1.7 and 1.1.8-rc2 versions.

any suggestions to fix it ?

P.S. Strange, but when i changed OS language back to russian, all works fine.

SO, app copy, that was first time started with english localization and then launched at russian localization, works fine. App copy, that first time started with russian localiztion, won't work.

kden416 avatar Apr 04 '22 11:04 kden416

I think the problem is that the auto detection of the russian language doesn't work and that the default fallback (english) for some reason is not being set. But this I think I can fix this somehow. I will add this to the backlog, thanks for reporting this.

As a temporary workaround you can do what you already did: Start sleek with your Windows set to english (like this sleek will detect the english language and persist it in its settings) and then switch back to Russian.

ransome1 avatar Apr 04 '22 12:04 ransome1

Thank you for this amazing app!

kden416 avatar Apr 04 '22 12:04 kden416

@ransome1 my language is russian in Manjaro linux all works fine

In Manjaro Linux same problem. Solution for linux: LANGUAGE=us_US sleek in terminal

kden416 avatar Apr 07 '22 08:04 kden416

tested on Sleek 1.2.1 on mac os. ~/Library/Application\ Support/sleek/user-preferences.json In the user preference json, there is "language": "ko" which is automatically added by system.

Same error is occurred

TypeError: Cannot read properties of undefined (reading 'translation')
    at createWindow (/Users/casper/Tools/sleek/src/main.js:629:75) {
  functionName: 'createWindow'
}

To fix issue as a workaround, change language value in ~/Library/Application\ Support/sleek/user-preferences.json "language": "en" . Now It works.

7loro avatar Jul 08 '22 18:07 7loro

@kden416 @7loro could you guys take a look at this test release (https://github.com/ransome1/sleek/releases/tag/v1.2.2-rc.3) and give me a feedback if it solves the issue on your side?

ransome1 avatar Sep 27 '22 09:09 ransome1

@kden416 @7loro could you guys take a look at this test release (https://github.com/ransome1/sleek/releases/tag/v1.2.2-rc.3) and give me a feedback if it solves the issue on your side?

tested on Sleek 1.2.2-rc.3 on mac os. @ransome1 Now it works fine 👍

When I install app, In the user preference json (~/Library/Application\ Support/sleek/user-preferences.json), there is "language": "en" which is automatically added by system even if my system language is korean. There is no crash now.

7loro avatar Sep 27 '22 09:09 7loro

I'm closing here as this has been resolved.

@7loro if you have some time on your hands and would like to use sleek in your native language, you can simply translate this file (https://github.com/ransome1/sleek/blob/master/src/locales/en/translation.json) and send me a pull requestes. Makes you a contributor and sleek one language richer :)

ransome1 avatar Oct 16 '22 16:10 ransome1