-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] [Lokalize] Configure replace_breaks
to prevent issues with multilines translations
#48222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…with multilines translations
replace_breaks
to prevent issues with multilines translationsreplace_breaks
to prevent issues with multilines translations
Failures are unrelated. |
@@ -562,6 +562,7 @@ public function testReadForOneLocaleAndOneDomain(string $locale, string $domain, | |||
'filter_langs' => [$locale], | |||
'filter_filenames' => [$domain.'.xliff'], | |||
'export_empty_as' => 'skip', | |||
'replace_breaks' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about extending the test with your use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't contact Lokalise API during tests, is it really useful?
Related to #45368, I think both PR are needed to fix the issue of ICU translations pulling from Lokalise. |
Thank you @Kocal. |
Hi, as seen with @welcoMattic in private messages, I faced an issue when pulling translations from Lokalise.
Given the following translation, with newlines:

When I pull it, this is what the translation looks like in the Symfony's

.xliff
:Which leads to a syntax issue for the ICU formatter:

Using

replace_breaks: false
will fix this issue by preserving newlines: