WordPress.org

Make WordPress Core

#40895 closed defect (bug) (fixed)

Unwanted indentation in sample page content

Reported by: swissspidy Owned by: ocean90
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.7.4
Component: Networks and Sites Keywords: has-patch commit
Focuses: multisite Cc:

Description

As reported by @pedromendonca on Slack, [40296] broke the indentation of the sample page content.

Although the indentation is nice for more readable code, it's not good for translators.

Attachments (1)

40895.diff (2.2 KB) - added by swissspidy 14 months ago.

Download all attachments as: .zip

Change History (7)

@swissspidy
14 months ago

#1 @pedromendonca
14 months ago

Well done! :)

#2 @swissspidy
14 months ago

  • Component changed from General to Networks and Sites
  • Focuses multisite added

@ocean90 @SergeyBiryukov Mind reviewing this patch? Thanks!

#3 follow-up: @pedromendonca
14 months ago

The problem was that this string was recently changed, this indentation was added, breaking the existing translation. Luckilly it was just marked as fuzzy and it was easy to spot the differences. Still, this change was unnecessary.

To avoid this in the future, strings like this should be parted out in several complete sentences, giving developers complete freedom to change its appearance without breaking any current translations,

#4 in reply to: ↑ 3 @SergeyBiryukov
14 months ago

  • Keywords commit added

Replying to pedromendonca:

To avoid this in the future, strings like this should be parted out in several complete sentences, giving developers complete freedom to change its appearance without breaking any current translations,

I think it's easier to translate content like this as a single string (pretty much like email templates) to avoid losing context between sentences, we just have to be careful not to add any unnecessary whitespace :)

40895.diff looks good.

This ticket was mentioned in Slack in #core by obenland. View the logs.


14 months ago

#6 @ocean90
14 months ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 40864:

Multisite: Revert indentation of the sample page content added in [40296].

Props swissspidy.
Fixes #40895.

Note: See TracTickets for help on using tickets.