1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-24 10:16:29 +02:00

Change instances of "Share" to be "Email"

This commit is contained in:
Brett Sun 2015-11-10 11:53:05 +01:00
parent 61cd316a86
commit 3cfa65cb82
6 changed files with 26 additions and 15 deletions

View File

@ -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 (
<div className={className}>
<span ref="buttonList" style={buttonsStyle}>
<ShareButton
<EmailButton
availableAcls={availableAcls}
pieceOrEditions={pieceOrEditions}
currentUser={currentUser}

View File

@ -3,7 +3,7 @@
import React from 'react';
import classnames from 'classnames';
import { InformationTexts } from '../../constants/information_text';
import { AclInformationText } from '../../constants/acl_information_text';
import { replaceSubstringAtIndex, sanitize, intersectLists } from '../../utils/general_utils';
import { getLangText } from '../../utils/lang_utils';
@ -38,7 +38,7 @@ let AclInformation = React.createClass({
},
getInfoText(title, info, example){
let aim = this.props.aim;
const aim = this.props.aim;
if(aim) {
if(aim === 'form') {
@ -75,7 +75,7 @@ let AclInformation = React.createClass({
},
produceInformationBlock() {
const { titles, informationSentences, exampleSentences } = InformationTexts;
const { titles, informationSentences, exampleSentences } = AclInformationText;
const { verbs, aim } = this.props;
const availableInformations = intersectLists(verbs, Object.keys(titles));
@ -95,7 +95,13 @@ let AclInformation = React.createClass({
}
return verbsToDisplay.map((verb) => {
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));
}
});
},

View File

@ -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() {

View File

@ -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")
});

View File

@ -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)'
}
};
};

View File

@ -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',