Translation of file count is incorrect

Created on 21 June 2017, over 7 years ago
Updated 1 September 2024, 3 months ago

Problem/Motivation

The view /admin/content/files shows me an incorrect file count.

- Drupal core 8.3.3
- It also exists in Drupal core 11.0.0

The issue is being addressed by preparing translations for each language, changing the translation from 1 to @count.
However, it appears more appropriate to change the original string from a fixed 1 to @count as well.

Steps to reproduce

  • Install Drupal. Specify a language with plurals determined by 1 or more [plural=(n>1)].
    • Ensure the language is specified in the po file description with plural=(n>1).
  • After installation, attach and save an image in the article content.
  • Remove the image from the previously created article content and delete any revisions where the image existed.
  • When viewing /admin/content/files, the translation text equivalent to the singular "1 place" is displayed for "Used in".
    • In languages treating 0 as singular, "1 place" is displayed instead of 0, which is unintended.

Proposed resolution

Change the view settings for the file list that is optionally created during installation.

To display the correct number of files in the file list, change the value of the singular form field from "1 place" to "@count place".

This change is useful in languages where the singular form is not limited to 1.

Remaining tasks

NA

User interface changes

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

πŸ› Bug report
Status

Fixed

Version

10.4 ✨

Component
File systemΒ  β†’

Last updated about 11 hours ago

Created by

πŸ‡¨πŸ‡­Switzerland handkerchief

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024