Keep line breaks in translated text #625

Closed
dryabov opened this Issue Dec 21, 2016 · 4 comments

Projects

None yet

4 participants

@dryabov
dryabov commented Dec 21, 2016

Currently line breaks are displayed in original text (with clear indication by special character), but translated text looks merged into a long single line. Could you either change gp-templates/translation-row.php to process translated text with a function prepare_translation (in a similar way to prepare_original for original text), or at least add table.translations td.translation { white-space: pre-wrap; } rule to style.css?

@tobifjellner
tobifjellner commented Dec 21, 2016 edited

In many cases I see line breaks and tabs in source text, that really shouldn't be there. It's just the result of some plugin developer trying to force the text to fit nicely into his intended level of code, since the same developer knows very well that whitespace "disappears" when presented as html.
But still, yes, of course various whitespace characters should be visible in the target column, too.
(This is just my limited translator view of things...)

@toolstack toolstack added the bug label Dec 22, 2016
@toolstack toolstack added this to the 2.3 milestone Dec 22, 2016
@toolstack toolstack self-assigned this Dec 22, 2016
@toolstack
Contributor

@dryabov I agree the previous translation should be formatted the same as the original to make it easy to compare.

@tobifjellner That assumes that the output from GlotPress is going to be used in an HTML based application, which while often is the case, is not always true.

@toolstack toolstack added the has PR label Dec 22, 2016
@ocean90
Member
ocean90 commented Jan 10, 2017

Can someone add some before/after screenshots please?

@toolstack
Contributor

Screenshots:

Current behaviour:
before

After PR:
after

@ocean90 ocean90 closed this in #626 Jan 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment