Skip to content

Commit

Permalink
Replace "transfer" notion with "convert" notion
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>

Replace "transfer" notion with "convert" notion

Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>

Update TransferGuestDialog.vue

Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
  • Loading branch information
Jerome-Herbinet committed Aug 19, 2024
1 parent 351d47b commit d2954e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions lib/Notifications/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ public function prepare(INotification $notification, string $languageCode): INot
case 'guest-transfer-fail':
$params = $notification->getSubjectParameters();
$notification
->setRichSubject($l->t('Guest transfer failed'))
->setRichSubject($l->t('Guest conversion failed'))
->setRichMessage(
$l->t('Failed to transfer guest {guest} to {user}'),
$l->t('Failed to convert guest "{guest}" account to "{user}" account'),
$this->getRichMessageParams($params['source'], $params['target']),
);
return $notification;

case 'guest-transfer-done':
$params = $notification->getSubjectParameters();
$notification
->setRichSubject($l->t('Guest transfer done'))
->setRichSubject($l->t('Guest conversion done'))
->setRichMessage(
$l->t('Transfer of guest {guest} to {user} completed'),
$l->t('Conversion of guest "{guest}" account to "{user}" account completed'),
$this->getRichMessageParams($params['source'], $params['target']),
);
return $notification;
Expand Down
10 changes: 5 additions & 5 deletions src/components/TransferGuestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->

<template>
<NcDialog :name="t('guests', 'Transfer guest to new account')"
<NcDialog :name="t('guests', 'Convert guest to regular account')"
:out-transition="true"
size="small"
@closing="cancel">
Expand Down Expand Up @@ -40,9 +40,9 @@
:disabled="loading || message"
native-type="submit">
<template v-if="loading" #icon>
<NcLoadingIcon :name="t('guests', 'Transferring guest…')" />
<NcLoadingIcon :name="t('guests', 'Converting guest…')" />
</template>
{{ t('guests', 'Transfer') }}
{{ t('guests', 'Convert') }}
</NcButton>
</template>
</NcDialog>
Expand All @@ -68,14 +68,14 @@ import { logger } from '../services/logger.ts'
const generateMessage = ({ source, target, status }: { source: string, target: string, status: 'waiting' | 'started' }) => {
const matchStatus = {
waiting: t('guests', 'Transfer of guest {strongStart}{guest}{strongEnd} to {strongStart}{user}{strongEnd} is pending', {
waiting: t('guests', 'Conversion of guest "{strongStart}{guest}{strongEnd}" account to "{strongStart}{user}{strongEnd}" regular account is pending', {
guest: source,
user: target,
strongStart: '<strong>',
strongEnd: '</strong>',
}, undefined, { escape: false, sanitize: false }),
started: t('guests', 'Transfer of guest {strongStart}{guest}{strongEnd} to {strongStart}{user}{strongEnd} has started', {
started: t('guests', 'Conversion of guest "{strongStart}{guest}{strongEnd}" account to "{strongStart}{user}{strongEnd}" regular account has started', {
guest: source,
user: target,
strongStart: '<strong>',
Expand Down
4 changes: 2 additions & 2 deletions src/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const transferGuest = (_event: MouseEvent, user: User): void => {
if (userId === null) {
return
}
showSuccess(t('guests', 'Guest will be transferred to "{userId}" soon', { userId }))
showSuccess(t('guests', 'Guest will be converted to regular account soon (as "{userId}")', { userId }))
}

spawnDialog(TransferGuestDialog, {
Expand All @@ -32,7 +32,7 @@ const enabled = (user: User) => user?.backend === 'Guests'
const registerAction = () => {
window.OCA.Settings.UserList.registerAction(
SvgAccountArrowRight,
t('guests', 'Transfer guest to full account'),
t('guests', 'Convert guest to regular account'),
transferGuest,
enabled,
)
Expand Down

0 comments on commit d2954e2

Please sign in to comment.