summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2015-05-12 13:35:17 -0700
committerxjm2015-05-12 13:37:49 -0700
commit2165306e33967b606770d6038aee288a44387a3f (patch)
treed5e98f35baf468f51247b7d4d8069e257a677e24
parent5abc88d85e2a4d5961ff6694825a37725bf7bfd0 (diff)
Issue #1862250 by amanire, Ivan Zugec, joates, yoroy, joshi.rohit100, acabouet, rpayanm: The "Trim length" format description is confusing/not clear to Drupal newcomers
-rw-r--r--core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php b/core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php
index 105bfd5..61fd119 100644
--- a/core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php
+++ b/core/modules/text/src/Plugin/Field/FieldFormatter/TextTrimmedFormatter.php
@@ -47,9 +47,11 @@ class TextTrimmedFormatter extends FormatterBase {
*/
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['trim_length'] = array(
- '#title' => t('Trim length'),
+ '#title' => t('Trimmed limit'),
'#type' => 'number',
+ '#field_suffix' => t('characters'),
'#default_value' => $this->getSetting('trim_length'),
+ '#description' => t('If the summary is not set, the trimmed %label field will end at the last full sentence before this character limit.', array('%label' => $this->fieldDefinition->getLabel())),
'#min' => 1,
'#required' => TRUE,
);
@@ -61,7 +63,7 @@ class TextTrimmedFormatter extends FormatterBase {
*/
public function settingsSummary() {
$summary = array();
- $summary[] = t('Trim length: @trim_length', array('@trim_length' => $this->getSetting('trim_length')));
+ $summary[] = t('Trimmed limit: @trim_length characters', array('@trim_length' => $this->getSetting('trim_length')));
return $summary;
}