summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-10-23 16:44:26 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-10-23 16:44:26 -0400
commit405e86103c4aaf258b412699c15c1812f1dd0ae2 (patch)
tree5e1c484480d743fe9185358beaed727912fdbdd6
parent12c09ce622468bd91b4e97ab052b7e84447af2f7 (diff)
downloadbrdo-405e86103c4aaf258b412699c15c1812f1dd0ae2.tar.gz
brdo-405e86103c4aaf258b412699c15c1812f1dd0ae2.tar.bz2
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
-rw-r--r--CHANGELOG.txt2
-rw-r--r--modules/field/modules/text/text.module6
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;