diff --git a/src/lib/contrib/askprovider/AskProviderApp.js b/src/lib/contrib/askprovider/AskProviderApp.js index 1a78b96..9a3ab1c 100644 --- a/src/lib/contrib/askprovider/AskProviderApp.js +++ b/src/lib/contrib/askprovider/AskProviderApp.js @@ -7,6 +7,7 @@ */ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import { Button, Icon } from 'semantic-ui-react'; @@ -25,8 +26,13 @@ export class AskProviderApp extends Component { super(props); // Extracting parameters - const { commentsApi, record, defaultQueryParams, userIsAuthenticated } = - this.props; + const { + commentsApi, + record, + defaultQueryParams, + userIsAuthenticated, + buttonText, + } = this.props; // Creating Comments API client const commentsApiClient = new CommentsApiClient( @@ -47,6 +53,8 @@ export class AskProviderApp extends Component { }; this.store = configureStore(appConfig); + + this.text = buttonText; } render() { @@ -62,7 +70,7 @@ export class AskProviderApp extends Component { animated={'fade'} > - {i18next.t('Ask the provider')} + {this.text} { @@ -74,3 +82,15 @@ export class AskProviderApp extends Component { ); } } + +AskProviderApp.propTypes = { + commentsApi: PropTypes.object, + record: PropTypes.object, + defaultQueryParams: PropTypes.object, + userIsAuthenticated: PropTypes.object, + buttonText: PropTypes.string, +}; + +AskProviderApp.defaultProps = { + buttonText: i18next.t('Ask the provider'), +}; diff --git a/src/lib/contrib/askprovider/components/AskProviderModal.js b/src/lib/contrib/askprovider/components/AskProviderModal.js index e7bd33d..1cd0f8a 100644 --- a/src/lib/contrib/askprovider/components/AskProviderModal.js +++ b/src/lib/contrib/askprovider/components/AskProviderModal.js @@ -41,12 +41,12 @@ const AskProviderModalComponent = ({ isModalOpen, onModalClose, user }) => { setMessageVisibility(false); }} header={i18next.t( - 'Get in touch with the Knowledge Provider' + 'Get in touch with the Provider' )} content={i18next.t( - 'Knowledge Providers do their best to bring you ' + + 'Providers do their best to bring you ' + 'the most helpful content. However, sometimes it is necessary to ask. In this' + - ' tab, you can talk directly to the Knowledge Provider. Ask your question and keep in touch.' + ' tab, you can talk directly to the Provider. Ask your question and keep in touch.' )} /> )} diff --git a/src/lib/contrib/feedback/FeedbackApp.js b/src/lib/contrib/feedback/FeedbackApp.js index 6b1b253..c93c4c9 100644 --- a/src/lib/contrib/feedback/FeedbackApp.js +++ b/src/lib/contrib/feedback/FeedbackApp.js @@ -7,6 +7,7 @@ */ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import { Button, Icon } from 'semantic-ui-react'; @@ -22,8 +23,13 @@ export class FeedbackApp extends Component { super(props); // Extracting parameters - const { commentsApi, record, defaultQueryParams, userIsAuthenticated } = - this.props; + const { + commentsApi, + record, + defaultQueryParams, + userIsAuthenticated, + buttonText, + } = this.props; // Creating Comments API client const commentsApiClient = new CommentsApiClient( @@ -44,6 +50,8 @@ export class FeedbackApp extends Component { }; this.store = configureStore(appConfig); + + this.text = buttonText; } render() { @@ -59,7 +67,7 @@ export class FeedbackApp extends Component { animated={'fade'} > - {i18next.t('Learn the community experience with this package')} + {this.text} - +

Community feedback for {recordTitle}

diff --git a/src/lib/contrib/feedback/components/modal/FeedbackModal.js b/src/lib/contrib/feedback/components/modal/FeedbackModal.js index acacd78..83ad5b3 100644 --- a/src/lib/contrib/feedback/components/modal/FeedbackModal.js +++ b/src/lib/contrib/feedback/components/modal/FeedbackModal.js @@ -102,7 +102,7 @@ export class FeedbackModalComponent extends Component { {' '} - {i18next.t('Share your experience with this element')} + {i18next.t('Share your experience with this content.')} {errors.topics && ( @@ -123,7 +123,7 @@ export class FeedbackModalComponent extends Component { 2 {' '} {i18next.t( - 'Tell the community a bit about your experiences with this element.' + 'Tell the community a bit about your experiences.' )}