opened
Jir4
username_0
**Symfony version(s) affected**: 4.3.9

**Description**  
Using a quote before a placeholder in a Yaml translation file cause it not to interpreted.

**How to reproduce**  
Use a string like this in a Yaml translation file :
```
news_add: L'{type}
```

Display the string in flash

```
$type = 'event';
$this->addFlash('success', $this->translator->trans('admin.message.news_add', [
                '%type%' => $type,
       ]);
```

Expected result:
`L'event` in a flash

Actual result:
`L'{type}`

**Additional context**  
The problem only exist when the quote is directly followeb by the placeholder, the problem be bypassed by adding a space or using a htm entity
Using a quote before a placeholder cause it not to be interpreted
issue
created
xabbuh
username_1
Your example uses `{type}` in the translation file, but `%type%` when calling the translator. I don't see how this could ever work. Can you double-check and create a small example application that allows to reproduce otherwise?
comment
created
Jir4
username_0
Umh, this mistake exist in our project, seems to be `intl` related, i'll give you an example project in few minutes, because as weird as it's seems, it's working.
comment
created
Jir4
username_0
@username_1 : here the test project : https://github.com/username_0/test-trans, you should just have to `composer install`, `bin/console server:run` and open you browser. After that you can play with space between the quote and the placeholder in `message+intl-icu.en.yml`
comment
created
stof
username_2
you should be using `type`, not `%type%`
comment
created
Jir4
username_0
@username_2 : totaly agree with this, it's a mistake due to a bad migration to intl in our code. The problem with the quote and the placeholder still exist without the percent signs
comment
closed
stof
username_2
issue
created
stof
username_2
hmm, that's because the quote is the escaping char in the ICU message format syntax: http://userguide.icu-project.org/formatparse/messages

So you will need to double the quote, so that it is as escaped quote rather than a quote escaping the curly brace.
comment
created
Jir4
username_0
Nice catch
comment