Open Nils1729 opened 8 months ago
I am willing to provide a PR for this. I think each of these changes could resolve the issue and would like to respect a maintainer's preferernce, or a different suggestions:
de_DE.json
to de.json
de
to de_DE
, just like it is done with en
→ en_EN
@Nils1729 option 1 isn't an option as Localazy would just overwrite your change, 2 would work but the correct solution would be to use something like normalizeLanguageKey
in matrix-web-i18n to fallback to the general language file if the country specific one is unavailable.
This seems to crash the app on MacOS BigSur
BigSur is EOL so is not supported - https://github.com/element-hq/element-web#supported-environments
I just started experiencing this issue on OpenSUSE Tumbleweed:
No update_base_url is defined: auto update is disabled
Fetching translation json for locale: en_EN
Changing application language to de
Fetching translation json for locale: de
Could not fetch translation json for locale: 'de' Error: ENOENT: no such file or directory, open '/usr/share/element/app/lib/i18n/strings/de.json'
at Object.readFileUtf8 (node:internal/fs/sync:25:18)
at Object.readFileSync (node:fs:441:19)
at t.readFileSync (node:electron/js2c/node_init:2:9771)
at loadJsonFile (/usr/share/element/app/lib/utils.js:55:36)
at AppLocalization.fetchTranslationJson (/usr/share/element/app/lib/language-helper.js:83:45)
at /usr/share/element/app/lib/language-helper.js:96:39
at Array.filter (<anonymous>)
at AppLocalization.setAppLocale (/usr/share/element/app/lib/language-helper.js:95:39)
at new AppLocalization (/usr/share/element/app/lib/language-helper.js:65:18)
at /usr/share/element/app/lib/electron-main.js:530:30 {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/usr/share/element/app/lib/i18n/strings/de.json'
}
Resetting the UI components after locale change
Resetting the UI components after locale change
(node:10295) electron: Failed to load URL: vector://vector/webapp/ with error: ERR_FILE_NOT_FOUND
(Use `electron --trace-warnings ...` to show where the warning was created)
[10332:0705/120921.278141:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
Version:
S | Name | Type | Version | Arch | Repository
---+-----------------+---------+-------------+--------+----------------------
i+ | element-desktop | package | 1.11.69-2.1 | x86_64 | Main Repository (OSS)
element-desktop
is looking for de.json
, but de_DE.json
exists:
I tried adjusting ~/.config/Element/electron-config.json
to:
{
"locale": [
"de_DE"
]
}
(was "de"
before)
This causes the above error to no longer surface, but it does not make element-desktop
start fully:
The state in the screenshot is stable. Nothing changes afterwards.
Neither does removing ~/.config/Element/electron-config.json
altogether allow element-desktop
to start successfully:
Steps to reproduce
Settings
→General
→Language and region
and selectDeutsch
(German)Outcome
What did you expect?
Right-clicking the tray icon, the options are German.
What happened instead?
Right-clicking the tray icon, the options are still
Show/Hide
andQuit
(not German). Web content is localized, though.The logs show this error:
So there is no
de.json
?Probable cause
Digging into probable causes, I suspect the following chain of events:
xy_XY
are shortened toxy
. This only affectsen_EN
andde_DE
.en
is hard-coded to be replaced byen_EN
again. German locale is stillde
instead ofde_DE
.de
in unrelated issues) until recently. I suspect consolidatingde.json
intode_DE.json
caused loading of the file to fail as it was removed.Potential fixes
de
tode_DE
de_DE.json
tode.json
in Element DesktopOperating system
Ubuntu
Application version
Element version: 1.11.53 Crypto version: Olm 3.2.15
How did you install the app?
No response
Homeserver
No response
Will you send logs?
No