Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync v19 v20 #2810

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Helper/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ public function validateUploadFile($filePath)
}

if ($imageInfo[0] > $maxDimension || $imageInfo[1] > $maxDimension) {
Mage::throwException($this->__('Disalollowed file format.'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this probably breaks several translations and should have only get changed in the translation file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been arguing for the same thing for long time and I was alone saying that we should only update the translation files. At that time literally everybody was against my (and now your) idea. So please be more vocal next time. The people decided that they want to keep in sync strings in php files and in CSV files so now it is what it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that line it is about an exception that will be written in a log file. I think that these errors can be corrected in the PHP files and if they exist (although I doubt it) in the CSV files too. A programmer should know English, as well as a system administrator who has access to these files. On the other hand, although I do not agree to modify only the CSV files, I accepted PRs where such modifications were made, because it is for user interface and we should take care of translation without requiring efforts from those who periodically update the source code..

There are discussions on this topic in which the administrator takes note of the changes from one version to another and he makes the translations. From the programmer's perspective, honestly speaking, I don't like to see inconsistencies between sentences, especially when I look into the source code. I see something in the interface in English then in the code it's completely different or worse spelling mistakes like the one above, extremely annoying.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The important thing is that we do not keep discussing the same things over and over again. I'm fine with the decision taken although it was not the choice I'd love, sometime it's a personal taste and it is fine :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. i always said change only translation string in csv
  2. @Flyingmana this PR was just to get rid of differences between branches. If we change it back, we should also revert in v20.

Mage::throwException($this->__('Disallowed file format.'));
}

$_processor = new Varien_Image($filePath);
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/CatalogInventory/Model/Stock/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ protected function _construct()
*/
protected function _initOldFieldsMap()
{
// pre 1.6 fields names, old => new
$this->_oldFieldsMap = [
'stock_status_changed_automatically' => 'stock_status_changed_auto',
'use_config_enable_qty_increments' => 'use_config_enable_qty_inc'
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Core/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@
<protected>
<app>/app/*/*</app>
<dev>/dev/*/*</dev>
<downloader>/downloader/*/*</downloader>
<errors>/errors/*/*</errors>
<includes>/includes/*/*</includes>
<js>/js/*/*</js>
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Page/Block/Html/Head.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function addJs($name, $params = "", $referenceName = "*", $before = null)
* @param string $referenceName
* @param bool $before
* @return $this
* @deprecated
*/
public function addCssIe($name, $params = "", $referenceName = "*", $before = null)
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ protected function _construct()
*/
protected function _initOldFieldsMap()
{
// pre 1.6 fields names, old => new
$this->_oldFieldsMap = Mage::helper('sales')->getOldFieldMap('order');
return $this;
}
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ protected function _construct()
* Init mapping array of short fields to its full names
*
* @return $this
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order/Creditmemo.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ protected function _construct()
* Init mapping array of short fields to its full names
*
* @return $this
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order/Creditmemo/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public function setCreditmemo(Mage_Sales_Model_Order_Creditmemo $creditmemo)
*/
protected function _initOldFieldsMap()
{
// pre 1.6 fields names, old => new
$this->_oldFieldsMap = Mage::helper('sales')->getOldFieldMap('creditmemo_item');
return $this;
}
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ protected function _construct()
* Init mapping array of short fields to its full names
*
* @return $this
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order/Invoice/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public function _construct()
*/
protected function _initOldFieldsMap()
{
// pre 1.6 fields names, old => new
$this->_oldFieldsMap = Mage::helper('sales')->getOldFieldMap('invoice_item');
return $this;
}
Expand Down
2 changes: 2 additions & 0 deletions app/code/core/Mage/Sales/Model/Order/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ protected function _construct()
* its full names
*
* @return Varien_Object
* @deprecated
*/
protected function _initOldFieldsMap()
{
// pre 1.6 fields names, old => new
$this->_oldFieldsMap = Mage::helper('sales')->getOldFieldMap('order_item');
return $this;
}
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Order/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ protected function _construct()
* Init mapping array of short fields to its full names
*
* @return $this
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ protected function _construct()
* its full names
*
* @return Varien_Object
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Quote/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ protected function _construct()
* Init mapping array of short fields to its full names
*
* @return $this
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Sales/Model/Quote/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ protected function _construct()
* its full names
*
* @return $this
* @deprecated
*/
protected function _initOldFieldsMap()
{
Expand Down
2 changes: 1 addition & 1 deletion app/locale/en_US/Mage_Catalog.csv
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
"Details","Details"
"Disabled","Disabled"
"Disallowed file type.","Disallowed file type."
"Disalollowed file format.","Disalollowed file format."
"Disallowed file format.","Disallowed file format."
"Display Actual Price","Display Actual Price"
"Display Page Control","Display Page Control"
"Display Price Interval as One Price","Display Price Interval as One Price"
Expand Down
12 changes: 0 additions & 12 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,12 @@
exit;
}

/**
* Compilation includes configuration file
*/
define('MAGENTO_ROOT', getcwd());

$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
$maintenanceFile = 'maintenance.flag';
$maintenanceIpFile = 'maintenance.ip';

if (!file_exists($mageFilename)) {
if (is_dir('downloader')) {
header("Location: downloader");
} else {
echo $mageFilename . " was not found";
}
exit;
}

require MAGENTO_ROOT . '/app/bootstrap.php';
require_once $mageFilename;

Expand Down