Extension
Extension copied to clipboard
[Bug] Presences not working when Presence getStrings() non-English localization string
This issue causes users with non-English browsers to be unable to use most of the Presences that presence.getStrings()
non-English strings
Some Presences have solved this issue using .catch
fallback to English like:
But some not:
To Reproduce
- Change browser language to
Chinese Simplified
orChinese Traditional
(The choice of language depends on whether the string has been translated or not?) - Install SoundCloud or other Presence that calls
getStrings()
but does not fallback to English by default - Try to trigger Presence, Presence not working
- Switch the browser language back to English
- Return to the previous page (Step 3), Presence should be working now.
Solution
Alright, so I know we can don't even bother to use localized strings if it's just paused and playing! But lots of the simple Presence is called localized strings, and if we want to fix them all we must change them all one by one. Extensions should probably fall back to English by themselves if the localization string for the user's browser language does not exist, instead of directly causing Presence to not work
Pretty sure it was related to the whole setting being undefined. But that could happen to any browser not depending on language. Didn't know it was an actual thing on Chinese...
Pretty sure it was related to the whole setting being undefined. But that could happen to any browser not depending on language. Didn't know it was an actual thing on Chinese...
So I think the extension should return the English string itself when it finds a string that is not defined, at least let Presence working in the situation I'm talking about. There will always have some languages where there are no active translators resulting in the localization string not being defined