Improve wording of the “Add media” button tooltip (#13954)
- Remove (incomplete) list of supported formats - List types of media (image, video, audio) - Tell that several images could be uploaded using plural
This commit is contained in:
		
					parent
					
						
							
								f5cea4d2ea
							
						
					
				
			
			
				commit
				
					
						e49bd93211
					
				
			
		
					 14 changed files with 18 additions and 18 deletions
				
			
		|  | @ -7,11 +7,9 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; | |||
| import ImmutablePropTypes from 'react-immutable-proptypes'; | ||||
| 
 | ||||
| const messages = defineMessages({ | ||||
|   upload: { id: 'upload_button.label', defaultMessage: 'Add media ({formats})' }, | ||||
|   upload: { id: 'upload_button.label', defaultMessage: 'Add images, a video or an audio file' }, | ||||
| }); | ||||
| 
 | ||||
| const SUPPORTED_FORMATS = 'JPEG, PNG, GIF, WebM, MP4, MOV, OGG, WAV, MP3, FLAC'; | ||||
| 
 | ||||
| const makeMapStateToProps = () => { | ||||
|   const mapStateToProps = state => ({ | ||||
|     acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']), | ||||
|  | @ -60,11 +58,13 @@ class UploadButton extends ImmutablePureComponent { | |||
|       return null; | ||||
|     } | ||||
| 
 | ||||
|     const message = intl.formatMessage(messages.upload); | ||||
| 
 | ||||
|     return ( | ||||
|       <div className='compose-form__upload-button'> | ||||
|         <IconButton icon='paperclip' title={intl.formatMessage(messages.upload, { formats: SUPPORTED_FORMATS })} disabled={disabled} onClick={this.handleClick} className='compose-form__upload-button-icon' size={18} inverted style={iconStyle} /> | ||||
|         <IconButton icon='paperclip' title={message} disabled={disabled} onClick={this.handleClick} className='compose-form__upload-button-icon' size={18} inverted style={iconStyle} /> | ||||
|         <label> | ||||
|           <span style={{ display: 'none' }}>{intl.formatMessage(messages.upload, { formats: SUPPORTED_FORMATS })}</span> | ||||
|           <span style={{ display: 'none' }}>{message}</span> | ||||
|           <input | ||||
|             key={resetFileKey} | ||||
|             ref={this.setRef} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue