Closed raidroGS closed 5 months ago
Server Versions:
&lang=[language]
Only small changes in editor.libreoffice/res/js/editor.js needed
componentDidMount() { const {editorModify} = this.props; if (this.props.isActive) { editorModify({fixedToolbar: true}) } const pydio = Pydio.getInstance(); const configs = pydio.getPluginConfigs("editor.libreoffice") pydio.notify('longtask_starting'); const iframeUrl = configs.get("LIBREOFFICE_CODE_VERSION") === "v21" ? "/browser/dist/cool.html" : "/loleaflet/dist/loleaflet.html"; const frontUrl = pydio.getFrontendUrl(); const protocol = frontUrl.protocol === 'https:' ? 'wss:' : 'ws:'; const webSocketUrl = `${protocol}//${frontUrl.host}`; //host.replace(/^http/gi, 'ws'); // Check current action state for permission const {node} = this.props; const readonly = node.hasMetadataInBranch("node_readonly", "true") || (node.getMetadata().get("content_lock") && node.getMetadata().get("content_lock") !== pydio.user.id); const permission = readonly ? "readonly" : "edit" const uri = "/wopi/files/" + node.getMetadata().get("uuid"); const fileSrcUrl = encodeURIComponent(`${frontUrl.protocol}//${frontUrl.host}${uri}`); const api = new TokenServiceApi(PydioApi.getRestClient()) const req = new RestDocumentAccessTokenRequest(); req.Path = PydioApi.getClient().getSlugForNode(node) + node.getPath(); // get preference language const lang = pydio.user.getPreference('lang') || 'en'; // append &lang=lang at the end of the url api.generateDocumentAccessToken(req).then(response => { this.setState({url: `${iframeUrl}?host=${webSocketUrl}&WOPISrc=${fileSrcUrl}&access_token=${response.AccessToken}&permission=${permission}&lang=${lang}`}); }) }
Is fixed in V4.3.5!
Collabora is starting with english language as default
Server Versions:
Collabora needs
&lang=[language]
during startOnly small changes in editor.libreoffice/res/js/editor.js needed