[-] FO : #PSCFV-2150 : Translations of back office are connected width sprintf()
This commit is contained in:
@@ -93,7 +93,7 @@ class AdminAccessControllerCore extends AdminController
|
||||
if ($m)
|
||||
$module['name'] = $m->displayName;
|
||||
else
|
||||
$this->warnings[] = '<b>'.$module['name'].'</b>'.$this->l(': module is installed in database, but its files are missing or incompatible.');
|
||||
$this->warnings[] = sprintf($this->l('%s: module is installed in database, but its files are missing or incompatible.'), '<b>'.$module['name'].'</b>');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,9 +146,11 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
if (isset($_FILES['file']) && is_uploaded_file($_FILES['file']['tmp_name']))
|
||||
{
|
||||
if ($_FILES['file']['size'] > (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024 * 1024))
|
||||
$this->errors[] = $this->l('File too large, maximum size allowed:').' '.
|
||||
(Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024).' '.$this->l('kb').'. '.
|
||||
$this->l('File size you\'re trying to upload is:').number_format(($_FILES['file']['size'] / 1024), 2, '.', '').$this->l('kb');
|
||||
$this->errors[] = sprintf(
|
||||
$this->l('File too large, maximum size allowed: %1$d kB. File size you\'re trying to upload is: %2$d kB.'),
|
||||
(Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024),
|
||||
number_format(($_FILES['file']['size'] / 1024), 2, '.', '')
|
||||
);
|
||||
else
|
||||
{
|
||||
do $uniqid = sha1(microtime());
|
||||
@@ -166,8 +168,11 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
$max_upload = (int)ini_get('upload_max_filesize');
|
||||
$max_post = (int)ini_get('post_max_size');
|
||||
$upload_mb = min($max_upload, $max_post);
|
||||
$this->errors[] = $this->l('the File').' <b>'.$_FILES['file']['name'].'</b> '.
|
||||
$this->l('exceeds the size allowed by the server. The limit is set to').' <b>'.$upload_mb.$this->l('MB').'</b>';
|
||||
$this->errors[] = sprintf(
|
||||
$this->l('The File %1$s exceeds the size allowed by the server. The limit is set to %1$d MB.'),
|
||||
'<b>'.$_FILES['file']['name'].'</b> ',
|
||||
'<b>'.$upload_mb.'</b>'
|
||||
);
|
||||
}
|
||||
else if (!empty($_FILES['file']['tmp_name']))
|
||||
$this->errors[] = $this->l('No file or your file is not uploadable, please check your server configuration for the maximum upload size.');
|
||||
|
||||
@@ -199,7 +199,7 @@ class AdminCarriersControllerCore extends AdminController
|
||||
'name' => 'name',
|
||||
'size' => 25,
|
||||
'required' => true,
|
||||
'hint' => $this->l('Allowed characters: letters, spaces and').' ().-',
|
||||
'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'),
|
||||
'desc' => array(
|
||||
$this->l('Carrier name displayed during checkout'),
|
||||
$this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name')
|
||||
|
||||
@@ -1244,7 +1244,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$is_tag_added = $tag->addTags($key, $product->id, $tags);
|
||||
if (!$is_tag_added)
|
||||
{
|
||||
$this->addProductWarning($info['name'], $product->id, $this->l('Tags list').' '.$this->l('is invalid'));
|
||||
$this->addProductWarning($info['name'], $product->id, $this->l('Tags list is invalid'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,8 +90,7 @@ class AdminMetaControllerCore extends AdminController
|
||||
}
|
||||
|
||||
// Options to generate robot.txt
|
||||
$robots_description = $this->l('Your robots.txt file MUST be in your website\'s root directory and nowhere else.');
|
||||
$robots_description .= '<br />'.$this->l('e.g. http://www.yoursite.com/robots.txt');
|
||||
$robots_description = $this->l('Your robots.txt file MUST be in your website\'s root directory and nowhere else (e.g. http://www.yoursite.com/robots.txt).');
|
||||
if ($this->checkConfiguration($this->rb_file))
|
||||
{
|
||||
$robots_description .= '<br />'.$this->l('Generate your "robots.txt" file by clicking on the following button (this will erase your old robots.txt file):');
|
||||
|
||||
@@ -1180,7 +1180,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$deliveryState = new State((int)($addressDelivery->id_state));
|
||||
}
|
||||
|
||||
$this->toolbar_title = $this->l('Order #').sprintf('%06d', $order->id).' ('.$order->reference.') - '.$customer->firstname.' '.$customer->lastname;
|
||||
$this->toolbar_title = sprintf($this->l('Order #%1$d (%2$s) - %3$s %4$s'), $order->id, $order->reference, $customer->firstname, $customer->lastname);
|
||||
|
||||
// gets warehouses to ship products, if and only if advanced stock management is activated
|
||||
$warehouse_list = null;
|
||||
|
||||
@@ -524,7 +524,7 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
<a href="http://xcache.lighttpd.net" target="_blank">http://xcache.lighttpd.net</a>';
|
||||
|
||||
if (!is_writable(_PS_CACHEFS_DIRECTORY_))
|
||||
$this->warnings[] = $this->l('To use the CacheFS directory').' '.realpath(_PS_CACHEFS_DIRECTORY_).' '.$this->l('must be writable');
|
||||
$this->warnings[] = sprintf($this->l('To use the CacheFS directory %s must be writable.'), realpath(_PS_CACHEFS_DIRECTORY_));
|
||||
|
||||
$this->initToolbar();
|
||||
$this->display = '';
|
||||
|
||||
@@ -340,7 +340,11 @@ class AdminProductsControllerCore extends AdminController
|
||||
if (isset($_FILES['attachment_file']) && is_uploaded_file($_FILES['attachment_file']['tmp_name']))
|
||||
{
|
||||
if ($_FILES['attachment_file']['size'] > (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024 * 1024))
|
||||
$this->errors[] = $this->l('File too large, maximum size allowed:').' '.(Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024).' '.$this->l('kB').'. '.$this->l('File size you\'re trying to upload is:').number_format(($_FILES['attachment_file']['size'] / 1024), 2, '.', '').$this->l('kB');
|
||||
$this->errors[] = sprintf(
|
||||
$this->l('File too large, maximum size allowed: %1$d kB. File size you\'re trying to upload is: %2$d kB.'),
|
||||
(Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024),
|
||||
number_format(($_FILES['attachment_file']['size'] / 1024), 2, '.', '')
|
||||
);
|
||||
else
|
||||
{
|
||||
do $uniqid = sha1(microtime());
|
||||
@@ -355,7 +359,11 @@ class AdminProductsControllerCore extends AdminController
|
||||
$max_upload = (int)ini_get('upload_max_filesize');
|
||||
$max_post = (int)ini_get('post_max_size');
|
||||
$upload_mb = min($max_upload, $max_post);
|
||||
$this->errors[] = $this->l('the File').' <b>'.$_FILES['attachment_file']['name'].'</b> '.$this->l('exceeds the size allowed by the server, this limit is set to').' <b>'.$upload_mb.$this->l('MB').'</b>';
|
||||
$this->errors[] = sprintf(
|
||||
$this->l('The File %1$s exceeds the size allowed by the server. The limit is set to %1$d MB.'),
|
||||
'<b>'.$_FILES['attachment_file']['name'].'</b> ',
|
||||
'<b>'.$upload_mb.'</b>'
|
||||
);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('File is missing');
|
||||
@@ -1781,7 +1789,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
{
|
||||
if (!Tools::getValue('virtual_product_expiration_date'))
|
||||
{
|
||||
$this->errors[] = $this->l('this field').' <b>'.$this->l('expiration date attribute').'</b> '.$this->l('is required');
|
||||
$this->errors[] = Tools::displayError('This field expiration date attribute is required.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,80 +366,101 @@ class AdminRequestSqlControllerCore extends AdminController
|
||||
{
|
||||
case 'checkedFrom':
|
||||
if (isset($e[$key]['table']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The Table').' "'.$e[$key]['table'].'" '.$this->l('doesn\'t exist.'));
|
||||
$this->errors[] = sprintf(Tools::displayError('The Table "%s" doesn\'t exist.'), $e[$key]['table']);
|
||||
else if (isset($e[$key]['attribut']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The attribute').' "'.
|
||||
$e[$key]['attribut'][0].'" '.$this->l('does not exist in the table:').$e[$key]['attribut'][1].'.');
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['attribut'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('Error'));
|
||||
$this->errors[] = Tools::displayError('Error');
|
||||
break;
|
||||
|
||||
case 'checkedSelect':
|
||||
if (isset($e[$key]['table']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The Table').' "'.$e[$key]['table'].'" '.$this->l('doesn\'t exist.'));
|
||||
$this->errors[] = sprintf(Tools::displayError('The Table "%s" doesn\'t exist.'), $e[$key]['table']);
|
||||
else if (isset($e[$key]['attribut']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The attribute').' "'.
|
||||
$e[$key]['attribut'][0].'" '.$this->l('does not exist in the table:').$e[$key]['attribut'][1].'.');
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['attribut'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else if (isset($e[$key]['*']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The operator "*" can be used in a nested query.'));
|
||||
$this->errors[] = Tools::displayError('The operator "*" can be used in a nested query.');
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('Error'));
|
||||
$this->errors[] = Tools::displayError('Error');
|
||||
break;
|
||||
|
||||
case 'checkedWhere':
|
||||
if (isset($e[$key]['operator']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The operator').' "'.$e[$key]['operator'].'" '.$this->l('used is incorrect.'));
|
||||
$this->errors[] = sprintf(Tools::displayError('The operator "%s" used is incorrect.'), $e[$key]['operator']);
|
||||
else if (isset($e[$key]['attribut']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The attribute').' "'.
|
||||
$e[$key]['attribut'][0].'" '.$this->l('does not exist in the table:').$e[$key]['attribut'][1].'.');
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['attribut'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('Error'));
|
||||
$this->errors[] = Tools::displayError('Error');
|
||||
break;
|
||||
|
||||
case 'checkedHaving':
|
||||
if (isset($e[$key]['operator']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The operator').' "'.$e[$key]['operator'].'" '.$this->l('used is incorrect.'));
|
||||
$this->errors[] = sprintf(Tools::displayError('The operator "%s" used is incorrect.'), $e[$key]['operator']);
|
||||
else if (isset($e[$key]['attribut']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The attribute').' "'.
|
||||
$e[$key]['attribut'][0].'" '.$this->l('does not exist in the table:').$e[$key]['attribut'][1].'.');
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['attribut'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('Error'));
|
||||
$this->errors[] = Tools::displayError('Error');
|
||||
break;
|
||||
|
||||
case 'checkedOrder':
|
||||
if (isset($e[$key]['attribut']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The attribute').' "'.
|
||||
$e[$key]['attribut'][0].'" '.$this->l('does not exist in the table:').$e[$key]['attribut'][1].'.');
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['attribut'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('Error'));
|
||||
$this->errors[] = Tools::displayError('Error');
|
||||
break;
|
||||
|
||||
case 'checkedGroupBy':
|
||||
if (isset($e[$key]['attribut']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The attribute').' "'.
|
||||
$e[$key]['attribut'][0].'" '.$this->l('does not exist in the table:').$e[$key]['attribut'][1].'.');
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['attribut'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('Error'));
|
||||
$this->errors[] = Tools::displayError('Error');
|
||||
break;
|
||||
|
||||
case 'checkedLimit':
|
||||
$this->errors[] = Tools::DisplayError($this->l('The LIMIT clause must contain numeric arguments.'));
|
||||
$this->errors[] = Tools::displayError('The LIMIT clause must contain numeric arguments.');
|
||||
break;
|
||||
|
||||
case 'returnNameTable':
|
||||
if (isset($e[$key]['reference']))
|
||||
$this->errors[] = Tools::DisplayError($this->l('The reference').'"'.
|
||||
$e[$key]['reference'][0].'"'.$this->l('doesn\'t exist in:').$e[$key]['reference'][1]);
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The reference "%1$s" does not exist in the table: %2$s.'),
|
||||
$e[$key]['reference'][0],
|
||||
$e[$key]['attribut'][1]
|
||||
);
|
||||
else
|
||||
$this->errors[] = Tools::DisplayError($this->l('When multiple tables are used, each attribute must be referenced to a table.'));
|
||||
$this->errors[] = Tools::displayError('When multiple tables are used, each attribute must be referenced to a table.');
|
||||
break;
|
||||
|
||||
case 'testedRequired':
|
||||
$this->errors[] = Tools::DisplayError($e[$key].' '.$this->l('doesn\'t exist.'));
|
||||
$this->errors[] = sprintf(Tools::displayError('%s doesn\'t exist.'), $e[$key]);
|
||||
break;
|
||||
|
||||
case 'testedUnauthorized':
|
||||
$this->errors[] = Tools::DisplayError($e[$key].' '.$this->l('is a unauthorized keyword.'));
|
||||
$this->errors[] = sprintf(Tools::displayError('is a unauthorized keyword.'), $e[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ class AdminReturnControllerCore extends AdminController
|
||||
$this->tpl_form_vars = array(
|
||||
'customer' => new Customer($this->object->id_customer),
|
||||
'url_customer' => 'index.php?tab=AdminCustomers&id_customer='.(int)$this->object->id_customer.'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id),
|
||||
'text_order' => $this->l('Order #').sprintf('%06d', $order->id).' '.$this->l('from').' '.Tools::displayDate($order->date_upd, $order->id_lang),
|
||||
'text_order' => sprintf($this->l('Order #%1$d from %2$s'), $order->id, Tools::displayDate($order->date_upd, $order->id_lang)),
|
||||
'url_order' => 'index.php?tab=AdminOrders&id_order='.(int)$order->id.'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$this->context->employee->id),
|
||||
'picture_folder' => _THEME_PROD_PIC_DIR_,
|
||||
'type_file' => Product::CUSTOMIZE_FILE,
|
||||
|
||||
@@ -198,9 +198,9 @@ class AdminScenesControllerCore extends AdminController
|
||||
$image_to_map_desc = '';
|
||||
$image_to_map_desc .= $this->l('Format:').' JPG, GIF, PNG. '.$this->l('File size:').' '
|
||||
.(Tools::getMaxUploadSize() / 1024).''.$this->l('kB max.').' '
|
||||
.$this->l('If larger than the image size setting, the image will be reduced to ')
|
||||
.' '.$large_scene_image_type['width'].'x'.$large_scene_image_type['height'].'px '
|
||||
.$this->l('(width x height). If smaller than the image-size setting, a white background will be added in order to achieve the correct image size.').'<br />'.
|
||||
.sprintf($this->l('If larger than the image size setting, the image will be reduced to %1$d x %2$dpx (width x height).'),
|
||||
$large_scene_image_type['width'], $large_scene_image_type['height'])
|
||||
.$this->l('If smaller than the image-size setting, a white background will be added in order to achieve the correct image size.').'<br />'.
|
||||
$this->l('Note: To change image dimensions, please change the \'large_scene\' image type settings to the desired size (in Back Office > Preferences > Images).');
|
||||
if ($obj->id && file_exists(_PS_SCENE_IMG_DIR_.$obj->id.'-large_scene.jpg'))
|
||||
{
|
||||
@@ -228,8 +228,8 @@ class AdminScenesControllerCore extends AdminController
|
||||
$img_alt_desc .= $this->l('If you want to use a thumbnail other than one generated from simply reducing the mapped image, please upload it here.')
|
||||
.'<br />'.$this->l('Format:').' JPG, GIF, PNG. '
|
||||
.$this->l('Filesize:').' '.(Tools::getMaxUploadSize() / 1024).''.$this->l('kB max.').' '
|
||||
.$this->l('Automatically resized to')
|
||||
.' '.$thumb_scene_image_type['width'].'x'.$thumb_scene_image_type['height'].'px '.$this->l('(width x height)').'.<br />'
|
||||
.sprintf($this->l('Automatically resized to %1$d x %2$dpx (width x height).'),
|
||||
$thumb_scene_image_type['width'], $thumb_scene_image_type['height']).'.<br />'
|
||||
.$this->l('Note: To change image dimensions, please change the \'thumb_scene\' image type settings to the desired size (in Back Office > Preferences > Images).');
|
||||
|
||||
$input_img_alt = array(
|
||||
|
||||
@@ -160,7 +160,7 @@ class AdminStoresControllerCore extends AdminController
|
||||
'name' => 'name',
|
||||
'size' => 33,
|
||||
'required' => false,
|
||||
'hint' => $this->l('Allowed characters: letters, spaces and').' (-)',
|
||||
'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'),
|
||||
'desc' => $this->l('Store name (e.g. Citycentre Mall Store)')
|
||||
),
|
||||
array(
|
||||
|
||||
@@ -131,7 +131,7 @@ class AdminTabsControllerCore extends AdminController
|
||||
'type' => 'file',
|
||||
'label' => $this->l('Icon:'),
|
||||
'name' => 'icon',
|
||||
'desc' => $this->l('Upload logo from your computer').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)'
|
||||
'desc' => $this->l('Upload logo from your computer (.gif, .jpg, .jpeg or .png).')
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
|
||||
@@ -300,7 +300,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController
|
||||
'label' => $this->l('No Tax')
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('(Total tax:').'9%)'
|
||||
'desc' => sprintf($this->l('(Total tax: %s)'), '9%')
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
|
||||
Reference in New Issue
Block a user