View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007669 | OXID eShop (all versions) | 8. --- Twig engine --- | public | 2024-06-10 10:45 | 2024-09-25 11:09 |
Reporter | bYemma | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 7.1.0 | ||||
Summary | 0007669: Translations with args = 0 does not replace placeholder | ||||
Description | In the checkout is the VAT info: {{ translate({ ident: "VAT_PLUS_PERCENT_AMOUNT", args: key }) }} When the VAT rate is 0 (e.g. Switzerland), the placeholder is not replaced and the result is "plus %s%% tax, amount". | ||||
Steps To Reproduce | Get to checkout and create a account to country "Switzerland" (or change an existing one to this country with zero VAT). Now you can see in the right summary for VAT info that the string placeholder is not replaced. | ||||
Additional Information | The reason why it's not replaced is the check in the Twig Template Adapter whether $args is true. Class: OxidEsales\EshopCommunity\Internal\Transition\Adapter\TemplateLogic\TranslateFunctionLogic Line 100 in the method "assignArgumentsToTranslation". | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
This is the code line: https://github.com/OXID-eSales/oxideshop_ce/blob/93af16022c8cd6e6f4b132bc4bb70bd0f5733abf/source/Internal/Transition/Adapter/TemplateLogic/TranslateFunctionLogic.php#L98 |
|
Pull request with fix: https://github.com/OXID-eSales/oxideshop_ce/pull/984 |
|
|
|
This is already fixed in our codebase and will be released with the next minor release: https://github.com/OXID-eSales/oxideshop_ce/commit/d4d3224a7f90b324770ce3541497acc54362c4d9 in case of 7.1.x |