Ensure no placeholder-only strings are translated

Created on 20 September 2015, about 9 years ago
Updated 24 August 2024, 3 months ago

Follow-up to #2570285: Make sure TranslatableMarkup accepts string values only

Follow-up to #2557113: Make t() return a TranslationWrapper object to remove reliance on a static, unpredictable safe list

Problem/Motivation

t() accepts non-strings, empty strings and placeholders without further text such as t('@placeholder', ['@placeholder' => $variable], which can cause various issues.

Proposed solution

Fail when input doesn't make sense

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Language system 

Last updated about 6 hours ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇩🇪Germany cpj

Live updates comments and jobs are added and updated live.
  • Runtime assertion

    It deals with the addition of an assert() statement(s) to the code, and/or contains a test patch where one is failing indicating a need to change code or the documentation the statement was based on.

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.71.5 2024