Terminology update: don't say "Resolution" when we mean "Dimensions"

Created on 12 July 2011, over 13 years ago
Updated 12 November 2023, about 1 year ago

Original report by @jenlampton →

Problem/Motivation

On the image field settings form, the two field labels "Maximum image resolution" and "Minimum image resolution" should really be "Maximum image dimensions" and "Minimum image dimensions" .

Though wikipedia admits that the former is commonly used to mean 'dimensions', this tends to trip up people with print or graphic design backgrounds, who actually expect to limit an image's true resolution.

Proposed solution

In Drupal 10 and 11, We should update all the user interface text, and corresponding code to all these values dimensions instead of resolutions.

In Drupal 10 and 11 we may need to provide an update hook to move variables in the field config tables from the old D7 names to the new D10 and 11 names.

In Drupal 7, we should update only the user interface text.

Remaining tasks

- D10 and 11: Update user interface text
- D10 and 11: Update code to match UI
- D7: Update user interface text only.

User interface changes

- "Maximum image resolution" should become "Maximum image dimensions"
- "Minimum image resolution" should become "Minimum image dimensions"

API changes

- function rename (in file.module):
function file_validate_image_resolution(FileInterface $file, $maximum_dimensions = 0, $minimum_dimensions = 0) is renamed to "file_validate_image_dimensions"
- method rename (in class ImageItem):
public static function validateResolution($element, &$form_state) is renamed to "validateDimensions"

Related issues

#1134022: Update "Maximum image resolution" to read "Maximum image dimensions" →
#1215730: Terminology update: don't say "Resolution" when we mean "Dimensions" →

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
📌 Task
Status

Fixed

Version

11.0 🔥

Component
File module  →

Last updated about 20 hours ago

Created by

🇺🇸United States jenlampton

Live updates comments and jobs are added and updated live.
  • String freeze

    It affects the translatable strings and it should be committed before the string freeze milestone of the release cycle.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇫🇮Finland simohell

    This issue is still very much valid and came up in the last Usability meeting 📌 Drupal Usability Meeting 2023-10-27 RTBC as we reviewed an issue on resizing image. This should be done everywhere: replace incorrect "resolution" with the correct "dimensions" especially for all user facing texts.

    I wonder of this could be split to 2 issues to provide the first easier fix faster?

    1. Fix the user facing text
    2. Change the variable names and other related code

    I removed some of the tags that listed old events.

  • 🇫🇮Finland lauriii Finland

    Splitting the variable / API changes to a separate issue was recommended by @xjm in #122 so that seems like a good way to proceed here.

  • @simohell opened merge request.
  • Status changed to Needs review about 1 year ago
  • 🇫🇮Finland simohell

    I made updates to comments and user interface changing the word resolution to dimensions where relevant.
    This does not change wording where referencing Drupal 6 terms (migration).
    Does not update any variables and that would be a follow-up issue.

  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    Opened 📌 Update variable/API terminology to not use "Resolution" Active so removing "Needs follow up" tag
    Since API changes were moved to follow up removing upgrade path and change record tag. Believe the attach CR on this issue could probably be deleted.

    String freeze and minor version target I don't recognize but don't think they fully apply.

    Looking at MR 5227 I only see label and comment changes so seems in scope of this issue.

  • 🇺🇸United States xjm

    Assuming the MR is canonical here since the patch files are very old. Please remember to hide patch files when converting a patch to an MR. Thanks!

  • 🇺🇸United States xjm
  • 🇺🇸United States xjm

    Saving issue credits. (That took awhile.)

  • 🇺🇸United States xjm
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States xjm
    • I reviewed locally with git diff --color-words and verified that all the changes are updating code comments or UI strings where "resolution" is incorrectly used for image dimensions.

    • I grepped for:

      grep -ri "resolution" * | grep "//" | grep -v "vendor" | grep -v "node_modules"
      

      I verified that there were no other inline comments incorrectly referring to image dimensions as "resolution".

    • I grepped for:

      grep -ri "resolution" * | grep -v "vendor" | grep -v "node_modules" | grep '\*'
      

      ...to check for the same thing in docblocks. Doing so, I found the following files where the word "resolution" is used to mean "dimensions" in the docblock summaries for several test methods:

      core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileImageDimensionsConstraintValidatorTest.php
      core/modules/file/tests/src/Kernel/LegacyValidatorTest.php
      core/modules/image/tests/src/Kernel/ImageItemTest.php
      

      Renaming the test methods themselves is scoped to the followup, but the docblock should be updated now.

    • I grepped for:

      grep -ri "resolution" * | grep -v "vendor" | grep -v "node_modules" | grep "\bt("
      

      ...to check for obvious translatable strings containing the word. Image resolutions are mentioned in image_help(), but in that case it's maybe correct? Please evluate whether you think this should be changed or not:

      As an example, you might upload a high-resolution image with a 4:3 aspect ratio, and display it scaled down, square cropped, or black-and-white (or any combination of these effects).

      .

      Do they simply mean a large image, or do they mean a high-resolution image?

    NW to at least fix the three test docblocks. Thanks!

  • 🇫🇮Finland simohell

    I updated the 3 tests for word "dimensions".

    I had deliberately left out changing the "high-resolution" part since it makes sense if read according to for instance Adobe's definition
    "High resolution images are pictures or photos where the media has higher concentrations of pixels or dots, resulting in better quality and clarity of the image – as it contains more detail."

    A number of end users deal with high-resolution photographs and the help-text would make sense to them. In the past the industry used terms like "press quality", "print quality" or "web quality" and here press & print would be high-resolution and web quality low-resolution. The help text communicates that Drupal handles original high-resolution photos just fine.

  • Status changed to Needs review about 1 year ago
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    Appears feedback for the 3 dockblocks has been addressed.

    • xjm → committed df6c4b70 on 11.x
      Issue #1215784 by Saphyel, jenlampton, penyaskito, jlscott, simohell,...
    • xjm → committed f7a7eba4 on 10.2.x
      Issue #1215784 by Saphyel, jenlampton, penyaskito, jlscott, simohell,...
  • Status changed to Fixed about 1 year ago
  • 🇺🇸United States xjm

    Thanks @simohell; that explanation works for me.

    Committed to 11.x and 10.2.x as it includes minor-only updates to UI strings. Thanks!

  • 🇺🇸United States xjm

    I went to publish the CR, but then realized it should actually be about the API and data model changes, not the simple string changes. So I removed it from this issue and reattached it to the followup instead.

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

Production build 0.71.5 2024