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

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());
1 Like

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.

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