Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Translator] Literal and (HTML) safe translatables #44937

Closed
@ro0NL

Description

@ro0NL

Description

Inspired by#44911

To work with translatable strings in a uniform way, currently 2 features are missing still IMHO.

  1. bypass the translator for literal text, and avoid if/else based on eg.string|Translatable input
$t = TranslatableMessage::literal('should not be translated')->trans(...);
  1. a bit more controversial; bypass (HTML) escaping

this is arguably already a first-class concept to regognize:https://symfony.com/doc/current/reference/forms/types/form.html#label-html

$t = TranslatableMessage::safe('should be translated, but not escaped when rendered')->trans(...);

This would generalize the case of bypass-escaping in whatever context ...

This could combine 3)safeLiteral()

WDYT?

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp