[full-ci] update reva to include #4078
This commit is contained in:
+22
-3
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user