Project

General

Profile

Actions

Bug #85309

closed

Image Manipulation: allowedAspectRatios title must be prefixed with LLL

Added by Benni Mack over 6 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2018-06-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The following TCA configuration is not possible:

$GLOBALS['TCA']['tt_content']['types']['my_ce']['columnsOverrides']['assets']['config']['overrideChildTca']['columns']['crop']['config'] = [
    'cropVariants' => [
        'default' => [
            'title' => 'LLL:EXT:mysite/Resources/Private/Language/locallang_db.xlf:sys_file_reference.title.default',
            'selectedRatio' => '16:9',
            'cropArea' => [
                'height' => 1.0,'width' => 1.0,'x' => 0.0,'y' => 0.0
            ],
            'allowedAspectRatios' => [
                '16:9' => ['title' => 'LLL:EXT:mysite/Resources/Private/Language/locallang_db.xlf:sys_file_reference.ratio.16-9', 'value' => 16/9],
                '4:3' => ['title' => '4/3', 'value' => 4/3],
            ],
            'focusArea' => [
                'x' => 1 / 3,
                'y' => 1 / 3,
                'width' => 1 / 3,
                'height' => 1 / 3,
            ]
        ],
    ],
];

This is mainly due to the 4:3 aspect reatio, where thte title is "4/3" and then opening up an existing image in side the Image Manipulation Wizard throws an exception, because the Fluid template (within "ImageManipulationWizard.html" has this line of code

 {cropVariant.title -> f:translate(id: cropVariant.title)}

which in turn calls Extbase`s Translate Utility, which needs either a string prefixed with LLL or an extension name given.

Question is: What should we fix?

Actions

Also available in: Atom PDF