From 405e86103c4aaf258b412699c15c1812f1dd0ae2 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Fri, 23 Oct 2015 16:44:26 -0400 Subject: Issue #1862250 by amanire, Ivan Zugec, Novitsh, joates, sdstyles, yoroy, joshi.rohit100, acabouet, rpayanm, klonos, dahousecat, Daniel_Rose, HeimdallJHM, cluther, vineet.osscube, joachim, Stalski, Bojhan, chris_h: The "Trim length" format description is confusing/not clear to Drupal newcomers --- CHANGELOG.txt | 2 ++ modules/field/modules/text/text.module | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bc7a769a1..f9f444d9c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,8 @@ Drupal 7.42, xxxx-xx-xx (development version) ----------------------- +- Improved the description of the "Trimmed" format option on text fields + (translatable string change, and minor UI and data structure change). Drupal 7.41, 2015-10-21 ----------------------- diff --git a/modules/field/modules/text/text.module b/modules/field/modules/text/text.module index 68fc3cb44..bf0d29d5a 100644 --- a/modules/field/modules/text/text.module +++ b/modules/field/modules/text/text.module @@ -223,11 +223,13 @@ function text_field_formatter_settings_form($field, $instance, $view_mode, $form if (strpos($display['type'], '_trimmed') !== FALSE) { $element['trim_length'] = array( - '#title' => t('Trim length'), + '#title' => t('Trimmed limit'), '#type' => 'textfield', + '#field_suffix' => t('characters'), '#size' => 10, '#default_value' => $settings['trim_length'], '#element_validate' => array('element_validate_integer_positive'), + '#description' => t('If the summary is not set, the trimmed %label field will be shorter than this character limit.', array('%label' => $instance['label'])), '#required' => TRUE, ); } @@ -245,7 +247,7 @@ function text_field_formatter_settings_summary($field, $instance, $view_mode) { $summary = ''; if (strpos($display['type'], '_trimmed') !== FALSE) { - $summary = t('Trim length') . ': ' . check_plain($settings['trim_length']); + $summary = t('Trimmed limit: @trim_length characters', array('@trim_length' => $settings['trim_length'])); } return $summary; -- cgit v1.2.3