Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commitcfda9b4
committed
bug#48833 [Translation] Handle the translation of empty strings (javiereguiluz)
This PR was squashed before being merged into the 5.4 branch.Discussion----------[Translation] Handle the translation of empty strings| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -In some apps, you might use an expression as the value of some `TranslatableMessage` object. The result of this expression can result in using an empty string as the value of the that object:```phpnew TranslatableMessage($someCondition ? $someObject->someMethod() : '')```The issue is that Symfony will report that empty string in the list of "missing translations" (like in the first row of this image):I think this is a bug and an empty string should just be output "as is" without reporting it as missing.What do you think? Is this truly a bug? Would it be a new feature for 6.3? The current behavior is correct and we should close without merging? Thanks.Commits-------f195579 [Translation] Handle the translation of empty stringsFile tree
2 files changed
+5
-0
lines changed- src/Symfony/Bridge/Twig
- Extension
- Tests/Extension
2 files changed
+5
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
0 commit comments
Comments
(0)