-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
page.main.title is translating title #7065
Comments
Thanks for reporting, internal ticket created MAGETWO-59860 |
Running into the same problem over here using Magento CE 2.1.2 A client of ours uses these abstract names for their product, like 'Time' or 'Guest', and they are getting translated in the title on the product detail view, which looks really silly. Worked around it with a custom interceptor on the private $request;
public function __construct(\Magento\Framework\App\Request\Http $request)
{
$this->request = $request;
}
public function afterGetPageHeading(\Magento\Theme\Block\Html\Title $subject, $result)
{
if ($this->request->getFullActionName() == 'catalog_product_view')
{
if (!empty($subject->getPageTitle()))
{
return $subject->getPageTitle();
}
}
return $result;
} Would be great if this issue could get some attention :) |
@koenner01, thank you for your report. |
@koenner01 @hostep PR opened to try to fix this issue in 2.3-develop, when accepted, I will backport it to 2.2-develop and 2.1-develop |
Hi @koenner01. Thank you for your report. The fix will be available with the upcoming 2.4.0 release. |
Looks like a fix for this is also coming in Magento 2.3.5 (not 100% sure) |
The page.main.title block is translating the title. This can lead to unwanted results (like the product name being translated...)
Preconditions
Steps to reproduce
Expected result
Actual result
I traced this back to \Magento\Theme\Block\Html\Title.
Both the getPageTitle() and getPageHeading() function are wrapping the output in the magic translation function. Because of this the product name is being translated.
I'm pretty sure the translation here can be dropped all together because you can control the page titles from either the layout xml's or through the backend on storeview values.
The text was updated successfully, but these errors were encountered: