Skip to content

Commit

Permalink
TASK: Add language labels in Neos.Neos
Browse files Browse the repository at this point in the history
  • Loading branch information
markusguenther committed Mar 23, 2022
1 parent e10db09 commit 451b515
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
21 changes: 21 additions & 0 deletions Neos.Neos/Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,27 @@
<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">
<source>Switched to the new user "{0}".</source>
</trans-unit>
<trans-unit id="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">
<source>Login as user</source>
</trans-unit>
<trans-unit id="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">
<source>Switched back from "{0}" to the orginal user "{1}"</source>
</trans-unit>
<trans-unit id="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">
<source>Switch back to the orginal user account</source>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class UserMenu {
const message = window.NeosCMS.I18n.translate(
'success.restoreUser',
'Switched back from {0} to the orginal user {1}.',
'Unikka.LoginAs',
'Neos.Neos',
'Main',
{
0: impersonate.accountIdentifier,
Expand All @@ -86,7 +86,7 @@ export default class UserMenu {
const message = window.NeosCMS.I18n.translate(
'error.restoreUser',
'Could not switch back to the original user.',
'Unikka.LoginAs'
'Neos.Neos'
)
window.NeosCMS.Notification.error(message)
}
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}.', 'Unikka.LoginAs', 'Main', {0: username})
const message = window.NeosCMS.I18n.translate('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.', 'Unikka.LoginAs')
const message = window.NeosCMS.I18n.translate('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', 'Unikka.LoginAs') :
window.Typo3Neos.I18n.translate('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 @@ -16,7 +16,7 @@ const RestoreButton = (user) => {
? window.Typo3Neos.I18n.translate(
'label.restoreUserButton',
'Back to user "{0}"',
'Unikka.LoginAs',
'Neos.Neos',
'Main',
user.accountIdentifier
)
Expand Down

0 comments on commit 451b515

Please sign in to comment.