mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-09 21:59:42 -06:00
Merge pull request #6878 from 2403905/issue-5807
[full-ci] Fix the default document language for OnlyOffice
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
Bugfix: fix the default document language for OnlyOffice
|
||||
|
||||
Fix the default document language for OnlyOffice
|
||||
|
||||
https://github.com/owncloud/ocis/pull/6878
|
||||
https://github.com/owncloud/enterprise/issues/5807
|
||||
2
go.mod
2
go.mod
@@ -13,7 +13,7 @@ require (
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.6.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20230516150832-730ac860c71d
|
||||
github.com/cs3org/reva/v2 v2.15.1-0.20230724142905-f4507ac94bd4
|
||||
github.com/cs3org/reva/v2 v2.15.1-0.20230725125905-676d4e05f1b7
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
github.com/egirna/icap-client v0.1.1
|
||||
|
||||
4
go.sum
4
go.sum
@@ -625,8 +625,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
|
||||
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
|
||||
github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc=
|
||||
github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
|
||||
github.com/cs3org/reva/v2 v2.15.1-0.20230724142905-f4507ac94bd4 h1:4o6B4JibypM0phV/GI7CcIvVvIP+hF6CSkjvJ91CYJk=
|
||||
github.com/cs3org/reva/v2 v2.15.1-0.20230724142905-f4507ac94bd4/go.mod h1:4z5EQghS2LhSWZWocH51Dw9VAs16No1zSFvFgQtgS7w=
|
||||
github.com/cs3org/reva/v2 v2.15.1-0.20230725125905-676d4e05f1b7 h1:+G17hDLzyv3tVht0UdrvWwsxiFE8MaJ09QaQvxhXRdE=
|
||||
github.com/cs3org/reva/v2 v2.15.1-0.20230725125905-676d4e05f1b7/go.mod h1:4z5EQghS2LhSWZWocH51Dw9VAs16No1zSFvFgQtgS7w=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
|
||||
25
vendor/github.com/cs3org/reva/v2/pkg/app/provider/wopi/wopi.go
generated
vendored
25
vendor/github.com/cs3org/reva/v2/pkg/app/provider/wopi/wopi.go
generated
vendored
@@ -254,9 +254,9 @@ func (p *wopiProvider) GetAppURL(ctx context.Context, resource *provider.Resourc
|
||||
|
||||
urlQuery := url.Query()
|
||||
if language != "" {
|
||||
urlQuery.Set("ui", language) // OnlyOffice
|
||||
urlQuery.Set("lang", language) // Collabora
|
||||
urlQuery.Set("UI_LLCC", language) // Office365
|
||||
urlQuery.Set("ui", language) // OnlyOffice
|
||||
urlQuery.Set("lang", covertLangTag(language)) // Collabora, Impact on the default document language of OnlyOffice
|
||||
urlQuery.Set("UI_LLCC", language) // Office365
|
||||
}
|
||||
if p.conf.AppDisableChat {
|
||||
urlQuery.Set("dchat", "1") // OnlyOffice disable chat
|
||||
@@ -470,3 +470,22 @@ func getEtherpadExtensions(appURL string) map[string]map[string]string {
|
||||
}
|
||||
return appURLs
|
||||
}
|
||||
|
||||
// TODO Find better solution
|
||||
// This conversion was made because no other way to set the default document language to OnlyOffice was found.
|
||||
func covertLangTag(lang string) string {
|
||||
switch lang {
|
||||
case "cs":
|
||||
return "cs-CZ"
|
||||
case "de":
|
||||
return "de-DE"
|
||||
case "es":
|
||||
return "es-ES"
|
||||
case "fr":
|
||||
return "fr-FR"
|
||||
case "it":
|
||||
return "it-IT"
|
||||
default:
|
||||
return "en"
|
||||
}
|
||||
}
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -352,7 +352,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
|
||||
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
|
||||
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
|
||||
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
|
||||
# github.com/cs3org/reva/v2 v2.15.1-0.20230724142905-f4507ac94bd4
|
||||
# github.com/cs3org/reva/v2 v2.15.1-0.20230725125905-676d4e05f1b7
|
||||
## explicit; go 1.20
|
||||
github.com/cs3org/reva/v2/cmd/revad/internal/grace
|
||||
github.com/cs3org/reva/v2/cmd/revad/runtime
|
||||
|
||||
Reference in New Issue
Block a user