View Issue Details

IDProjectCategoryView StatusLast Update
0007669OXID eShop (all versions)8. --- Twig engine ---public2024-09-25 11:09
ReporterbYemma Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version7.1.0 
Summary0007669: Translations with args = 0 does not replace placeholder
DescriptionIn 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 ReproduceGet 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 InformationThe 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".
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

bYemma

2024-06-10 10:48

reporter   ~0016989

This is the code line: https://github.com/OXID-eSales/oxideshop_ce/blob/93af16022c8cd6e6f4b132bc4bb70bd0f5733abf/source/Internal/Transition/Adapter/TemplateLogic/TranslateFunctionLogic.php#L98

bYemma

2024-07-04 10:31

reporter   ~0017209

Pull request with fix: https://github.com/OXID-eSales/oxideshop_ce/pull/984

bYemma

2024-09-23 11:09

reporter   ~0017571

2024-09-23_11h08_13.png (63,003 bytes)   
2024-09-23_11h08_13.png (63,003 bytes)   

SvenBrunk

2024-09-25 11:07

administrator   ~0017587

Last edited: 2024-09-25 11:08

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