Index: typo3/sysext/lang/lang.php =================================================================== --- typo3/sysext/lang/lang.php (revision 10277) +++ typo3/sysext/lang/lang.php (working copy) @@ -403,30 +403,47 @@ // Traverse all keys if (is_array($LOCAL_LANG['default'])) { foreach ($LOCAL_LANG['default'] as $lkey => $lVal) { + $type = ''; + $fieldName = ''; - // exploding by '.': - // 0 => fieldname, - // 1 => type from (alttitle, description, details, syntax, image_descr,image,seeAlso), - // 2 => special instruction, see switch construct - $kParts = explode('.', $lkey); + // Exploding by '.': + // 0-n => fieldname, + // n+1 => type from (alttitle, description, details, syntax, image_descr,image,seeAlso), + // n+2 => special instruction, if any + $keyParts = explode('.', $lkey); + $keyPartsCount = count($keyParts); + // Check if last part is special instruction + // Only "+" is currently supported + $specialInstruction = ($keyParts[$keyPartsCount - 1] == '+') ? TRUE : FALSE; + if ($specialInstruction) { + array_pop($keyParts); + } + // If there are more than 2 parts, get the type from the last part + // and merge back the other parts with a dot (.) + // Otherwise just get type and field name straightaway + if ($keyPartsCount > 2) { + $type = array_pop($keyParts); + $fieldName = implode('.', $keyParts); + } else { + $fieldName = $keyParts[0]; + $type = $keyParts[1]; + } + // Detecting 'hidden' labels, converting to normal fieldname - if ($kParts[0] == '_') { - $kParts[0] = ''; + if ($fieldName == '_') { + $fieldName = ''; } - if (substr($kParts[0], 0, 1) == '_') { - $kParts[0] = substr($kParts[0], 1); + if (substr($fieldName, 0, 1) == '_') { + $fieldName = substr($fieldName, 1); } - // Add label: - switch ((string)$kParts[2]) { - // adding - case '+': - $TCA_DESCR[$table]['columns'][$kParts[0]][$kParts[1]] .= LF . $lVal; - break; - // Substituting: - default: - $TCA_DESCR[$table]['columns'][$kParts[0]][$kParts[1]] = $lVal; + // Append label + if ($specialInstruction) { + $TCA_DESCR[$table]['columns'][$fieldName][$type] .= LF . $lVal; + } else { + // Substitute label + $TCA_DESCR[$table]['columns'][$fieldName][$type] = $lVal; } } } Index: typo3/view_help.php =================================================================== --- typo3/view_help.php (revision 10277) +++ typo3/view_help.php (working copy) @@ -175,9 +175,20 @@ $this->field = array_shift($identifierParts); // There may be extra parts for FlexForms if (count($identifierParts) > 0) { - $flexFormField = array_pop($identifierParts); - $extraIdentifierInformation = $identifierParts; - // Assemble a different main key and switch field to use flexform field name + // There's at least one extra part + $extraIdentifierInformation = array(); + $extraIdentifierInformation[] = array_shift($identifierParts); + // Load the TCA details of the table + t3lib_div::loadTCA($this->table); + // If the ds_pointerField contains a comma, it means the choice of FlexForm DS + // is determined by 2 parameters. In this case we have an extra identifier part + if (strpos($TCA[$this->table]['columns'][$this->field]['config']['ds_pointerField'], ',') !== FALSE) { + $extraIdentifierInformation[] = array_shift($identifierParts); + } + // The remaining parts make up the FlexForm field name itself + // (reassembled with dots) + $flexFormField = implode('.', $identifierParts); + // Assemble a different main key and switch field to use FlexForm field name $this->mainKey .= '.' . $this->field; foreach ($extraIdentifierInformation as $extraKey) { $this->mainKey .= '.' . $extraKey;