Add context to "in" t() function call in LengthUnit.php

Created on 15 June 2020, over 4 years ago
Updated 10 April 2024, 7 months ago

The "in" is translated using Drupal t() function as an ordinary word, not as measurement abbreviation. So it would be good to add context for this translation to translate it separately.
The patch is attached.

🐛 Bug report
Status

RTBC

Version

1.1

Component

Code

Created by

🇷🇺Russia Hamulus

Live updates comments and jobs are added and updated live.
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.

  • 🇨🇳China kongkx

    I think add context to all unit string is better.

          self::MILLIMETER => t('mm', [], ['context' => 'length unit']),
          self::CENTIMETER => t('cm', [], ['context' => 'length unit']),
          self::METER => t('m', [], ['context' => 'length unit']),
          self::KILOMETER => t('km', [], ['context' => 'length unit']),
          self::INCH => t('in', [], ['context' => 'length unit']),
          self::FOOT => t('ft', [], ['context' => 'length unit']),
          self::NAUTICAL_MILE => t('M', [], ['context' => 'length unit']),
    
  • 🇩🇪Germany Anybody Porta Westfalica
Production build 0.71.5 2024