Add Channels translations

This commit is contained in:
joker-x 2020-08-17 05:04:56 +02:00
parent 8e270e2ef7
commit adf1e0d083
8 changed files with 93 additions and 18 deletions

View file

@ -368,17 +368,17 @@ export default class CUD extends Component {
if (submitResult) { if (submitResult) {
if (this.props.entity) { if (this.props.entity) {
if (submitAndLeave) { if (submitAndLeave) {
this.navigateToWithFlashMessage('/channels', 'success', t('Channel updated')); this.navigateToWithFlashMessage('/channels', 'success', t('channelUpdated'));
} else { } else {
await this.getFormValuesFromURL(`rest/channels/${this.props.entity.id}`); await this.getFormValuesFromURL(`rest/channels/${this.props.entity.id}`);
this.enableForm(); this.enableForm();
this.setFormStatusMessage('success', t('Channel updated')); this.setFormStatusMessage('success', t('channelUpdated'));
} }
} else { } else {
if (submitAndLeave) { if (submitAndLeave) {
this.navigateToWithFlashMessage('/channels', 'success', t('Channel created')); this.navigateToWithFlashMessage('/channels', 'success', t('channelCreated'));
} else { } else {
this.navigateToWithFlashMessage(`/channels/${submitResult}/edit`, 'success', t('Channel created')); this.navigateToWithFlashMessage(`/channels/${submitResult}/edit`, 'success', t('channelCreated'));
} }
} }
} else { } else {
@ -505,7 +505,7 @@ export default class CUD extends Component {
deletedMsg={t('Channel deleted')}/> deletedMsg={t('Channel deleted')}/>
} }
<Title>{isEdit ? t('Edit Channel') : t('Create Channel')}</Title> <Title>{isEdit ? t('editChannel') : t('createChannel')}</Title>
{!canModify && {!canModify &&
<div className="alert alert-warning" role="alert"> <div className="alert alert-warning" role="alert">

View file

@ -61,7 +61,7 @@ export default class List extends Component {
if (perms.includes('view')) { if (perms.includes('view')) {
actions.push({ actions.push({
label: <Icon icon="inbox" title={t('Campaigns')}/>, label: <Icon icon="inbox" title={t('campaigns')}/>,
link: `/channels/${data[0]}/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; return actions;
} }
@ -92,7 +92,7 @@ export default class List extends Component {
{tableRestActionDialogRender(this)} {tableRestActionDialogRender(this)}
<Toolbar> <Toolbar>
{createPermitted && {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> </Toolbar>
@ -102,4 +102,4 @@ export default class List extends Component {
</div> </div>
); );
} }
} }

View file

@ -12,7 +12,7 @@ import {namespaceCheckPermissions} from "../lib/namespace";
function getMenus(t) { function getMenus(t) {
return { return {
'channels': { 'channels': {
title: t('Channels'), title: t('channels'),
link: '/channels', link: '/channels',
checkPermissions: { checkPermissions: {
createChannel: { createChannel: {
@ -29,14 +29,14 @@ function getMenus(t) {
panelRender: props => <ChannelsList permissions={props.permissions}/>, panelRender: props => <ChannelsList permissions={props.permissions}/>,
children: { children: {
':channelId([0-9]+)': { ':channelId([0-9]+)': {
title: resolved => t('Channel "{{name}}"', {name: ellipsizeBreadcrumbLabel(resolved.channel.name)}), title: resolved => t('channelName', {name: ellipsizeBreadcrumbLabel(resolved.channel.name)}),
resolve: { resolve: {
channel: params => `rest/channels/${params.channelId}` channel: params => `rest/channels/${params.channelId}`
}, },
link: params => `/channels/${params.channelId}/campaigns`, link: params => `/channels/${params.channelId}/campaigns`,
navs: { navs: {
campaigns: { campaigns: {
title: t('Campaigns'), title: t('campaigns'),
link: params => `/channels/${params.channelId}/campaigns`, link: params => `/channels/${params.channelId}/campaigns`,
visible: resolved => resolved.channel.permissions.includes('view'), visible: resolved => resolved.channel.permissions.includes('view'),
panelRender: props => <CampaignsList channel={props.resolved.channel} permissions={props.permissions} /> panelRender: props => <CampaignsList channel={props.resolved.channel} permissions={props.permissions} />
@ -64,7 +64,7 @@ function getMenus(t) {
} }
}, },
'create': { 'create': {
title: t('Create Channel'), title: t('createChannel'),
panelRender: props => <ChannelsCUD action="create" permissions={props.permissions} /> panelRender: props => <ChannelsCUD action="create" permissions={props.permissions} />
} }
} }

View file

@ -1045,5 +1045,20 @@
"dTsNext": "Nächste", "dTsNext": "Nächste",
"dTsPrevious": "Letzte", "dTsPrevious": "Letzte",
"dTsSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren", "dTsSortAscending": ": aktivieren, um Spalte aufsteigend zu sortieren",
"dTsSortDescending": ": aktivieren, um Spalte absteigend zu sortieren" "dTsSortDescending": ": aktivieren, um Spalte absteigend zu sortieren",
"saving": "Saving ...",
"channelUpdated": "Channel updated",
"channelCreated": "Channel created",
"deletingChannel": "Deleting channel ...",
"channelDeleted": "Channel deleted",
"editChannel": "Edit Channel",
"createChannel": "Create Channel",
"sendConfiguration": "Send configuration",
"sendConfiguration_plural": "Send configurations",
"disableOpenedTracking": "Disable opened tracking",
"disableClickedTracking": "Disable clicked tracking",
"save": "Save",
"saveAndLeave": "Save and leave",
"channels": "Channels",
"channelName": "Channel \"{{name}}\""
} }

View file

@ -1051,5 +1051,20 @@
"dTsNext": "Next", "dTsNext": "Next",
"dTsPrevious": "Previous", "dTsPrevious": "Previous",
"dTsSortAscending": ": activate to sort column ascending", "dTsSortAscending": ": activate to sort column ascending",
"dTsSortDescending": ": activate to sort column descending" "dTsSortDescending": ": activate to sort column descending",
"saving": "Saving ...",
"channelUpdated": "Channel updated",
"channelCreated": "Channel created",
"deletingChannel": "Deleting channel ...",
"channelDeleted": "Channel deleted",
"editChannel": "Edit Channel",
"createChannel": "Create Channel",
"sendConfiguration": "Send configuration",
"sendConfiguration_plural": "Send configurations",
"disableOpenedTracking": "Disable opened tracking",
"disableClickedTracking": "Disable clicked tracking",
"save": "Save",
"saveAndLeave": "Save and leave",
"channels": "Channels",
"channelName": "Channel \"{{name}}\""
} }

View file

@ -1121,5 +1121,20 @@
"dTsNext": "Siguiente", "dTsNext": "Siguiente",
"dTsPrevious": "Anterior", "dTsPrevious": "Anterior",
"dTsSortAscending": ": Activar para ordenar la columna de manera ascendente", "dTsSortAscending": ": Activar para ordenar la columna de manera ascendente",
"dTsSortDescending": ": Activar para ordenar la columna de manera descendente" "dTsSortDescending": ": Activar para ordenar la columna de manera descendente",
"saving": "Guardando ...",
"channelUpdated": "Canal actualizado",
"channelCreated": "Canal creado",
"deletingChannel": "Borrando canal ...",
"channelDeleted": "Canal borrado",
"editChannel": "Editar Canal",
"createChannel": "Crear Canal",
"sendConfiguration": "Configuración de envío",
"sendConfiguration_plural": "Configuraciones de envío",
"disableOpenedTracking": "Disable opened tracking",
"disableClickedTracking": "Disable clicked tracking",
"save": "Guardar",
"saveAndLeave": "Guardar y salir",
"channels": "Canales",
"channelName": "Canal \"{{name}}\""
} }

View file

@ -1046,5 +1046,20 @@
"dTsNext": "Suivant", "dTsNext": "Suivant",
"dTsPrevious": "Précédent", "dTsPrevious": "Précédent",
"dTsSortAscending": ": activer pour trier la colonne par ordre croissant", "dTsSortAscending": ": activer pour trier la colonne par ordre croissant",
"dTsSortDescending": ": activer pour trier la colonne par ordre décroissant" "dTsSortDescending": ": activer pour trier la colonne par ordre décroissant",
"saving": "Saving ...",
"channelUpdated": "Channel updated",
"channelCreated": "Channel created",
"deletingChannel": "Deleting channel ...",
"channelDeleted": "Channel deleted",
"editChannel": "Edit Channel",
"createChannel": "Create Channel",
"sendConfiguration": "Send configuration",
"sendConfiguration_plural": "Send configurations",
"disableOpenedTracking": "Disable opened tracking",
"disableClickedTracking": "Disable clicked tracking",
"save": "Save",
"saveAndLeave": "Save and leave",
"channels": "Channels",
"channelName": "Channel \"{{name}}\""
} }

View file

@ -1124,5 +1124,20 @@
"dTsNext": "Seguinte", "dTsNext": "Seguinte",
"dTsPrevious": "Anterior", "dTsPrevious": "Anterior",
"dTsSortAscending": ": Ordenar colunas de forma ascendente", "dTsSortAscending": ": Ordenar colunas de forma ascendente",
"dTsSortDescending": ": Ordenar colunas de forma descendente" "dTsSortDescending": ": Ordenar colunas de forma descendente",
"saving": "Saving ...",
"channelUpdated": "Channel updated",
"channelCreated": "Channel created",
"deletingChannel": "Deleting channel ...",
"channelDeleted": "Channel deleted",
"editChannel": "Edit Channel",
"createChannel": "Create Channel",
"sendConfiguration": "Send configuration",
"sendConfiguration_plural": "Send configurations",
"disableOpenedTracking": "Disable opened tracking",
"disableClickedTracking": "Disable clicked tracking",
"save": "Save",
"saveAndLeave": "Save and leave",
"channels": "Channels",
"channelName": "Channel \"{{name}}\""
} }