-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[#19908] locale in rest calls is always default locale #19913
[#19908] locale in rest calls is always default locale #19913
Conversation
Hi @jwundrak. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
{ | ||
public function __construct( | ||
\Magento\Store\Model\StoreManagerInterface $storeManager, | ||
\Magento\Framework\Locale\ResolverInterface $localeResolver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, inject new dependencies according to our Backward Compatible Development Guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidolov Sorry, done
'Default store code' => ['', 'default', 0], | ||
'Arbitrary store code' => [$this->arbitraryStoreCode, $this->arbitraryStoreCode], | ||
'Explicit default store code' => ['default', 'default'] | ||
'All store code' => ['all', Store::ADMIN_CODE], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, revert indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidolov Sorry, done
$storeCodeInPath = !$storeCodeInPath ?: '/' . $storeCodeInPath; // add leading slash if store code not empty | ||
$inPath = 'rest' . $storeCodeInPath . $this->endpointPath; | ||
$storeCodeInPath = !$storeCodeInPath ? : '/' . $storeCodeInPath; // add leading slash if store code not empty | ||
$inPath = 'rest' . $storeCodeInPath . $this->endpointPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, revert indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidolov Sorry, done
/** | ||
* @var \Magento\Framework\Locale\ResolverInterface::class | ||
*/ | ||
protected $localeResolver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, make this property private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sidolov Sorry, done
Hi @orlangur, thank you for the review. |
Hi @jwundrak, thank you for your contribution! |
Description (*)
If there are multiple store views with different locales, always default store locale is present. For reproducing see #19908 .
Fixed Issues (if relevant)
#19908
Manual testing scenarios (*)
Contribution checklist (*)