diff --git a/js/components/ascribe_buttons/acl_button_list.js b/js/components/ascribe_buttons/acl_button_list.js index 83495363..42f86320 100644 --- a/js/components/ascribe_buttons/acl_button_list.js +++ b/js/components/ascribe_buttons/acl_button_list.js @@ -6,9 +6,9 @@ import UserActions from '../../actions/user_actions'; import UserStore from '../../stores/user_store'; import ConsignButton from './acls/consign_button'; +import EmailButton from './acls/email_button'; import LoanButton from './acls/loan_button'; import LoanRequestButton from './acls/loan_request_button'; -import ShareButton from './acls/share_button'; import TransferButton from './acls/transfer_button'; import UnconsignButton from './acls/unconsign_button'; @@ -90,7 +90,7 @@ let AclButtonList = React.createClass({ return (
- { - return this.getInfoText(getLangText(titles[verb]), getLangText(informationSentences[verb]), getLangText(exampleSentences[verb])); + const title = titles[verb]; + const informationSentence = informationSentences[verb]; + const exampleSentence = exampleSentences[verb]; + + if (title && informationSentence && exampleSentence) { + return this.getInfoText(getLangText(title), getLangText(informationSentence), getLangText(exampleSentence)); + } }); }, diff --git a/js/components/ascribe_buttons/acls/acl_button.js b/js/components/ascribe_buttons/acls/acl_button.js index 82650bb6..1edf8b64 100644 --- a/js/components/ascribe_buttons/acls/acl_button.js +++ b/js/components/ascribe_buttons/acls/acl_button.js @@ -15,6 +15,7 @@ import GlobalNotificationModel from '../../../models/global_notification_model'; import GlobalNotificationActions from '../../../actions/global_notification_actions'; import ApiUrls from '../../../constants/api_urls'; +import { AclInformationText } from '../../../constants/acl_information_text'; import { getAclFormMessage, getAclFormDataId } from '../../../utils/form_utils'; import { getLangText } from '../../../utils/lang_utils'; @@ -41,12 +42,11 @@ export default function ({ action, displayName, title, tooltip }) { className: React.PropTypes.string }, - // Removes the acl_ prefix and converts to upper case sanitizeAction() { if (this.props.buttonAcceptName) { return this.props.buttonAcceptName; } - return action.split('acl_')[1].toUpperCase(); + return AclInformationText.titles[action]; }, render() { diff --git a/js/components/ascribe_buttons/acls/share_button.js b/js/components/ascribe_buttons/acls/email_button.js similarity index 53% rename from js/components/ascribe_buttons/acls/share_button.js rename to js/components/ascribe_buttons/acls/email_button.js index 83781aed..81317618 100644 --- a/js/components/ascribe_buttons/acls/share_button.js +++ b/js/components/ascribe_buttons/acls/email_button.js @@ -8,7 +8,7 @@ import { getLangText } from '../../../utils/lang_utils'; export default AclButton({ action: 'acl_share', - displayName: 'ShareButton', - title: getLangText('Share artwork'), - tooltip: getLangText('Share the artwork') + displayName: 'EmailButton', + title: getLangText('Share artwork via email'), + tooltip: getLangText("Share the artwork to another user's collection through email") }); diff --git a/js/constants/information_text.js b/js/constants/acl_information_text.js similarity index 91% rename from js/constants/information_text.js rename to js/constants/acl_information_text.js index 442e481e..233be36f 100644 --- a/js/constants/information_text.js +++ b/js/constants/acl_information_text.js @@ -1,10 +1,12 @@ 'use strict'; -export const InformationTexts = { +export const AclInformationText = { 'titles': { 'acl_consign': 'CONSIGN', 'acl_loan': 'LOAN', - 'acl_share': 'SHARE', + 'acl_loan_request': 'LOAN', + 'acl_share': 'EMAIL', + 'acl_transfer': 'TRANSFER', 'acl_delete': 'DELETE', 'acl_create_editions': 'CREATE EDITIONS', 'acl_unconsign': 'UNCONSIGN', @@ -24,10 +26,10 @@ export const InformationTexts = { 'acl_consign': '(e.g. an artist Consigns 10 Editions of her new Work to a gallery ' + 'so the gallery can sell them on her behalf, under the terms the artist and the gallery have agreed to)', 'acl_loan': '(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)', - 'acl_share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents)', + 'acl_share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents by email)', 'acl_delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)', 'acl_create_editions': '(e.g. A company commissions a visual artists to create three limited edition prints for a giveaway)', 'acl_unconsign': '(e.g. An artist regains full control over their work and releases the consignee of any rights or responsibilities)', 'acl_request_unconsign': '(e.g. An artist submits an unconsign request to a gallery after his exhibition ends, as per their agreement)' } -}; \ No newline at end of file +}; diff --git a/js/constants/languages.js b/js/constants/languages.js index 4a40d9a4..090ec3ce 100644 --- a/js/constants/languages.js +++ b/js/constants/languages.js @@ -17,6 +17,7 @@ const languages = { '%s license': '%s license', 'Log into': 'Log into', 'Email': 'Email', + 'EMAIL': 'EMAIL', 'Enter your email': 'Enter your email', 'Password': 'Password', 'Enter your password': 'Enter your password', @@ -245,6 +246,7 @@ const languages = { '%s license': '%s license', 'Log into': 'Log into', 'Email': 'Email', + 'EMAIL': 'EMAIL', 'Enter your email': 'Enter your email', 'Password': 'Password', 'Enter your password': 'Enter your password', @@ -473,6 +475,7 @@ const languages = { '%s license': '%s license', 'Log into': 'Se connecter à', 'Email': 'E-mail', + 'EMAIL': 'E-MAIL', 'Enter your email': 'Entrez votre courriel', 'Password': 'Mot de passe', 'Enter your password': 'Entrez votre mot de passe',