[TYPO3-core] RFC: prepend '[Translate to XY]' on copy only if value is set

Wolfgang Klinger wolfgang at stufenlos.net
Wed Jan 11 21:35:20 CET 2006


 *hiya!*

 This is a CVS patch request.

 Type:
 bugfix/(missing) feature ;-)

 Branches: TYPO3-4.0

 Description:
 This patch prepends [Translate to XY] only if the field definitely
 contains a value (strlen check).


 kind regards
 Wolfgang

 that's it for today :-)

-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_tcemain.php	2006-01-10 19:10:01.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_tcemain.php	2006-01-11 21:17:46.000000000 +0100
@@ -2897,7 +2897,7 @@
 											// Set exclude Fields:
 										foreach($TCA[$table]['columns'] as $fN => $fCfg)	{
 											if ($fCfg['l10n_mode']=='prefixLangTitle')	{	// Check if we are just prefixing:
-												if ($fCfg['config']['type']=='text' || $fCfg['config']['type']=='input')	{
+												if (($fCfg['config']['type']=='text' || $fCfg['config']['type']=='input') && strlen($row[$fN]))	{
 													$overrideValues[$fN] = '[Translate to '.$langRec['title'].':] '.$row[$fN];
 												}
 											} elseif (t3lib_div::inList('exclude,noCopy,mergeIfNotBlank',$fCfg['l10n_mode']) && $fN!=$TCA[$table]['ctrl']['languageField'] && $fN!=$TCA[$table]['ctrl']['transOrigPointerField']) {	 // Otherwise, do not copy field (unless it is the language field or pointer to the original language)



More information about the TYPO3-team-core mailing list