Commit 2f7d88e8 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* import/export: CSH for the whole module, localization of all labels


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@532 709f56b5-9817-0410-a4d7-c38de5d9e867
parent b94cbdd8
2005-01-14 Kasper Skårhøj,,, <kasper@typo3.com>
* import/export: CSH for the whole module, localization of all labels
2005-01-02 Kasper Skårhøj,,, <kasper@typo3.com>
* Added Karsten D.s patches for DBAL.
......
......@@ -418,7 +418,7 @@ XQCR: t3lib/class.t3lib_positionmap.php
-QCR: t3lib/class.t3lib_readmail.php
XQCR: t3lib/class.t3lib_recordlist.php
-QCR: t3lib/class.t3lib_scbase.php
t3lib/class.t3lib_sqlengine.php [Kasper]
t3lib/class.t3lib_sqlengine.php [Kasper/Karsten?]
-QCR: t3lib/class.t3lib_stdgraphic.php
XQCR: t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_svbase.php [Rene]
......@@ -495,8 +495,7 @@ OK context_help/
- Manual written?
XQCR: extra_page_cm_options/
XQCR: func_wizards/
impexp (2/2000)
- Extend support and finish it with the efforts soon to be done for "DBint" (lowlevel) and TCEmain
XQC-: impexp
indexed_search (4/3500)
- Templates?
- Speedoptimizations?
......@@ -525,9 +524,9 @@ XQRC: wizard_sortpages/
For all extensions (even those approved):
- Remember to add package tags to all classes!
- Write documentation for each
- Write documentation for each (CSH is fine enough).
- Check HTML source / CSS usage / XHTML compliancy / That icons are skinnable (add to "skin360")
- $LANG->getLL() are htmlspecialchars()'ed
- $LANG->getLL() are htmlspecialchars()'ed / second argument is "1"
......
......@@ -1203,7 +1203,7 @@ class tslib_pibase {
* @return string The content.
*/
function pi_getFFvalue($T3FlexForm_array,$fieldName,$sheet='sDEF',$lang='lDEF',$value='vDEF') {
$sheetArray = (array)$T3FlexForm_array['data'][$sheet][$lang];
$sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$lang] : '';
if (is_array($sheetArray)) {
return $this->pi_getFFvalueFromSheetArray($sheetArray,explode('/',$fieldName),$value);
}
......
This diff is collapsed.
......@@ -20,6 +20,140 @@
<label index="title">Import / Export</label>
<label index="moduleFunction.tx_impexp_modfunc1">Export Presets</label>
<label index="tableselec_configuration">Configuration</label>
<label index="exportdata_savedFile">SAVED FILE</label>
<label index="exportdata_savedInSBytes">Saved in "%s", bytes %s</label>
<label index="exportdata_problemsSavingFile">Problems saving file</label>
<label index="exportdata_badPathS">Bad path: "%s"</label>
<label index="exportdata_filePreset">File &amp; Preset</label>
<label index="exportdata_advancedOptions">Advanced Options</label>
<label index="exportdata_messages">Messages</label>
<label index="execlistqu_structureToBeExported">Structure to be exported:</label>
<label index="execlistqu_maxNumberLimit">Max number limit!</label>
<label index="makeconfig_anSqlQueryReturned">An SQL query returned exactly the amount of records specified by the limit value (%s) - that could indicate an incomplete selection of records! Make sure this is on purpose.</label>
<label index="makeconfig_exportPagetreeConfiguration">Export pagetree configuration:</label>
<label index="makeconfig_pageId">Page ID:</label>
<label index="makeconfig_tree">Tree:</label>
<label index="makeconfig_noTreeExportedOnly">No tree exported - only tables on the page.</label>
<label index="makeconfig_tablesOnThisPage">Tables on this page</label>
<label index="makeconfig_expandedTree">Expanded tree</label>
<label index="makeconfig_onlyThisPage">Only this page</label>
<label index="makeconfig_1Level">1 level</label>
<label index="makeconfig_2Levels">2 levels</label>
<label index="makeconfig_3Levels">3 levels</label>
<label index="makeconfig_4Levels">4 levels</label>
<label index="makeconfig_infinite">Infinite</label>
<label index="makeconfig_levels">Levels:</label>
<label index="makeconfig_includeTables">Include tables:</label>
<label index="makeconfig_maxNumberOfRecords">Max number of records:</label>
<label index="makeconfig_exportSingleRecord">Export single record:</label>
<label index="makeconfig_record">Record:</label>
<label index="makeconfig_exportTablesFromPages">Export tables from pages:</label>
<label index="makeconfig_tablePids">Table/Pids:</label>
<label index="makeconfig_relationsAndExclusions">Relations and Exclusions:</label>
<label index="makeconfig_includeRelationsToTables">Include relations to tables:</label>
<label index="makeconfig_useStaticRelationsFor">Use static relations for tables:</label>
<label index="makeconfig_showStaticRelations">Show static relations:</label>
<label index="makeconfig_excludeElements">Exclude elements:</label>
<label index="makeconfig_clearAllExclusions">Clear all exclusions:</label>
<label index="makeconfig_noExcludedElementsYet">No excluded elements yet. Exclude by setting checkboxes below in the element display.</label>
<label index="makeadvanc_update">Update</label>
<label index="makeadvanc_softReferences">Soft References:</label>
<label index="makeadvanc_excludeHtmlCssFile">Exclude HTML/CSS file resources:</label>
<label index="makeadvanc_extensionDependencies">Extension dependencies:</label>
<label index="makeadvanc_selectExtensionsThatThe">Select extensions that the exported content depends on:</label>
<label index="makesavefo_update">Update</label>
<label index="makesavefo_presets">Presets:</label>
<label index="makesavefo_selectPreset">Select preset:</label>
<label index="makesavefo_load">Load</label>
<label index="makesavefo_save">Save</label>
<label index="makesavefo_areYouSure">Are you sure?</label>
<label index="makesavefo_delete">Delete</label>
<label index="makesavefo_merge">Merge</label>
<label index="makesavefo_titleOfNewPreset">Title of new preset:</label>
<label index="makesavefo_public">Public:</label>
<label index="makesavefo_outputOptions">Output options:</label>
<label index="makesavefo_metaData">Meta data:</label>
<label index="makesavefo_title">Title:</label>
<label index="makesavefo_description">Description:</label>
<label index="makesavefo_notes">Notes:</label>
<label index="makesavefo_thumbnail">Thumbnail:</label>
<label index="makesavefo_uploadThumbnail">Upload thumbnail:</label>
<label index="makesavefo_t3dFileCompressed">T3D file / compressed</label>
<label index="makesavefo_t3dFile">T3D file</label>
<label index="makesavefo_xml">XML</label>
<label index="makesavefo_fileFormat">File format:</label>
<label index="makesavefo_maxSizeOfFiles">Max size of files to include (kb):</label>
<label index="makesavefo_filenameSavedInS">Filename (saved in "%s"):</label>
<label index="makesavefo_downloadExport">Download export</label>
<label index="importdata_saveToFilename">Save to filename</label>
<label index="importdata_selectFileToImport">Select file to import:</label>
<label index="importdata_file">File:</label>
<label index="importdata_fromPathS">(From path: %s)</label>
<label index="importdata_noteNoDecompressorAvailable">NOTE: No decompressor available for compressed files!</label>
<label index="importdata_importOptions">Import Options:</label>
<label index="importdata_update">Update:</label>
<label index="importdata_updateRecords">Update records</label>
<label index="importdata_thisOptionRequiresThat">This option requires that the structure you import already exists on this server and only needs to be updated with new content!</label>
<label index="importdata_ignorePidDifferencesGlobally">Ignore PID differences globally</label>
<label index="importdata_ifYouSetThis">If you set this option, the position of updated elements will not be updated to match the structure of the input file.</label>
<label index="importdata_options">Options:</label>
<label index="importdata_doNotShowDifferences">Do not show differences in records</label>
<label index="importdata_greenValuesAreFrom">Green values are from the import file, red values from the current database record and black values are similar in both versions.</label>
<label index="importdata_allowToWriteBanned">Allow to write banned file extensions (eg. PHP scripts), if any</label>
<label index="importdata_action">Action:</label>
<label index="importdata_preview">Preview</label>
<label index="importdata_update_299e">Update</label>
<label index="importdata_import">Import</label>
<label index="importdata_areYouSure">Are you sure?</label>
<label index="importdata_newImport">New import</label>
<label index="importdata_enableLogging">Enable logging:</label>
<label index="importdata_writeIndividualDbActions">Write individual DB actions during import to the log</label>
<label index="importdata_thisIsDisabledBy">This is disabled by default since there may be hundred of entries generated.</label>
<label index="importdata_uploadFileFromLocal">Upload file from local computer:</label>
<label index="importdata_browse">Browse:</label>
<label index="importdata_uploadStatus">Upload status:</label>
<label index="importdata_success">Success:</label>
<label index="importdata_failureNoFileUploaded">Failure: No file uploaded - was it too big? Check system log.</label>
<label index="importdata_upload">Upload</label>
<label index="importdata_metaData">Meta data:</label>
<label index="importdata_title">Title:</label>
<label index="importdata_description">Description:</label>
<label index="importdata_notes">Notes:</label>
<label index="importdata_packager">Packager:</label>
<label index="importdata_email">Email:</label>
<label index="importdata_icon">Icon:</label>
<label index="importdata_metaData_1387">Meta data</label>
<label index="importdata_messages">Messages</label>
<label index="importdata_structureHasBeenImported">Structure has been imported, here is the result:</label>
<label index="filterpage_structureToBeImported">Structure to be imported:</label>
<label index="ALL_tables">ALL tables</label>
<label index="impexpcore_displaycon_controls">Controls:</label>
<label index="impexpcore_displaycon_title">Title:</label>
<label index="impexpcore_displaycon_size">Size:</label>
<label index="impexpcore_displaycon_message">Message:</label>
<label index="impexpcore_displaycon_updateMode">Update Mode:</label>
<label index="impexpcore_displaycon_currentPath">Current Path:</label>
<label index="impexpcore_displaycon_result">Result:</label>
<label index="impexpcore_displaycon_insidePagetree">Inside pagetree:</label>
<label index="impexpcore_singlereco_outsidePagetree">Outside pagetree:</label>
<label index="impexpcore_singlereco_softReferencesFiles">Soft References Files:</label>
<label index="impexpcore_singlereco_update">Update</label>
<label index="impexpcore_singlereco_insert">Insert</label>
<label index="impexpcore_singlereco_importAsNew">Import as new</label>
<label index="impexpcore_singlereco_ignorePid">Ignore PID</label>
<label index="impexpcore_singlereco_respectPid">Respect PID</label>
<label index="impexpcore_singlereco_forceUidSAdmin">Force UID [%s] (Admin)</label>
<label index="impexpcore_singlereco_exclude">Exclude</label>
<label index="impexpcore_singlereco_title">Title:</label>
<label index="impexpcore_singlereco_descr">Descr:</label>
<label index="impexpcore_singlereco_filename">Filename:</label>
<label index="impexpcore_singlereco_value">Value:</label>
<label index="impexpcore_softrefsel_record">Record:</label>
<label index="impexpcore_softrefsel_editable">Editable</label>
<label index="impexpcore_softrefsel_exclude">Exclude</label>
<label index="impexpcore_printerror_description">Description:</label>
</languageKey>
<languageKey index="dk">EXT:csh_dk/impexp/app/dk.locallang.xml</languageKey>
<languageKey index="de">EXT:csh_de/impexp/app/de.locallang.xml</languageKey>
......
......@@ -2609,6 +2609,7 @@ class tx_impexp {
* @return string HTML content
*/
function displayContentOverview() {
global $LANG;
// Check extension dependencies:
if (is_array($this->dat['header']['extensionDependencies'])) {
......@@ -2635,13 +2636,13 @@ class tx_impexp {
$rows = array();
$rows[] = '
<tr class="bgColor5 tableheader">
<td>Controls:</td>
<td>Title:</td>
<td>Size:</td>
<td>Message:</td>
'.($this->update ? '<td>Update Mode:</td>' : '').'
'.($this->update ? '<td>Current Path:</td>' : '').'
'.($this->showDiff ? '<td>Result:</td>' : '').'
<td>'.$LANG->getLL('impexpcore_displaycon_controls',1).'</td>
<td>'.$LANG->getLL('impexpcore_displaycon_title',1).'</td>
<td>'.$LANG->getLL('impexpcore_displaycon_size',1).'</td>
<td>'.$LANG->getLL('impexpcore_displaycon_message',1).'</td>
'.($this->update ? '<td>'.$LANG->getLL('impexpcore_displaycon_updateMode',1).'</td>' : '').'
'.($this->update ? '<td>'.$LANG->getLL('impexpcore_displaycon_currentPath',1).'</td>' : '').'
'.($this->showDiff ? '<td>'.$LANG->getLL('impexpcore_displaycon_result',1).'</td>' : '').'
</tr>';
foreach($lines as $r) {
......@@ -2658,7 +2659,7 @@ class tx_impexp {
}
$out = '
<strong>Inside pagetree:</strong>
<strong>'.$LANG->getLL('impexpcore_displaycon_insidePagetree',1).'</strong>
<br /><br />
<table border="0" cellpadding="0" cellspacing="1">'.implode('',$rows).'</table>
<br /><br />';
......@@ -2676,13 +2677,13 @@ class tx_impexp {
$rows = array();
$rows[] = '
<tr class="bgColor5 tableheader">
<td>Controls:</td>
<td>Title:</td>
<td>Size:</td>
<td>Message:</td>
'.($this->update ? '<td>Update Mode:</td>' : '').'
'.($this->update ? '<td>Current Path:</td>' : '').'
'.($this->showDiff ? '<td>Result:</td>' : '').'
<td>'.$LANG->getLL('impexpcore_displaycon_controls',1).'</td>
<td>'.$LANG->getLL('impexpcore_displaycon_title',1).'</td>
<td>'.$LANG->getLL('impexpcore_displaycon_size',1).'</td>
<td>'.$LANG->getLL('impexpcore_displaycon_message',1).'</td>
'.($this->update ? '<td>'.$LANG->getLL('impexpcore_displaycon_updateMode',1).'</td>' : '').'
'.($this->update ? '<td>'.$LANG->getLL('impexpcore_displaycon_currentPath',1).'</td>' : '').'
'.($this->showDiff ? '<td>'.$LANG->getLL('impexpcore_displaycon_result',1).'</td>' : '').'
</tr>';
foreach($lines as $r) {
......@@ -2698,7 +2699,7 @@ class tx_impexp {
}
$out.= '
<strong>Outside pagetree:</strong>
<strong>'.$LANG->getLL('impexpcore_singlereco_outsidePagetree',1).'</strong>
<br /><br />
<table border="0" cellpadding="0" cellspacing="1">'.implode('',$rows).'</table>';
}
......@@ -2800,7 +2801,7 @@ class tx_impexp {
* @return void
*/
function singleRecordLines($table,$uid,&$lines,$preCode,$checkImportInPidRecord=0) {
global $TCA,$BE_USER;
global $TCA,$BE_USER,$LANG;
// Get record:
$record = $this->dat['header']['records'][$table][$uid];
......@@ -2812,7 +2813,7 @@ class tx_impexp {
$pInfo['ref'] = $table.':'.$uid;
if ($table==='_SOFTREF_') { // Unknown table name:
$pInfo['preCode'] = $preCode;
$pInfo['title'] = '<em>'.htmlspecialchars('Soft References Files:').'</em>';
$pInfo['title'] = '<em>'.$LANG->getLL('impexpcore_singlereco_softReferencesFiles',1).'</em>';
} elseif (!isset($TCA[$table])) { // Unknown table name:
$pInfo['preCode'] = $preCode;
$pInfo['msg'] = "UNKNOWN TABLE '".$pInfo['ref']."'";
......@@ -2842,17 +2843,17 @@ class tx_impexp {
// Mode selector:
$optValues = array();
$optValues[] = $recInf ? 'Update' : 'Insert';
if ($recInf) $optValues['as_new'] = 'Import as new';
$optValues[] = $recInf ? $LANG->getLL('impexpcore_singlereco_update') : $LANG->getLL('impexpcore_singlereco_insert');
if ($recInf) $optValues['as_new'] = $LANG->getLL('impexpcore_singlereco_importAsNew');
if ($recInf) {
if (!$this->global_ignore_pid) {
$optValues['ignore_pid'] = 'Ignore PID';
$optValues['ignore_pid'] = $LANG->getLL('impexpcore_singlereco_ignorePid');
} else {
$optValues['respect_pid'] = 'Respect PID';
$optValues['respect_pid'] = $LANG->getLL('impexpcore_singlereco_respectPid');
}
}
if (!$recInf && $GLOBALS['BE_USER']->isAdmin()) $optValues['force_uid'] = 'Force UID ['.$uid.'] (Admin)';
$optValues['exclude'] = 'Exclude';
if (!$recInf && $GLOBALS['BE_USER']->isAdmin()) $optValues['force_uid'] = sprintf($LANG->getLL('impexpcore_singlereco_forceUidSAdmin'),$uid);
$optValues['exclude'] = $LANG->getLL('impexpcore_singlereco_exclude');
$pInfo['updateMode'] = $this->renderSelectBox('tx_impexp[import_mode]['.$table.':'.$uid.']',$this->import_mode[$table.':'.$uid],$optValues);
}
......@@ -2905,15 +2906,15 @@ class tx_impexp {
$pInfo['title'] = '<em>'.$info['field'].', "'.$info['spKey'].'" </em>: <span title="'.htmlspecialchars($info['matchString']).'">'.htmlspecialchars(t3lib_div::fixed_lgd_cs($info['matchString'],60)).'</span>';
if ($info['subst']['type']) {
if (strlen($info['subst']['title'])) {
$pInfo['title'].= '<br/>'.$preCode_B.'<b>Title:</b> '.htmlspecialchars(t3lib_div::fixed_lgd_cs($info['subst']['title'],60));
$pInfo['title'].= '<br/>'.$preCode_B.'<b>'.$LANG->getLL('impexpcore_singlereco_title',1).'</b> '.htmlspecialchars(t3lib_div::fixed_lgd_cs($info['subst']['title'],60));
}
if (strlen($info['subst']['description'])) {
$pInfo['title'].= '<br/>'.$preCode_B.'<b>Descr:</b> '.htmlspecialchars(t3lib_div::fixed_lgd_cs($info['subst']['description'],60));
$pInfo['title'].= '<br/>'.$preCode_B.'<b>'.$LANG->getLL('impexpcore_singlereco_descr',1).'</b> '.htmlspecialchars(t3lib_div::fixed_lgd_cs($info['subst']['description'],60));
}
$pInfo['title'].= '<br/>'.$preCode_B.
($info['subst']['type'] == 'file' ? 'Filename: <b>'.$info['subst']['relFileName'].'</b>' : '').
($info['subst']['type'] == 'string' ? 'Value: <b>'.$info['subst']['tokenValue'].'</b>' : '').
($info['subst']['type'] == 'db' ? 'Record: <b>'.$info['subst']['recordRef'].'</b>' : '');
($info['subst']['type'] == 'file' ? $LANG->getLL('impexpcore_singlereco_filename',1).' <b>'.$info['subst']['relFileName'].'</b>' : '').
($info['subst']['type'] == 'string' ? $LANG->getLL('impexpcore_singlereco_value',1).' <b>'.$info['subst']['tokenValue'].'</b>' : '').
($info['subst']['type'] == 'db' ? $LANG->getLL('impexpcore_softrefsel_record',1).' <b>'.$info['subst']['recordRef'].'</b>' : '');
}
$pInfo['ref'] = 'SOFTREF';
$pInfo['size'] = '';
......@@ -3153,8 +3154,10 @@ class tx_impexp {
* @return string HTML
*/
function renderControls($r) {
global $LANG;
if ($this->mode==='export') {
return ($r['type']=='record' ? '<input type="checkbox" name="tx_impexp[exclude]['.$r['ref'].']" value="1" /> Exclude' :
return ($r['type']=='record' ? '<input type="checkbox" name="tx_impexp[exclude]['.$r['ref'].']" value="1" /> '.$LANG->getLL('impexpcore_singlereco_exclude',1) :
($r['type']=='softref' ? $this->softrefSelector($r['_softRefInfo']) : ''));
} else { // During import
......@@ -3179,6 +3182,8 @@ class tx_impexp {
* @return string Selector box HTML
*/
function softrefSelector($cfg) {
global $LANG;
// Looking for file ID if any:
$fI = $cfg['file_ID'] ? $this->dat['header']['files'][$cfg['file_ID']] : array();
......@@ -3188,8 +3193,8 @@ class tx_impexp {
// Create options:
$optValues = array();
$optValues[''] = '';
$optValues['editable'] = 'Editable';
$optValues['exclude'] = 'Exclude';
$optValues['editable'] = $LANG->getLL('impexpcore_softrefsel_editable');
$optValues['exclude'] = $LANG->getLL('impexpcore_softrefsel_exclude');
// Get current value:
$value = $this->softrefCfg[$cfg['subst']['tokenID']]['mode'];
......@@ -3211,7 +3216,7 @@ class tx_impexp {
// Description:
if (!strlen($cfg['subst']['description'])) {
$descriptionField.= '
Description:<br/>
'.$LANG->getLL('impexpcore_printerror_description',1).'<br/>
<input type="text" name="tx_impexp[softrefCfg]['.$cfg['subst']['tokenID'].'][description]" value="'.htmlspecialchars($this->softrefCfg[$cfg['subst']['tokenID']]['description']).'" />';
} else {
$descriptionField.= '
......
......@@ -95,7 +95,7 @@ class tx_impexp_clickmenu {
}
$localItems[] = $backRef->linkItem(
$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export',$LL)),
$backRef->excludeIcon('<img src="'.$backRef->backPath.t3lib_extMgm::extRelPath('impexp').'export.gif" width="18" height="16" alt="" />'),
$backRef->excludeIcon('<img'.t3lib_iconWorks::skinImg($backRef->backPath,t3lib_extMgm::extRelPath('impexp').'export.gif','width="18" height="16"').' alt="" />'),
$backRef->urlRefForCM($url),
1 // Disables the item in the top-bar
);
......@@ -104,7 +104,7 @@ class tx_impexp_clickmenu {
$url = t3lib_extMgm::extRelPath('impexp').'app/index.php?id='.$uid.'&table='.$table.'&tx_impexp[action]=import';
$localItems[] = $backRef->linkItem(
$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import',$LL)),
$backRef->excludeIcon('<img src="'.t3lib_extMgm::extRelPath('impexp').'import.gif" width="18" height="16" alt="" />'),
$backRef->excludeIcon('<img'.t3lib_iconWorks::skinImg($backRef->backPath,t3lib_extMgm::extRelPath('impexp').'import.gif','width="18" height="16"').' alt="" />'),
$backRef->urlRefForCM($url),
1 // Disables the item in the top-bar
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment