diff --git a/changelog/unreleased/fix-acitivity-translation.md b/changelog/unreleased/fix-acitivity-translation.md new file mode 100644 index 00000000000..65a888c81f8 --- /dev/null +++ b/changelog/unreleased/fix-acitivity-translation.md @@ -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 diff --git a/services/activitylog/pkg/service/response.go b/services/activitylog/pkg/service/response.go index 2dfdd67d329..e2c4477887c 100644 --- a/services/activitylog/pkg/service/response.go +++ b/services/activitylog/pkg/service/response.go @@ -35,21 +35,12 @@ var ( MessageSpaceShared = l10n.Template("{user} added {sharee} as member of {space}") MessageSpaceUnshared = l10n.Template("{user} removed {sharee} from {space}") - StrSomeField = l10n.Template(_someField) - StrPermission = l10n.Template(_permission) - StrPassword = l10n.Template(_password) - StrExpirationDate = l10n.Template(_expirationDate) - StrDisplayName = l10n.Template(_displayName) - StrDescription = l10n.Template(_description) -) - -const ( - _someField = "some field" - _permission = "permission" - _password = "password" - _expirationDate = "expiration date" - _displayName = "display name" - _description = "description" + StrSomeField = l10n.Template("some field") + StrPermission = l10n.Template("permission") + StrPassword = l10n.Template("password") + StrExpirationDate = l10n.Template("expiration date") + StrDisplayName = l10n.Template("display name") + StrDescription = l10n.Template("description") ) // 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 { switch val { case "TYPE_PERMISSIONS", "permission": - return _permission + return StrPermission case "TYPE_PASSWORD", "password": - return _password + return StrPassword case "TYPE_EXPIRATION", "expiration": - return _expirationDate + return StrExpirationDate case "TYPE_DISPLAYNAME": - return _displayName + return StrDisplayName case "TYPE_DESCRIPTION": - return _description + return StrDescription } - return _someField + return StrSomeField }