diff --git a/Neos.Neos/Resources/Public/JavaScript/Templates/ImpersonateButton.js b/Neos.Neos/Resources/Public/JavaScript/Templates/ImpersonateButton.js index 15ac6b5b6ed..d7db589dcc1 100644 --- a/Neos.Neos/Resources/Public/JavaScript/Templates/ImpersonateButton.js +++ b/Neos.Neos/Resources/Public/JavaScript/Templates/ImpersonateButton.js @@ -1,11 +1,11 @@ import {isNil} from "../Helper" const impersonateIcon = '' -const localizedTooltip = !isNil(window.Typo3Neos) ? - window.NeosCMS.I18n.translate('impersonate.tooltip.impersonateUserButton', 'Login as this user', 'Neos.Neos') : - 'Login as this user'; const ImpersonateButton = (identifier, disabled) => { + const localizedTooltip = !isNil(window.NeosCMS) ? + window.NeosCMS.I18n.translate('impersonate.tooltip.impersonateUserButton', 'Login as this user', 'Neos.Neos') : + 'Login as this user'; const attributesObject = { 'data-neos-toggle': 'tooltip', 'title': localizedTooltip, diff --git a/Neos.Neos/Resources/Public/JavaScript/Templates/RestoreButton.js b/Neos.Neos/Resources/Public/JavaScript/Templates/RestoreButton.js index 9357e4cc814..5d7b55c0156 100644 --- a/Neos.Neos/Resources/Public/JavaScript/Templates/RestoreButton.js +++ b/Neos.Neos/Resources/Public/JavaScript/Templates/RestoreButton.js @@ -12,15 +12,15 @@ const RestoreButton = (user) => { attributes += `${key}="${attributesObject[key]}" ` }) - const restoreLabel = isNil(window.NeosCMS) + const restoreLabel = !isNil(window.NeosCMS) ? window.NeosCMS.I18n.translate( 'impersonate.label.restoreUserButton', 'Back to user "{0}"', 'Neos.Neos', 'Main', - user.accountIdentifier + [user.fullName] ) - : `Restore user "${user.accountIdentifier}"` + : `Restore user "${user.fullName}"` return `` }