Project

General

Profile

Actions

Feature #78904

closed

correct append of ellipses for different language in f:format.crop()

Added by taywa gmbh over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2016-12-07
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
fluid, respectWordBoundaries, ellipses
Complexity:
Sprint Focus:

Description

if respectWordBoundaries = true and language = german append default should be

 …
or ' ...' and not '...' like now. in german '...' is only used if its in the middle of the Wor... . When at the end, its ... (with withespace). But every language is different, see here: https://en.wikipedia.org/wiki/Ellipsis

So this should implemented via language strings?!

in fluid/Classes/ViewHelpers/Format/CropViewHelper.php

    public function render($maxCharacters, $append = '...', $respectWordBoundaries = true, $respectHtml = true)
    {
        return static::renderStatic(
            [
                'maxCharacters' => $maxCharacters,
                'append' => $append,
                'respectWordBoundaries' => $respectWordBoundaries,
                'respectHtml' => $respectHtml,
            ],
            $this->buildRenderChildrenClosure(),
            $this->renderingContext
        );
    }

thanks

Actions #1

Updated by Wouter Wolters over 7 years ago

  • Description updated (diff)
  • Status changed from New to Rejected

We use the cropping feature from the ContentObjectRenderer in the CropViewHelper which exists already since I know TYPO3 (2009).
The append value is integrator specific and it is not doable to do this with language strings here.

If you need this, you should write your own CropViewHelper that has this extra feature for you.

Actions

Also available in: Atom PDF