Merge pull request #10175 from 2403905/issue-10127
Fix the panic for the translation-sync in the activities service.
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
Bugfix: Fix Activities translation
|
||||||
|
|
||||||
|
Fix the panic for the translation-sync in the activities service.
|
||||||
|
|
||||||
|
https://github.com/owncloud/ocis/pull/10175
|
||||||
@@ -35,21 +35,12 @@ var (
|
|||||||
MessageSpaceShared = l10n.Template("{user} added {sharee} as member of {space}")
|
MessageSpaceShared = l10n.Template("{user} added {sharee} as member of {space}")
|
||||||
MessageSpaceUnshared = l10n.Template("{user} removed {sharee} from {space}")
|
MessageSpaceUnshared = l10n.Template("{user} removed {sharee} from {space}")
|
||||||
|
|
||||||
StrSomeField = l10n.Template(_someField)
|
StrSomeField = l10n.Template("some field")
|
||||||
StrPermission = l10n.Template(_permission)
|
StrPermission = l10n.Template("permission")
|
||||||
StrPassword = l10n.Template(_password)
|
StrPassword = l10n.Template("password")
|
||||||
StrExpirationDate = l10n.Template(_expirationDate)
|
StrExpirationDate = l10n.Template("expiration date")
|
||||||
StrDisplayName = l10n.Template(_displayName)
|
StrDisplayName = l10n.Template("display name")
|
||||||
StrDescription = l10n.Template(_description)
|
StrDescription = l10n.Template("description")
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
_someField = "some field"
|
|
||||||
_permission = "permission"
|
|
||||||
_password = "password"
|
|
||||||
_expirationDate = "expiration date"
|
|
||||||
_displayName = "display name"
|
|
||||||
_description = "description"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetActivitiesResponse is the response on GET activities requests
|
// GetActivitiesResponse is the response on GET activities requests
|
||||||
@@ -334,15 +325,15 @@ func getFolderName(ctx context.Context, gwc gateway.GatewayAPIClient, ref *provi
|
|||||||
func mapField(val string) string {
|
func mapField(val string) string {
|
||||||
switch val {
|
switch val {
|
||||||
case "TYPE_PERMISSIONS", "permission":
|
case "TYPE_PERMISSIONS", "permission":
|
||||||
return _permission
|
return StrPermission
|
||||||
case "TYPE_PASSWORD", "password":
|
case "TYPE_PASSWORD", "password":
|
||||||
return _password
|
return StrPassword
|
||||||
case "TYPE_EXPIRATION", "expiration":
|
case "TYPE_EXPIRATION", "expiration":
|
||||||
return _expirationDate
|
return StrExpirationDate
|
||||||
case "TYPE_DISPLAYNAME":
|
case "TYPE_DISPLAYNAME":
|
||||||
return _displayName
|
return StrDisplayName
|
||||||
case "TYPE_DESCRIPTION":
|
case "TYPE_DESCRIPTION":
|
||||||
return _description
|
return StrDescription
|
||||||
}
|
}
|
||||||
return _someField
|
return StrSomeField
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user