Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

Fix POT rendering of line breaks #14

Merged
merged 1 commit into from Aug 8, 2016
Merged

Fix POT rendering of line breaks #14

merged 1 commit into from Aug 8, 2016

Conversation

akirk
Copy link
Member

@akirk akirk commented Aug 6, 2016

Currently line breaks within strings lead to invalid POT files:

#: wp-calypso/client/my-sites/exporter/guided-transfer-details.jsx:28
msgid ""
"Have one of our Happiness Engineers {{strong}}transfer your
site{{/strong}} "
"to a self-hosted WordPress.org installation with
one of our hosting partners."
msgstr ""

This changes the output to:

#: wp-calypso/client/my-sites/exporter/guided-transfer-details.jsx:28
msgid ""
"Have one of our Happiness Engineers {{strong}}transfer your\nsite{{/strong}} "
"to a self-hosted WordPress.org installation with\none of our hosting "
"partners."
msgstr ""

It also handles this case:

#: wp-calypso/client/me/help/help-unverified-warning/index.jsx:37
msgid ""
"Trouble activating your account?\\
                            Just click this button and we'll "
"resend the activation for you."
msgstr ""

new:

#: wp-calypso/client/me/help/help-unverified-warning/index.jsx:37
msgid ""
"Trouble activating your account? Just click this button and we'll resend the "
"activation for you."
msgstr ""

To make the output more compatible with the PHP output this also adds a comment at the end of the output file.

@akirk akirk added the bug label Aug 6, 2016
@akirk akirk force-pushed the fix/line-breaks branch 2 times, most recently from 35e764b to 987c289 Compare August 8, 2016 05:21
@akirk akirk merged commit 4afac0b into master Aug 8, 2016
@akirk akirk deleted the fix/line-breaks branch August 8, 2016 05:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant