Open iquito opened 7 years ago
By the way, the following does work:
'label' =>
/**
* @Desc("Amount")
*/
$this->translator->trans('email.payment_amount', [], 'domain') . ':',
So @Desc just seems to break in some situations, but not in others (it is not obvious to me why/when it works). The problem is: you never know if it works or not until you extract the translations, so the uncertainty is quite a pain.
I also saw that there is a pull request to improve the Desc annotation: https://github.com/schmittjoh/JMSTranslationBundle/pull/233 - maybe this would also solve this issue?
Extracting translations & using @Desc does not seem to always work - I found out that the following does not make use of the @Desc ('email.payment_amount' is saved as <source> instead of "Amount"):
While the following does work:
The
. ':'
at the end of the line seems to cause some problem in extracting the @Desc value. Maybe other characters or additions to a line cause the same, which makes the translation extraction easy to break.