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

[BUG] Workflow toolbar status info no localization #613

Closed
aMH-techsigns opened this issue Jul 15, 2024 · 1 comment
Closed

[BUG] Workflow toolbar status info no localization #613

aMH-techsigns opened this issue Jul 15, 2024 · 1 comment
Assignees
Labels

Comments

@aMH-techsigns
Copy link
Contributor

Pimcore version

11.2.x

Steps to reproduce

  1. Configure workflow places
  2. Provide translations for places in admin messages
  3. Switch language in user (between provides translations)

Actual behaviour

The language seems to just follow the symfony default language setup.

Expected behaviour

Pimcore should consider the configured user language to switch to the given translation.

Possible solution approach

The issue appears in the following template: pimcore/vendor/pimcore/pimcore/bundles/CoreBundle/templates/Workflow/statusinfo/toolbarStatusInfo.html.twig
The translator interface is passed as view parameter to the template but seems not to have the right context.
So a possible solution can be to set the correct locale (or language corresponding to the logged in user) inside the event listener: pimcore/vendor/pimcore/admin-ui-classic-bundle/src/EventListener/WorkflowManagementListener.php were the method getToolbarHtml is returning the rendered template mentioned above.
In the event listener its possible to use injections so it might be possible to call the setLocal method on the TranslatorInterface or something like that with the correct context based locale.

@kingjia90
Copy link
Contributor

kingjia90 commented Jul 24, 2024

Thank you for reporting

This should be fixed by pimcore/pimcore#17252 (11.3.1), let us know if it works, if not, feel free to re-open this or in a new issue with further details

@kingjia90 kingjia90 self-assigned this Jul 24, 2024
@kingjia90 kingjia90 added the Bug label Jul 24, 2024
@kingjia90 kingjia90 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants