diff --git a/CRM/Import/Form/DataSource.php b/CRM/Import/Form/DataSource.php index 29370472bb78..8002f87e44f0 100644 --- a/CRM/Import/Form/DataSource.php +++ b/CRM/Import/Form/DataSource.php @@ -32,6 +32,31 @@ public function preProcess() { // check for post max size CRM_Utils_Number::formatUnitSize(ini_get('post_max_size'), TRUE); + $this->assign('importEntity', $this->getTranslatedEntity()); + $this->assign('importEntities', $this->getTranslatedEntities()); + } + + /** + * Get the import entity (translated). + * + * Used for template layer text. + * + * @return string + */ + protected function getTranslatedEntity(): string { + return Civi\Api4\Utils\CoreUtil::getInfoItem($this::IMPORT_ENTITY, 'title'); + } + + /** + * Get the import entity plural (translated). + * + * Used for template layer text. + * + * @return string + */ + protected function getTranslatedEntities(): string { + return Civi\Api4\Utils\CoreUtil::getInfoItem($this::IMPORT_ENTITY, 'title_plural'); + } /** diff --git a/templates/CRM/Activity/Import/Form/DataSource.tpl b/templates/CRM/Activity/Import/Form/DataSource.tpl index d51557e78669..56fb9940deb0 100644 --- a/templates/CRM/Activity/Import/Form/DataSource.tpl +++ b/templates/CRM/Activity/Import/Form/DataSource.tpl @@ -7,9 +7,8 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{* Activity Import Wizard - Step 1 (upload data file) *} -{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} -
+{* Import Wizard - Step 1 (choose data source) *} +
{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} {include file="CRM/common/WizardHeader.tpl"} diff --git a/templates/CRM/Contact/Import/Form/DataSource.tpl b/templates/CRM/Contact/Import/Form/DataSource.tpl index 72fb1dec112a..0c2f4591599c 100644 --- a/templates/CRM/Contact/Import/Form/DataSource.tpl +++ b/templates/CRM/Contact/Import/Form/DataSource.tpl @@ -13,8 +13,6 @@ {include file=$dataSourceFormTemplateFile} {else} {* Import Wizard - Step 1 (choose data source) *} - {* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} - {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} {include file="CRM/common/WizardHeader.tpl"}
diff --git a/templates/CRM/Contribute/Import/Form/DataSource.tpl b/templates/CRM/Contribute/Import/Form/DataSource.tpl index 96163585857f..f282b322df7d 100644 --- a/templates/CRM/Contribute/Import/Form/DataSource.tpl +++ b/templates/CRM/Contribute/Import/Form/DataSource.tpl @@ -7,36 +7,61 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{* Contribution Import Wizard - Step 1 (upload data file) *} -{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} -
- {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} -{include file="CRM/common/WizardHeader.tpl"} -
- {ts}The Contribution Import Wizard allows you to easily upload contributions from other applications into CiviCRM.{/ts} - {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match the contribution to an existing contact in your CiviCRM database.{/ts} {help id='upload'} -
-
{include file="CRM/common/formButtons.tpl" location="top"}
+ +{* Import Wizard - Step 1 (choose data source) *} +
+ + {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} + {include file="CRM/common/WizardHeader.tpl"} +
+ {ts 1=$importEntity 2= $importEntities}The %1 Import Wizard allows you to easily upload %2 from other applications into CiviCRM.{/ts} + {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match an existing contact in your CiviCRM database.{/ts} {help id='upload'} +
+ +
{include file="CRM/common/formButtons.tpl" location="top"}
- - - - - - - - + + + + + + + + + + + + + + + + + + + + {include file="CRM/Core/Date.tpl"} + {if $savedMapping} + + + - {include file="CRM/Core/Date.tpl"} - {if $savedMapping} - - {/if} -
{$form.uploadFile.label} {$form.uploadFile.html}
- {ts}File format must be comma-separated-values (CSV).{/ts}
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts}
{$form.skipColumnHeader.html}{$form.skipColumnHeader.label}
- - {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts}
{$form.contactType.label}{$form.contactType.html}
- - {ts}Select 'Individual' if you are importing contributions made by individual persons.{/ts} - {ts}Select 'Organization' or 'Household' if you are importing contributions made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts}
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'}{$form.fieldSeparator.html}
{$form.uploadFile.label} {$form.uploadFile.html}
+ {ts}File format must be comma-separated-values (CSV).{/ts} +
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts} +
{$form.skipColumnHeader.html}{$form.skipColumnHeader.label}
+ + {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts} + +
{$form.contactType.label}{$form.contactType.html}
+ + {ts 1=$importEntities}Select 'Individual' if you are importing %1 made by individual persons.{/ts} + {ts 1=$importEntities}Select 'Organization' or 'Household' if you are importing %1 made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts} + +
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'}{$form.fieldSeparator.html}
{$form.savedMapping.label}{$form.savedMapping.html}
+ {ts}If you want to use a previously saved import field mapping - select it here.{/ts} +
{$form.savedMapping.label}{$form.savedMapping.html}
{ts}Select a saved field mapping if this file format matches a previous import.{/ts}
-
{include file="CRM/common/formButtons.tpl" location="bottom"}
-
+ {/if} + +
+ +
{include file="CRM/common/formButtons.tpl" location="bottom"}
+
diff --git a/templates/CRM/Custom/Import/Form/DataSource.tpl b/templates/CRM/Custom/Import/Form/DataSource.tpl index 38b479dc33cd..da84c3231817 100644 --- a/templates/CRM/Custom/Import/Form/DataSource.tpl +++ b/templates/CRM/Custom/Import/Form/DataSource.tpl @@ -8,12 +8,11 @@ +--------------------------------------------------------------------+ *} -{* Multi-value Custom Data Import Wizard - Step 1 (upload data file) *} -{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} +{* Import Wizard - Step 1 (choose data source) *} +
-
- {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} - {include file="CRM/common/WizardHeader.tpl"} + {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} + {include file="CRM/common/WizardHeader.tpl"} {if !$fieldGroups}
{ts}This import screen cannot be used because there are no Multi-value custom data groups.{/ts} diff --git a/templates/CRM/Event/Import/Form/DataSource.tpl b/templates/CRM/Event/Import/Form/DataSource.tpl index 626b1d8cec4b..4795645b296b 100644 --- a/templates/CRM/Event/Import/Form/DataSource.tpl +++ b/templates/CRM/Event/Import/Form/DataSource.tpl @@ -7,10 +7,8 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{* Event Import Wizard - Step 1 (upload data file) *} -{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} - -
+{* Import Wizard - Step 1 (choose data source) *} +
{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} {include file="CRM/common/WizardHeader.tpl"} diff --git a/templates/CRM/Member/Import/Form/DataSource.tpl b/templates/CRM/Member/Import/Form/DataSource.tpl index fb4cfaf06041..19f582d30bf2 100644 --- a/templates/CRM/Member/Import/Form/DataSource.tpl +++ b/templates/CRM/Member/Import/Form/DataSource.tpl @@ -7,61 +7,62 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -
-{* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} - {include file="CRM/common/WizardHeader.tpl"} -
- {ts}The Membership Import Wizard allows you to easily upload memberships from other applications into CiviCRM.{/ts} - {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match the membership data to an existing contact in your CiviCRM database.{/ts} {help id='upload'} -
-{* Membership Import Wizard - Step 1 (upload data file) *} -{* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} -
{include file="CRM/common/formButtons.tpl" location="top"}
- -
-
- - +{* Import Wizard - Step 1 (choose data source) *} +
+ + {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} + {include file="CRM/common/WizardHeader.tpl"} +
+ {ts 1=$importEntity 2= $importEntities}The %1 Import Wizard allows you to easily upload %2 from other applications into CiviCRM.{/ts} + {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match an existing contact in your CiviCRM database.{/ts} {help id='upload'} +
+ +
{include file="CRM/common/formButtons.tpl" location="top"}
+
{$form.uploadFile.label}{$form.uploadFile.html}
- {ts}File format must be comma-separated-values (CSV).{/ts} -
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts} -
+ + + + + + - - - - - + + + - - - + + + - {include file="CRM/Core/Date.tpl"} -{if $savedMapping} - - - - -{/if} - -
{$form.uploadFile.label} {$form.uploadFile.html}
+ {ts}File format must be comma-separated-values (CSV).{/ts} +
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts} +
{$form.skipColumnHeader.html}{$form.skipColumnHeader.label}
+ + {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts} + +
     {$form.skipColumnHeader.html} {$form.skipColumnHeader.label}
- - {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts} -
{$form.contactType.label} - {$form.contactType.html}
- - {ts}Select 'Individual' if you are importing memberships for individual persons.{/ts} - {ts}Select 'Organization' or 'Household' if you are importing memberships made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts} - -
{$form.contactType.label}{$form.contactType.html}
+ + {ts 1=$importEntities}Select 'Individual' if you are importing %1 made by individual persons.{/ts} + {ts 1=$importEntities}Select 'Organization' or 'Household' if you are importing %1 made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts} + +
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'} {$form.fieldSeparator.html}
{$form.savedMapping.label}{$form.savedMapping.html}
- {ts}If you want to use a previously saved import field mapping - select it here.{/ts} -
-
+ {include file="CRM/Core/Date.tpl"} + {if $savedMapping} + + {$form.savedMapping.label} + {$form.savedMapping.html}
+ {ts}If you want to use a previously saved import field mapping - select it here.{/ts} + + + {/if} + +
-
{include file="CRM/common/formButtons.tpl" location="bottom"}
+
{include file="CRM/common/formButtons.tpl" location="bottom"}
+