Document return value in \Drupal\locale\LocaleTranslation::getStringTranslation

Created on 4 February 2014, over 10 years ago
Updated 17 April 2023, about 1 year ago

Updated: Comment #0

Problem/Motivation

Noticed while reviewing #2122175-8: String translation does not honor language fallback โ†’ . See comment 8, point 8.c.

In https://api.drupal.org/api/drupal/core%21modules%21locale%21lib%21Drupal...

is

return $translation === TRUE ? FALSE : $translation;

huh? if true, return false?

so getStringTranslation returning true means no translation was found?

Proposed resolution

Make this make sense, or add some comments to at least explain it.

Remaining tasks

  • investigate if there is a bug (likely)
  • look at test coverage
  • discuss

User interface changes

No.

API changes

?

๐Ÿ“Œ Task
Status

Fixed

Version

9.5

Component
Localeย  โ†’

Last updated 4 days ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States YesCT

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

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.

Production build 0.69.0 2024