Open hruben opened 11 years ago
@Abhoryo why do we use braces? I agree with @hruben we need to use "%" by default.
Braces were the ExposeTranslationBundle's default value.
In 0.3.x-dev, it's '%', see vendor/willdurand/expose-translation-bundle/Bazinga/ExposeTranslationBundle/Resources/public/js/translator.js line 335. And even if it was the default value, I would like to be able to change it. The intention is to use the same translations for PHP and JS generated messages, so '%' surely makes sense.
You can change the default for the moment.
JSFV uses the same error messages as the Symfony constraints. So it appears only natural to me to use the same placeholder marks. However, jsfv.getComputeMessage() always sets these marks to '{{ ' and ' }}'. It would save a lot of effort to have some easy way of changing this back to the ExposeTranslationBundle's default value of '%'. One option is to make the placeholder prefix and suffix a parameter in parameters.yml. Another option is to add a block around jsfv.getComputeMessage() so that it can be easily overridden.