Project

General

Profile

Bug #22770 » 14545_v7.diff

Administrator Admin, 2010-06-14 01:28

View differences:

t3lib/class.t3lib_tceforms.php (working copy)
$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.new',1).
'</span>';
$truePid = t3lib_BEfunc::getTSconfig_pidValue($table,$rec['uid'],$rec['pid']);
$prec = t3lib_BEfunc::getRecordWSOL('pages',$truePid,'title');
$truePid = t3lib_BEfunc::getTSconfig_pidValue($table, $rec['uid'], $rec['pid']);
$prec = t3lib_BEfunc::getRecordWSOL('pages', $truePid, 'title');
$pageTitle = t3lib_BEfunc::getRecordTitle('pages', $prec, TRUE, FALSE);
$rLabel = '<em>[PID: ' . $truePid . '] ' . $pageTitle . '</em>';
// Fetch translated title of the table
$tableTitle = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']);
if ($table === 'pages') {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.createNewPage', TRUE);
$pageTitle = sprintf($label, $tableTitle);
} else {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.createNewRecord', TRUE);
if ($rec['pid'] == 0) {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.createNewRecordRootLevel', TRUE);
}
$pageTitle = sprintf($label, $tableTitle, $pageTitle);
}
} else {
$newLabel = ' <span class="typo3-TCEforms-recUid">['.$rec['uid'].']</span>';
$rLabel = t3lib_BEfunc::getRecordTitle($table, $rec, TRUE, FALSE);
$prec = t3lib_BEfunc::getRecordWSOL('pages',$rec['pid'],'title');
$pageTitle = t3lib_BEfunc::getRecordTitle('pages', $prec, TRUE, FALSE);
$prec = t3lib_BEfunc::getRecordWSOL('pages', $rec['pid'], 'uid,title');
// Fetch translated title of the table
$tableTitle = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']);
if ($table === 'pages') {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.editPage', TRUE);
// Just take the record title and prepend an edit label.
$pageTitle = sprintf($label, $tableTitle, $rLabel);
} else {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.editRecord', TRUE);
$pageTitle = t3lib_BEfunc::getRecordTitle('pages', $prec, TRUE, FALSE);
if ($rLabel === t3lib_BEfunc::getNoRecordTitle(TRUE)) {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.editRecordNoTitle', TRUE);
}
if ($rec['pid'] == 0) {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.editRecordRootLevel', TRUE);
}
if ($rLabel !== t3lib_BEfunc::getNoRecordTitle(TRUE)) {
// Just take the record title and prepend an edit label.
$pageTitle = sprintf($label, $tableTitle, $rLabel, $pageTitle);
} else {
// Leave out the record title since it is not set.
$pageTitle = sprintf($label, $tableTitle, $pageTitle);
}
}
}
foreach ($arr as $k => $v) {
typo3/sysext/lang/locallang_core.xml (working copy)
<label index="labels.refreshList">Reload list from server</label>
<label index="labels.close">Close</label>
<label index="labels.new">NEW</label>
<label index="labels.createNewPage">Create new %s</label>
<label index="labels.createNewRecord">Create new %s on page "%s"</label>
<label index="labels.createNewRecordRootLevel">Create new %s on root level</label>
<label index="labels.editPage">Edit %s "%s"</label>
<label index="labels.editRecord">Edit %s "%s" on page "%s"</label>
<label index="labels.editRecordNoTitle">Edit %s on page "%s"</label>
<label index="labels.editRecordRootLevel">Edit %s "%s" on root level</label>
<label index="labels.rootLevel">root level</label>
<label index="labels.addnew">Add new</label>
<label index="labels.toggleall">Toggle all</label>
<label index="labels.selected">Selected</label>
(8-8/8)