Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#33242 closed defect (bug) (fixed)

Invalid file type - similar strings

Reported by: pavelevap Owned by: SergeyBiryukov
Priority: normal Milestone: 4.8
Component: Media Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

We have 3 very similar strings which are used for same error:

Invalid file type
This file type is not allowed. Please try another.
Sorry, this file type is not permitted for security reasons.

I do not see any reason why we should preserve them all? I can create patch, but I am not sure which one is the best? Maybe some simple combination like "Sorry, this file type is not allowed."?

Attachments (1)

33242.diff​ (2.1 KB ) - added by jackreichert 10 years ago.
Proposed language change implementation.

Download all attachments as: .zip

Change History (10)

#1 @DrewAPicture
11 years ago

  • Keywords needs-patch added

This ticket was mentioned in ​Slack in #core by obenland. ​View the logs.


11 years ago

#3 @ocean90
11 years ago

  • Component I18N → Media
  • Version trunk

#4 @swissspidy
11 years ago

All three strings are used in different contexts:

  • Invalid file type is used as an error message in wp_upload_bits
  • This file type is not allowed. Please try another. is used as an error message for the flash uploader. Most error messages there have the Please try another. ending.
  • Sorry, this file type is not permitted for security reasons. is used in _wp_handle_upload

At best merging strings 1 and 3 would make sense in my opinion.

#5 @pavelevap
11 years ago

Yes, different functions, but users should know the same thing for all cases: "This file type is not allowed". I do not see a reason to tell them that it can be "invalid", "not allowed" or "not permitted".

I would ignore "Please try another" part, because it is not exact. Another what? Filetype or file?

"Sorry, this file type is not allowed to upload." or something similar could be enough for all cases.

#6 @wonderboymusic
11 years ago

  • Milestone Awaiting Review → Future Release

@jackreichert
10 years ago

Proposed language change implementation.

#7 @jackreichert
10 years ago

  • Keywords has-patch added; needs-patch removed

#8 @SergeyBiryukov
10 years ago

  • Milestone Future Release → 4.8

#9 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 39891:

Media: Use a consistent error message for file type errors on uploading.

Props pavelevap, jackreichert.
Fixes #33242.

Note: See TracTickets for help on using tickets.