Browse Source

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
master
Mélanie Chauvel 3 years ago
committed by GitHub
parent
commit
e49bd93211
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 18 additions and 18 deletions
  1. +5
    -5
      app/javascript/mastodon/features/compose/components/upload_button.js
  2. +1
    -1
      app/javascript/mastodon/locales/ast.json
  3. +1
    -1
      app/javascript/mastodon/locales/defaultMessages.json
  4. +1
    -1
      app/javascript/mastodon/locales/en.json
  5. +1
    -1
      app/javascript/mastodon/locales/ga.json
  6. +1
    -1
      app/javascript/mastodon/locales/hi.json
  7. +1
    -1
      app/javascript/mastodon/locales/kn.json
  8. +1
    -1
      app/javascript/mastodon/locales/lt.json
  9. +1
    -1
      app/javascript/mastodon/locales/lv.json
  10. +1
    -1
      app/javascript/mastodon/locales/mk.json
  11. +1
    -1
      app/javascript/mastodon/locales/ml.json
  12. +1
    -1
      app/javascript/mastodon/locales/mr.json
  13. +1
    -1
      app/javascript/mastodon/locales/ms.json
  14. +1
    -1
      app/javascript/mastodon/locales/ur.json

+ 5
- 5
app/javascript/mastodon/features/compose/components/upload_button.js View File

@ -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}

+ 1
- 1
app/javascript/mastodon/locales/ast.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "El borrador va perdese si coles de Mastodon.",
"upload_area.title": "Arrastra y suelta pa xubir",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "La xuba de ficheros nun ta permitida con encuestes.",
"upload_form.audio_description": "Descripción pa persones con perda auditiva",

+ 1
- 1
app/javascript/mastodon/locales/defaultMessages.json View File

@ -1206,7 +1206,7 @@
{
"descriptors": [
{
"defaultMessage": "Add media ({formats})",
"defaultMessage": "Add images, a video or an audio file",
"id": "upload_button.label"
}
],

+ 1
- 1
app/javascript/mastodon/locales/en.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/ga.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/hi.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/kn.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/lt.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/lv.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/mk.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/ml.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/mr.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/ms.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

+ 1
- 1
app/javascript/mastodon/locales/ur.json View File

@ -422,7 +422,7 @@
"trends.trending_now": "Trending now",
"ui.beforeunload": "Your draft will be lost if you leave Mastodon.",
"upload_area.title": "Drag & drop to upload",
"upload_button.label": "Add media ({formats})",
"upload_button.label": "Add images, a video or an audio file",
"upload_error.limit": "File upload limit exceeded.",
"upload_error.poll": "File upload not allowed with polls.",
"upload_form.audio_description": "Describe for people with hearing loss",

Loading…
Cancel
Save