Describe the bug
If both the lang: 'en-gb' option (in settings.json) and the query param ?lang=de is set the displayed language is not really defined. Sometimes it displays english, sometimes its german.
To Reproduce
Steps to reproduce the behavior:
- Set this setting in
settings.json:
"padOptions": {
"lang": "en-gb"
},
- Start the server
- Open an etherpad with the
lang query parameter, e.g. https://localhost:9001/p/7j6qm9rldicn9ec1vpr4?lang=de
- See the english or german etherpad.
Expected behavior
The default language set in settings.json should be overridden by the query param.
Server (please complete the following information):
- Etherpad version: 1d7a41f
- OS: Ubuntu 20.04
- Node.js version (
node --version): v14.17.6
- npm version (
npm --version): 6.14.15
- the server free of plugins
Desktop (please complete the following information):
- OS: Windows
- Browser edge
- Version 100.0.1185.39 (Official build) (64-bit)
Additional context
While debugging I found that this function is called twice in quick succession:
https://github.com/ether/etherpad-lite/blob/34d12022a076d967dcbfc0a3456687c55b4ea5a0/src/static/js/pad.js#L138-L141
But I could not find the part where it is called with the default language.
I would propose replacing the additional call with a variable which would replace the hardcoded 'en' string.
Describe the bug
If both the
lang: 'en-gb'option (in settings.json) and the query param?lang=deis set the displayed language is not really defined. Sometimes it displays english, sometimes its german.To Reproduce
Steps to reproduce the behavior:
settings.json:langquery parameter, e.g. https://localhost:9001/p/7j6qm9rldicn9ec1vpr4?lang=deExpected behavior
The default language set in
settings.jsonshould be overridden by the query param.Server (please complete the following information):
node --version): v14.17.6npm --version): 6.14.15Desktop (please complete the following information):
Additional context
While debugging I found that this function is called twice in quick succession:
https://github.com/ether/etherpad-lite/blob/34d12022a076d967dcbfc0a3456687c55b4ea5a0/src/static/js/pad.js#L138-L141
But I could not find the part where it is called with the default language.
I would propose replacing the additional call with a variable which would replace the hardcoded
'en'string.