From 393960b1829bebbcec7d7e52da0bdf5e2fdc3294 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 8 Jun 2019 18:41:08 +0000 Subject: [PATCH] I18N: Allow the length of automatically generated excerpts to be localized. This introduces three new strings that can be used to control the maximum length of automatically generated excerpts for posts, comments, and draft post previews in the dashboard. Optionally combined with the existing word count type control this allows languages which include many multibyte characters to specify more appropriate maximum excerpt lengths. Props miyauchi, birgire, johnbillion Fixes #44541 git-svn-id: https://develop.svn.wordpress.org/trunk@45505 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/dashboard.php | 5 +- src/wp-includes/comment-template.php | 25 +- src/wp-includes/formatting.php | 15 +- tests/phpunit/data/languages/ja_JP.mo | Bin 658 -> 816 bytes tests/phpunit/data/languages/ja_JP.po | 27 ++ .../phpunit/tests/formatting/WPTrimWords.php | 31 +++ tests/phpunit/tests/l10n.php | 256 ++++++++++++++++++ 7 files changed, 336 insertions(+), 23 deletions(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 9c7f93c430..a622f0e7cf 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -584,6 +584,9 @@ function wp_dashboard_recent_drafts( $drafts = false ) { } echo '

' . __( 'Your Recent Drafts' ) . "

\n