Page MenuHomePhabricator

In Review mode on a translation group, it displays raw wikicode, but whitespace is not preserved
Closed, ResolvedPublic

Description

Review translations: newlines in code are rendered as spaces

When translating a group of messages, and you go to Review mode, it displays raw wikitext in both sides, which is good, but whitespace is not preserved, so newlines are being displayed as single spaces, and messages that contains unordered lists looks like they would be messed up.

See screenshot.

If we are displaying raw wikitext, we should output it as seen in the textarea, preserving all whitespace, so newlines in code are displayed as such.


Version: master
Severity: minor
URL: https://www.mediawiki.org/w/index.php?title=Special:Translate&group=page-Communication&action=page&filter=&language=es

Attached:

Review_translations_-_newlines_shown_as_spaces.png (641×898 px, 106 KB)

Details

Reference
bz60198

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:04 AM
bzimport set Reference to bz60198.

Having the following CSS applied would solve the issue:

.tux-proofread-translation, .tux-proofread-source { white-space: pre-wrap; }

I would like to prepare a patch for this.

Prepare the patch
www.mediawiki.org/wiki/Gerrit/Tutorial

Change 108330 had a related patch set uploaded by Tinaj1234:
Added CSS to preserve whitespace

https://gerrit.wikimedia.org/r/108330

Change 108330 merged by jenkins-bot:
Added CSS to existing selector: preserve whitespace in review mode

https://gerrit.wikimedia.org/r/108330

Patch merged in comment 5 - assuming this bug is FIXED.
If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.

Verified with the provided link (test-case)

Any reason for not also doing this in page mode?

.tux-pagemode-source, .tux-pagemode-translation {
	white-space: pre-wrap;
}