Add Channels translations
This commit is contained in:
parent
8e270e2ef7
commit
adf1e0d083
8 changed files with 93 additions and 18 deletions
|
@ -368,17 +368,17 @@ export default class CUD extends Component {
|
|||
if (submitResult) {
|
||||
if (this.props.entity) {
|
||||
if (submitAndLeave) {
|
||||
this.navigateToWithFlashMessage('/channels', 'success', t('Channel updated'));
|
||||
this.navigateToWithFlashMessage('/channels', 'success', t('channelUpdated'));
|
||||
} else {
|
||||
await this.getFormValuesFromURL(`rest/channels/${this.props.entity.id}`);
|
||||
this.enableForm();
|
||||
this.setFormStatusMessage('success', t('Channel updated'));
|
||||
this.setFormStatusMessage('success', t('channelUpdated'));
|
||||
}
|
||||
} else {
|
||||
if (submitAndLeave) {
|
||||
this.navigateToWithFlashMessage('/channels', 'success', t('Channel created'));
|
||||
this.navigateToWithFlashMessage('/channels', 'success', t('channelCreated'));
|
||||
} else {
|
||||
this.navigateToWithFlashMessage(`/channels/${submitResult}/edit`, 'success', t('Channel created'));
|
||||
this.navigateToWithFlashMessage(`/channels/${submitResult}/edit`, 'success', t('channelCreated'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -505,7 +505,7 @@ export default class CUD extends Component {
|
|||
deletedMsg={t('Channel deleted')}/>
|
||||
}
|
||||
|
||||
<Title>{isEdit ? t('Edit Channel') : t('Create Channel')}</Title>
|
||||
<Title>{isEdit ? t('editChannel') : t('createChannel')}</Title>
|
||||
|
||||
{!canModify &&
|
||||
<div className="alert alert-warning" role="alert">
|
||||
|
|
|
@ -61,7 +61,7 @@ export default class List extends Component {
|
|||
|
||||
if (perms.includes('view')) {
|
||||
actions.push({
|
||||
label: <Icon icon="inbox" title={t('Campaigns')}/>,
|
||||
label: <Icon icon="inbox" title={t('campaigns')}/>,
|
||||
link: `/channels/${data[0]}/campaigns`
|
||||
});
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ export default class List extends Component {
|
|||
});
|
||||
}
|
||||
|
||||
tableAddDeleteButton(actions, this, perms, `rest/channels/${data[0]}`, data[1], t('Deleting channel ...'), t('Channel deleted'));
|
||||
tableAddDeleteButton(actions, this, perms, `rest/channels/${data[0]}`, data[1], t('deletingChannel'), t('channelDeleted'));
|
||||
|
||||
return actions;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ export default class List extends Component {
|
|||
{tableRestActionDialogRender(this)}
|
||||
<Toolbar>
|
||||
{createPermitted &&
|
||||
<LinkButton to="/channels/create" className="btn-primary" icon="plus" label={t('Create Channel')}/>
|
||||
<LinkButton to="/channels/create" className="btn-primary" icon="plus" label={t('createChannel')}/>
|
||||
}
|
||||
</Toolbar>
|
||||
|
||||
|
@ -102,4 +102,4 @@ export default class List extends Component {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import {namespaceCheckPermissions} from "../lib/namespace";
|
|||
function getMenus(t) {
|
||||
return {
|
||||
'channels': {
|
||||
title: t('Channels'),
|
||||
title: t('channels'),
|
||||
link: '/channels',
|
||||
checkPermissions: {
|
||||
createChannel: {
|
||||
|
@ -29,14 +29,14 @@ function getMenus(t) {
|
|||
panelRender: props => <ChannelsList permissions={props.permissions}/>,
|
||||
children: {
|
||||
':channelId([0-9]+)': {
|
||||
title: resolved => t('Channel "{{name}}"', {name: ellipsizeBreadcrumbLabel(resolved.channel.name)}),
|
||||
title: resolved => t('channelName', {name: ellipsizeBreadcrumbLabel(resolved.channel.name)}),
|
||||
resolve: {
|
||||
channel: params => `rest/channels/${params.channelId}`
|
||||
},
|
||||
link: params => `/channels/${params.channelId}/campaigns`,
|
||||
navs: {
|
||||
campaigns: {
|
||||
title: t('Campaigns'),
|
||||
title: t('campaigns'),
|
||||
link: params => `/channels/${params.channelId}/campaigns`,
|
||||
visible: resolved => resolved.channel.permissions.includes('view'),
|
||||
panelRender: props => <CampaignsList channel={props.resolved.channel} permissions={props.permissions} />
|
||||
|
@ -64,7 +64,7 @@ function getMenus(t) {
|
|||
}
|
||||
},
|
||||
'create': {
|
||||
title: t('Create Channel'),
|
||||
title: t('createChannel'),
|
||||
panelRender: props => <ChannelsCUD action="create" permissions={props.permissions} />
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue