Skip to content

Numerical placeholder count in Phrase starts with %1, however js code assumes 0% #25243

Closed
@vitcra

Description

@vitcra

Preconditions (*)

  1. Magento 2.3.3

Steps to reproduce (*)

  1. Check this code: https://github.com/magento/magento2/blob/2.3.3/lib/internal/Magento/Framework/Phrase/Renderer/Placeholder.php#L43

  2. Compare to: https://github.com/magento/magento2/blob/2.3.3/app/code/Magento/Ui/view/frontend/web/js/model/messages.js#L52

Expected result (*)

Js version of __('Carrier with such method not found: %1, %2', 'one', 'two') should produce the message of 'Carrier with such method not found: one, two'.

See for example: https://github.com/magento/magento2/blob/2.3.3/app/code/Magento/Checkout/Model/ShippingInformationManagement.php#L198

Actual result (*)

Js version of __('Carrier with such method not found: %1, %2', 'one', 'two') produces the message of 'Carrier with such method not found: two, one'.

Metadata

Metadata

Assignees

Labels

Component: TranslationFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentProgress: doneReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions