Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#35716 closed defect (bug) (fixed)

Add translators comments and context string to "New Site Created" email notification

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

See the attached patch.

Attachments (4)

35716.patch (939 bytes) - added by ramiy 9 years ago.
35716.2.patch (1003 bytes) - added by ramiy 9 years ago.
35716.3.patch (1.4 KB) - added by ramiy 9 years ago.
35716.4.patch (1.4 KB) - added by ramiy 9 years ago.

Download all attachments as: .zip

Change History (12)

@ramiy
9 years ago

#1 @ramiy
9 years ago

  • Component changed from General to I18N
  • Keywords has-patch added

#2 @ramiy
9 years ago

It's a simple patch that adds /* translators: %s: site name */ to the translation string.

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


9 years ago

#4 @SergeyBiryukov
9 years ago

  • Milestone changed from Awaiting Review to 4.5

Seems like "Site Admin" should be translatable too, and it also needs a context, because we already have the same string in different context in wp_register().

@ramiy
9 years ago

#5 @ramiy
9 years ago

  • Summary changed from Add translators comments to wp-admin/network/site-new.php to Add translators comments and context string to "New Site Created" email notification

The second patch adds: _x( 'Site Admin', 'Email "From" feild' )

#6 @ramiy
9 years ago

Also, the $content_mail defined outside the wp_mail() function and use it only once.

I think we should eliminate this variable and move the mail content inside the wp_mail() functions:

		wp_mail(
			get_site_option( 'admin_email' ),
			sprintf(
				/* translators: %s: site name */
				__( '[%s] New Site Created' ),
				$current_site->site_name
			),
			sprintf(
				/* translators: 1: user login, 2: site url, 3: site name/title */
				__( 'New site created by %1$s

Address: %2$s
Name: %3$s' ),
				$current_user->user_login,
				get_site_url( $id ),
				wp_unslash( $title )
			)
			sprintf(
				'From: "%1$s" <%2$s>',
				_x( 'Site Admin', 'Email "From" feild' ),
				get_site_option( 'admin_email' )
			)
		);

See patch no. 3

@ramiy
9 years ago

@ramiy
9 years ago

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.


9 years ago

#8 @SergeyBiryukov
9 years ago

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

In 36669:

I18N: Add translator comments and context to "New Site Created" email notification strings.

Props ramiy.
Fixes #35716.

Note: See TracTickets for help on using tickets.