Skip to content

Commit

Permalink
TASK: Prefix impersonate language labels
Browse files Browse the repository at this point in the history
  • Loading branch information
markusguenther committed Mar 23, 2022
1 parent 451b515 commit d70ea9c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions Neos.Neos/Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -836,25 +836,25 @@
<trans-unit id="login.loggedOut.body" xml:space="preserve">
<source>Successfully logged out</source>
</trans-unit>
<trans-unit id="success.impersonateUser" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.success.impersonateUser" xml:space="preserve" approved="yes">
<source>Switched to the new user "{0}".</source>
</trans-unit>
<trans-unit id="error.impersonateUser" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.error.impersonateUser" xml:space="preserve" approved="yes">
<source>Could not switch to the selected user.</source>
</trans-unit>
<trans-unit id="tooltip.impersonateUserButton" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.tooltip.impersonateUserButton" xml:space="preserve" approved="yes">
<source>Login as user</source>
</trans-unit>
<trans-unit id="error.restoreUser" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.error.restoreUser" xml:space="preserve" approved="yes">
<source>Could not switch back to the original user.</source>
</trans-unit>
<trans-unit id="success.restoreUser" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.success.restoreUser" xml:space="preserve" approved="yes">
<source>Switched back from "{0}" to the orginal user "{1}"</source>
</trans-unit>
<trans-unit id="label.restoreUserButton" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.label.restoreUserButton" xml:space="preserve" approved="yes">
<source>Back to user "{0}"</source>
</trans-unit>
<trans-unit id="title.restoreUserButton" xml:space="preserve" approved="yes">
<trans-unit id="impersonate.title.restoreUserButton" xml:space="preserve" approved="yes">
<source>Switch back to the orginal user account</source>
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class UserMenu {
.then((data) => {
const { origin, impersonate, status } = data
const message = window.NeosCMS.I18n.translate(
'success.restoreUser',
'impersonate.success.restoreUser',
'Switched back from {0} to the orginal user {1}.',
'Neos.Neos',
'Main',
Expand All @@ -84,7 +84,7 @@ export default class UserMenu {
.catch(function (error) {
if (window.NeosCMS) {
const message = window.NeosCMS.I18n.translate(
'error.restoreUser',
'impersonate.error.restoreUser',
'Could not switch back to the original user.',
'Neos.Neos'
)
Expand Down
2 changes: 1 addition & 1 deletion Neos.Neos/Resources/Public/JavaScript/Main.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class UserManagement {
.then((data) => {
const {user, status} = data
const username = isNil(user) ? '' : user.accountIdentifier
const message = window.NeosCMS.I18n.translate('success.impersonateUser', 'Switched to the new user {0}.', 'Neos.Neos', 'Main', {0: username})
const message = window.NeosCMS.I18n.translate('impersonate.success.impersonateUser', 'Switched to the new user {0}.', 'Neos.Neos', 'Main', {0: username})
window.NeosCMS.Notification.ok(message)

// load default backend, so we don't need to care for the module permissions.
Expand All @@ -71,7 +71,7 @@ export default class UserManagement {
})
.catch(function (error) {
if (window.NeosCMS) {
const message = window.NeosCMS.I18n.translate('error.impersonateUser', 'Could not switch to the requested user.', 'Neos.Neos')
const message = window.NeosCMS.I18n.translate('impersonate.error.impersonateUser', 'Could not switch to the requested user.', 'Neos.Neos')
window.NeosCMS.Notification.error(message)
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {isNil} from "../Helper"

const impersonateIcon = '<i class="fas fa-random icon-white"></i>'
const localizedTooltip = !isNil(window.Typo3Neos) ?
window.Typo3Neos.I18n.translate('tooltip.impersonateUserButton', 'Login as this user', 'Neos.Neos') :
window.NeosCMS.I18n.translate('impersonate.tooltip.impersonateUserButton', 'Login as this user', 'Neos.Neos') :
'Login as this user';

const ImpersonateButton = (identifier, disabled) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const RestoreButton = (user) => {
attributes += `${key}="${attributesObject[key]}" `
})

const restoreLabel = isNil(window.Typo3Neos)
? window.Typo3Neos.I18n.translate(
'label.restoreUserButton',
const restoreLabel = isNil(window.NeosCMS)
? window.NeosCMS.I18n.translate(
'impersonate.label.restoreUserButton',
'Back to user "{0}"',
'Neos.Neos',
'Main',
Expand Down

0 comments on commit d70ea9c

Please sign in to comment.