[wp-trac] [WordPress Trac] #41470: Chinese Translation "zh_HK" in wp trim words that should not be translated.

WordPress Trac noreply at wordpress.org
Fri Jul 28 03:00:09 UTC 2017


#41470: Chinese Translation "zh_HK" in wp trim words that should not be translated.
-------------------------------------------+-----------------------------
 Reporter:  turtlepod                      |      Owner:
     Type:  defect (bug)                   |     Status:  new
 Priority:  normal                         |  Milestone:  Awaiting Review
Component:  Text Changes                   |    Version:  4.8
 Severity:  normal                         |   Keywords:
  Focuses:  accessibility, docs, template  |
-------------------------------------------+-----------------------------
 I'm really sorry, I don't know where to report this (I do not speak
 Chinese)
 So, I'll just post it here.

 In zh_HK.pot, there's a word that should not be translated, but in zh_HK,
 they translated it. And it cause wp_trim_words fail to trim the text (e.g
 excerpt show full content)

 I checked at the zh_CN.pot and i think it should be translated to
 "characters_excluding_spaces"

 Link: https://developer.wordpress.org/reference/functions/wp_trim_words/
 {{{#!php
 <?php
   /*
      * translators: If your word count is based on single characters (e.g.
 East Asian characters),
      * enter 'characters_excluding_spaces' or
 'characters_including_spaces'. Otherwise, enter 'words'.
      * Do not translate into your own language.
      */
     if ( strpos( _x( 'words', 'Word count type. Do not translate!' ),
 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option(
 'blog_charset' ) ) ) {
         $text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
         preg_match_all( '/./u', $text, $words_array );
         $words_array = array_slice( $words_array[0], 0, $num_words + 1 );
         $sep = '';
     } else {
         $words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1,
 PREG_SPLIT_NO_EMPTY );
         $sep = ' ';
     }
 }}}

 Screenshot of the translation:
 https://drive.google.com/file/d/0B9TdkMXV_Q7GRGdRek5FeU12T00/view?usp=sharing

 If anyone can report to their translation team it would be great!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41470>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list