Problem/Motivation

Button with text "Select files" is plural, but field might be restricted to accept only 1 entity.

User interface changes

Patch provides a new singular string for "Select files"

Comments

sokru created an issue. See original summary.

sokru’s picture

Status: Active » Needs review
StatusFileSize
new842 bytes
sokru’s picture

Patch with formatPlural.

netboss’s picture

In our case we also needed to have the plural vs singular issue fixed for the "Add file" window which was also displaying "Drop files here to upload them", so we adjusted the above path and included a change that extend to the media add window, so when it is limited to only one file it'll read: "Drop file here to upload it".

swirt’s picture

Status: Needs review » Reviewed & tested by the community

  • jungle committed ea20c944 on 8.x-2.x
    Issue #3174484 by sokru, netboss, swirt: Select files button text should...
jungle’s picture

Committed, thanks!

jungle’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

stefan.korn’s picture

if max_files (aka DropZone MaxFiles) is not set, the plural label should be used, because there is no limitation on number of files then. Now this is getting singular label, because cardinality is set to 0 by default and 0 is interpreted as singular.

I suppose $cardinality should be -1 instead by default, which will bring up plural label, see https://git.drupalcode.org/project/dropzonejs/-/blob/f3ac85c8d535452bd89...