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 *} -
{$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} |