Regression a7dcdd5651
"usePrevious" uses "useEffect" to update the ref while the fix of the commit updated the state during the render function call.
This causes the component to not actually render and immediately call the render function again. Which then leads to the "usePrevious" hooks "useEffect" to never getting called.
When directly opening the source/extension browse page as the initial page, the metadata server settings weren't loaded yet, and thus, the default values were being used.
Thus, when opening the dialog the first time, it was showing the default selected languages.
The local source is always shown, and therefore its language ("other") should only be shown in the language filter in case an actual source is installed that supports is of "other" language.
In case the saved "selected languages" contained languages that did not have any installed source, they caused TypeErrors when trying to access them in e.g. "sourcesByLanguage".
Switch to "lingui" for better DX.
Tried to persist existing languages as much as possible.
Removed "vite-plugin-node-polyfills" because it's incompatible with "lingui"
The server is not requesting these images through an extension; thus, it is not a problem to send them directly to the server since there is no problem of getting the server "stuck" due to extension rate limits.