Skip to content

Commit 2b72537

Browse files
committed
fix(i18n): move translators comment above __()
The WordPress plugin check requires the translators comment on the line directly above the __() call, not above the sprintf().
1 parent 256f531 commit 2b72537

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

includes/MslsRestApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ protected function prepare_post_data( \WP_Post $source_post ): array {
219219
public static function prefix_source_language( array $post_data, \WP_Post $source_post, int $source_blog_id, int $target_blog_id ): array {
220220
$lang_code = substr( MslsBlogCollection::get_blog_language( $source_blog_id ), 0, 2 );
221221

222-
/* translators: 1: language code, 2: original post title */
223222
$post_data['post_title'] = sprintf(
223+
/* translators: 1: language code, 2: original post title */
224224
__( 'From %1$s: %2$s', 'multisite-language-switcher' ),
225225
$lang_code,
226226
$post_data['post_title']
227227
);
228228

229-
/* translators: 1: language code, 2: original post content */
230229
$post_data['post_content'] = sprintf(
230+
/* translators: 1: language code, 2: original post content */
231231
__( 'From %1$s: %2$s', 'multisite-language-switcher' ),
232232
$lang_code,
233233
$post_data['post_content']

0 commit comments

Comments
 (0)