Changeset 44562
- Timestamp:
- 01/11/2019 06:03:46 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpcs.xml.dist
r44561 r44562 91 91 <rule ref="WordPress.WP.I18n"> 92 92 <exclude-pattern>/src/wp-includes/l10n\.php</exclude-pattern> 93 <exclude-pattern>/tests/phpunit/tests/l10n\.php</exclude-pattern> 94 <exclude-pattern>/tests/phpunit/tests/l10n/loadTextdomainJustInTime\.php</exclude-pattern> 93 95 </rule> 94 96 -
trunk/src/wp-admin/credits.php
r44264 r44562 66 66 $title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' ); 67 67 } elseif ( isset( $group_data['placeholders'] ) ) { 68 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText 68 69 $title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] ); 69 70 } else { 71 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText 70 72 $title = translate( $group_data['name'] ); 71 73 } … … 101 103 echo esc_html( $person_data[0] ) . "</a>\n\t"; 102 104 if ( ! $compact ) { 105 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText 103 106 echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n"; 104 107 } -
trunk/src/wp-admin/includes/import.php
r43571 r44562 168 168 169 169 foreach ( $popular_importers['importers'] as &$importer ) { 170 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText 170 171 $importer['description'] = translate( $importer['description'] ); 171 172 if ( $importer['name'] != 'WordPress' ) { 173 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText 172 174 $importer['name'] = translate( $importer['name'] ); 173 175 } -
trunk/src/wp-admin/includes/plugin.php
r44524 r44562 138 138 if ( $textdomain ) { 139 139 foreach ( array( 'Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version' ) as $field ) { 140 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain 140 141 $plugin_data[ $field ] = translate( $plugin_data[ $field ], $textdomain ); 141 142 } -
trunk/src/wp-content/themes/twentyeleven/comments.php
r43571 r44562 32 32 <h2 id="comments-title"> 33 33 <?php 34 if ( 1 === get_comments_number() ) { 34 35 printf( 35 _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyeleven' ), 36 /* translators: %s: The post title. */ 37 __( 'One thought on “%1$s”', 'twentyeleven' ), 38 '<span>' . get_the_title() . '</span>' 39 ); 40 } else { 41 printf( 42 /* translators: %1$s: The number of comments. %2$s: The post title. */ 43 _n( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyeleven' ), 36 44 number_format_i18n( get_comments_number() ), 37 45 '<span>' . get_the_title() . '</span>' 38 46 ); 47 } 39 48 ?> 40 49 </h2> -
trunk/src/wp-content/themes/twentyten/comments.php
r43571 r44562 35 35 <h3 id="comments-title"> 36 36 <?php 37 printf( 38 _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), 39 number_format_i18n( get_comments_number() ), 40 '<em>' . get_the_title() . '</em>' 41 ); 37 if ( 1 === get_comments_number() ) { 38 printf( 39 /* translators: %s: The post title. */ 40 __( 'One Response to %s', 'twentyten' ), 41 '<em>' . get_the_title() . '</em>' 42 ); 43 } else { 44 /* translators: %1$s: The number of comments. %2$s: The post title. */ 45 printf( 46 _n( '%1$s Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), 47 number_format_i18n( get_comments_number() ), 48 '<em>' . get_the_title() . '</em>' 49 ); 50 } 42 51 ?> 43 52 </h3> -
trunk/src/wp-content/themes/twentythirteen/comments.php
r43571 r44562 24 24 <h2 class="comments-title"> 25 25 <?php 26 if ( 1 === get_comments_number() ) { 26 27 printf( 27 _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'twentythirteen' ), 28 /* translators: %s: The post title. */ 29 _x( 'One thought on “%s”', 'comments title', 'twentythirteen' ), 30 '<span>' . get_the_title() . '</span>' 31 ); 32 } else { 33 printf( 34 /* translators: %1$s: The number of comments. %2$s: The post title. */ 35 _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'twentythirteen' ), 28 36 number_format_i18n( get_comments_number() ), 29 37 '<span>' . get_the_title() . '</span>' 30 38 ); 39 } 31 40 ?> 32 41 </h2> -
trunk/src/wp-content/themes/twentytwelve/comments.php
r43571 r44562 30 30 <h2 class="comments-title"> 31 31 <?php 32 if ( 1 === get_comments_number() ) { 32 33 printf( 33 _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentytwelve' ), 34 /* translators: %s: The post title. */ 35 __( 'One thought on “%s”', 'twentytwelve' ), 36 '<span>' . get_the_title() . '</span>' 37 ); 38 } else { 39 printf( 40 /* translators: %1$s: The number of comments. %2$s: The post title. */ 41 _n( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentytwelve' ), 34 42 number_format_i18n( get_comments_number() ), 35 43 '<span>' . get_the_title() . '</span>' 36 44 ); 45 } 37 46 ?> 38 47 </h2> -
trunk/src/wp-includes/category-template.php
r43571 r44562 837 837 // Look for the alternative callback style. Ignore the previous default. 838 838 if ( $args['topic_count_text_callback'] === 'default_topic_count_text' ) { 839 // wpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingle,WordPress.WP.I18n.NonSingularStringLiteralPlural 839 840 $translate_nooped_plural = _n_noop( '%s item', '%s items' ); 840 841 } else { … … 843 844 } elseif ( isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) { 844 845 // If no callback exists, look for the old-style single_text and multiple_text arguments. 846 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingle,WordPress.WP.I18n.NonSingularStringLiteralPlural 845 847 $translate_nooped_plural = _n_noop( $args['single_text'], $args['multiple_text'] ); 846 848 } else { -
trunk/src/wp-includes/class-wp-theme.php
r44524 r44562 875 875 return $this->name_translated; 876 876 } 877 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain 877 878 $this->name_translated = translate( $value, $this->get( 'TextDomain' ) ); 878 879 return $this->name_translated; … … 926 927 927 928 default: 929 // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain 928 930 $value = translate( $value, $this->get( 'TextDomain' ) ); 929 931 } -
trunk/src/wp-includes/functions.php
r44546 r44562 5074 5074 $exists[5] = ( $exists[2] && $exists[3] ); 5075 5075 5076 // phpcs:disable WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText 5076 5077 $zonen[] = array( 5077 5078 'continent' => ( $exists[0] ? $zone[0] : '' ), … … 5082 5083 't_subcity' => ( $exists[5] ? translate( str_replace( '_', ' ', $zone[2] ), 'continents-cities' ) : '' ), 5083 5084 ); 5085 // phpcs:enable 5084 5086 } 5085 5087 usort( $zonen, '_wp_timezone_choice_usort_callback' ); -
trunk/src/wp-includes/post.php
r44546 r44562 1038 1038 1039 1039 if ( false === $args->label_count ) { 1040 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralSingle,WordPress.WP.I18n.NonSingularStringLiteralPlural 1040 1041 $args->label_count = _n_noop( $args->label, $args->label ); 1041 1042 }
Note: See TracChangeset
for help on using the changeset viewer.