From 4143a9b4bf9169f373c4130dce262a611d88c781 Mon Sep 17 00:00:00 2001 From: Alexander Stehlik <alexander.stehlik@gmail.com> Date: Sat, 15 Nov 2014 14:44:44 +0100 Subject: [PATCH] [BUGFIX] Improve l10n_mode config for sys_file_reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the rendering in the Frontend does not merge the values the mergeIfNotBlank setting is replaced with prefixLangTitle for the alternative, description and title field. For the link field the mergeIfNotBlank setting is removed because a prefix does not make sense there. Change-Id: I09dfd6d971357ceaeaa08f60057323b3c7e33aa1 Releases: master Resolves: #59972 Reviewed-on: http://review.typo3.org/32758 Reviewed-by: Frank Nägler <frank.naegler@typo3.org> Tested-by: Frank Nägler <frank.naegler@typo3.org> Reviewed-by: Andreas Fernandez <typo3@scripting-base.de> Tested-by: Andreas Fernandez <typo3@scripting-base.de> --- .../sysext/core/Configuration/TCA/sys_file_reference.php | 7 +++---- .../DataHandling/FAL/Modify/DataSet/localizeContent.csv | 4 ++-- .../DataHandling/FAL/Modify/DataSet/localizeContent.csv | 8 ++++---- .../DataHandling/FAL/Publish/DataSet/localizeContent.csv | 4 ++-- .../FAL/PublishAll/DataSet/localizeContent.csv | 4 ++-- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/typo3/sysext/core/Configuration/TCA/sys_file_reference.php b/typo3/sysext/core/Configuration/TCA/sys_file_reference.php index 3677e1d9b411..20b3d07a62ae 100644 --- a/typo3/sysext/core/Configuration/TCA/sys_file_reference.php +++ b/typo3/sysext/core/Configuration/TCA/sys_file_reference.php @@ -152,7 +152,7 @@ return array( ) ), 'title' => array( - 'l10n_mode' => 'mergeIfNotBlank', + 'l10n_mode' => 'prefixLangTitle', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title', 'config' => array( @@ -165,7 +165,6 @@ return array( ) ), 'link' => array( - 'l10n_mode' => 'mergeIfNotBlank', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link', 'config' => array( @@ -191,7 +190,7 @@ return array( ), 'description' => array( // This is used for captions in the frontend - 'l10n_mode' => 'mergeIfNotBlank', + 'l10n_mode' => 'prefixLangTitle', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description', 'config' => array( @@ -205,7 +204,7 @@ return array( ) ), 'alternative' => array( - 'l10n_mode' => 'mergeIfNotBlank', + 'l10n_mode' => 'prefixLangTitle', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative', 'config' => array( diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv index d443aacc87b4..d225e109a251 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv +++ b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv @@ -4,8 +4,8 @@ sys_file_reference ,127,89,64,0,0,0,0,0,0,0,0,21,330,tt_content,image,1,sys_file,Kasper,,,, ,128,89,32,0,0,0,0,0,0,0,0,21,331,tt_content,image,1,sys_file,"Taken at T3BOARD",,,, ,129,89,16,0,0,0,0,0,0,0,0,1,331,tt_content,image,2,sys_file,"This is Kasper",,,, -,130,89,48,0,1,128,0,0,0,0,0,21,332,tt_content,image,1,sys_file,,,,, -,131,89,24,0,1,129,0,0,0,0,0,1,332,tt_content,image,2,sys_file,,,,, +,130,89,48,0,1,128,0,0,0,0,0,21,332,tt_content,image,1,sys_file,"[Translate to Dansk:] Taken at T3BOARD",,,, +,131,89,24,0,1,129,0,0,0,0,0,1,332,tt_content,image,2,sys_file,"[Translate to Dansk:] This is Kasper",,,, tt_content ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image ,330,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv index 1a4efc67665f..e1d48066f4dc 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/DataSet/localizeContent.csv @@ -4,10 +4,10 @@ sys_file_reference ,127,89,64,0,0,0,0,0,0,0,0,21,330,tt_content,image,1,sys_file,Kasper,,,, ,128,89,32,0,0,0,0,0,0,0,0,21,331,tt_content,image,1,sys_file,"Taken at T3BOARD",,,, ,129,89,16,0,0,0,0,0,0,0,0,1,331,tt_content,image,2,sys_file,"This is Kasper",,,, -,130,89,48,0,1,128,1,1,0,0,0,21,332,tt_content,image,1,sys_file,,,,, -,131,-1,48,0,1,128,1,-1,0,130,0,21,332,tt_content,image,10,sys_file,,,,, -,132,89,24,0,1,129,1,1,0,0,0,1,332,tt_content,image,2,sys_file,,,,, -,133,-1,24,0,1,129,1,-1,0,132,0,1,332,tt_content,image,10,sys_file,,,,, +,130,89,48,0,1,128,1,1,0,0,0,21,332,tt_content,image,1,sys_file,"[Translate to Dansk:] Taken at T3BOARD",,,, +,131,-1,48,0,1,128,1,-1,0,130,0,21,332,tt_content,image,10,sys_file,"[Translate to Dansk:] Taken at T3BOARD",,,, +,132,89,24,0,1,129,1,1,0,0,0,1,332,tt_content,image,2,sys_file,"[Translate to Dansk:] This is Kasper",,,, +,133,-1,24,0,1,129,1,-1,0,132,0,1,332,tt_content,image,10,sys_file,"[Translate to Dansk:] This is Kasper",,,, tt_content ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image ,330,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv index 605c00c1de68..ae5efcef97ab 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/localizeContent.csv @@ -4,8 +4,8 @@ sys_file_reference ,127,89,64,0,0,0,0,0,0,0,0,21,330,tt_content,image,1,sys_file,Kasper,,,, ,128,89,32,0,0,0,0,0,0,0,0,21,331,tt_content,image,1,sys_file,"Taken at T3BOARD",,,, ,129,89,16,0,0,0,0,0,0,0,0,1,331,tt_content,image,2,sys_file,"This is Kasper",,,, -,130,89,48,0,1,128,0,0,0,0,0,21,332,tt_content,image,10,sys_file,,,,, -,132,89,24,0,1,129,0,0,0,0,0,1,332,tt_content,image,10,sys_file,,,,, +,130,89,48,0,1,128,0,0,0,0,0,21,332,tt_content,image,10,sys_file,"[Translate to Dansk:] Taken at T3BOARD",,,, +,132,89,24,0,1,129,0,0,0,0,0,1,332,tt_content,image,10,sys_file,"[Translate to Dansk:] This is Kasper",,,, tt_content ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image ,330,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv index 605c00c1de68..ae5efcef97ab 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/localizeContent.csv @@ -4,8 +4,8 @@ sys_file_reference ,127,89,64,0,0,0,0,0,0,0,0,21,330,tt_content,image,1,sys_file,Kasper,,,, ,128,89,32,0,0,0,0,0,0,0,0,21,331,tt_content,image,1,sys_file,"Taken at T3BOARD",,,, ,129,89,16,0,0,0,0,0,0,0,0,1,331,tt_content,image,2,sys_file,"This is Kasper",,,, -,130,89,48,0,1,128,0,0,0,0,0,21,332,tt_content,image,10,sys_file,,,,, -,132,89,24,0,1,129,0,0,0,0,0,1,332,tt_content,image,10,sys_file,,,,, +,130,89,48,0,1,128,0,0,0,0,0,21,332,tt_content,image,10,sys_file,"[Translate to Dansk:] Taken at T3BOARD",,,, +,132,89,24,0,1,129,0,0,0,0,0,1,332,tt_content,image,10,sys_file,"[Translate to Dansk:] This is Kasper",,,, tt_content ,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,image ,330,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 -- GitLab