From ad17415aaed7d49e13448eda3a490a04b704af81 Mon Sep 17 00:00:00 2001 From: Otto Sichert Date: Wed, 4 Oct 2017 19:31:19 +0200 Subject: [PATCH] Add translations for URL attachments --- src/components/header/AttachUrl.js | 28 ++++++++++------------------ src/components/header/Attachments.js | 5 +---- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/components/header/AttachUrl.js b/src/components/header/AttachUrl.js index 189b8a348..bf43c29ef 100644 --- a/src/components/header/AttachUrl.js +++ b/src/components/header/AttachUrl.js @@ -1,4 +1,4 @@ -// import counterpart from 'counterpart'; +import counterpart from 'counterpart'; import React, { Component } from 'react'; import { connect } from 'react-redux'; @@ -58,18 +58,14 @@ class AttachUrl extends Component { fetchAttachments(); dispatch(addNotification( - // counterpart.translate('window.attachment.url.title'), - 'Attachment', - // counterpart.translate('window.attachment.url.success'), - 'URL has been added.', + counterpart.translate('window.attachment.url.title'), + counterpart.translate('window.attachment.url.success'), 5000, 'success', )); }).catch(() => { dispatch(addNotification( - // counterpart.translate('window.attachment.url.title'), - 'Attachment', - // counterpart.translate('window.attachment.url.error'), - 'URL could not be added!', + counterpart.translate('window.attachment.url.title'), + counterpart.translate('window.attachment.url.error'), 5000, 'error', )); }); @@ -89,21 +85,19 @@ class AttachUrl extends Component { className="panel-attachurl-header panel-attachurl-header-top" > - URL attachment - {/* {counterpart.translate('window.attachment.url.title')} */} + {counterpart.translate('window.attachment.url.title')}
- +
- URL - {/* {counterpart.translate('window.attachment.url.url')} */} + {counterpart.translate('window.attachment.url.url')}
- Name - {/* {counterpart.translate('window.attachment.url.name')} */} + {counterpart.translate('window.attachment.url.name')} - Create - {/* {counterpart.translate('window.attachment.url.create')} */} + {counterpart.translate('window.attachment.url.create')}
diff --git a/src/components/header/Attachments.js b/src/components/header/Attachments.js index f70a90014..d431e9f96 100644 --- a/src/components/header/Attachments.js +++ b/src/components/header/Attachments.js @@ -108,10 +108,7 @@ class Attachments extends Component { className="subheader-item js-subheader-item" onClick={this.handleClickAttachUrl} > - Add URL - {/* TODO: find out how to add translations and use this instead: - {counterpart.translate('window.sideList.attachments.addurl')} - */} + {counterpart.translate('window.attachment.url.add')} {isAttachUrlOpen && (