Bug: order statuses in admin order grid are not translatable automatically (and my fix)

localization
bug-fix

(Dmitry Fedyuk) #1

You can translate order statuses manually in «Stores» → «Order Status» admin section.
But it is inconvenient because:

  • you must do it manullay for each new Magento installation
  • it works for a single language but does not work for multistore Magento installation with multiple languages.

The problem code line is:

My fix is to replace the problem line with the new one:

$this->statuses = array_map('__', $collectionFactory->create()->toOptionHash());

(Claudiu Marginean) #2

This was a problem in Magento 1 as well.
Actually, in Magento 1 the grid as well did not translate but the order view page translated them using the translate csv.
But we have a database table with labels for each store view. Way not use that? That is only used in front end I think.


(Dmitry Fedyuk) #3

I wrote why it is inconvenient in the post above. Please read posts before commenting them.