Jump to content

Bug in PassVsprintfValidator


Recommended Posts



after playing around with the reason some of my translations weren't being saved, I found a behaviour that I think is wrong.


In the PassVsprintfValidator class, the countArgumentsOfTranslation method uses PrestaShopTranslatorTrait::$regexSprintfParams. The problem with that regex is that it matches something like this as invalid "%price% s PDV-om." which is the Croatian translation for "%price% tax incl. ".

The part that gets matched is "% s" which isn't an argument, although "%s" is (as seen is the following message "You must specify as many arguments (%d, %s ...) as the original string.").


Thanks for reading,


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...