[TASK] Improve LocalizationUtility logic and feedback
This patch does two things to improve the translation flow in LocalizationUtility::translate: * Early return null on empty $key (would cause null anyway) * Feedback message on failure to sprintf In order to provide failure feedback for formatted strings, vsprintf had to be replaced with sprintf and array unrolling, since vsprintf does not return false on errors and sprintf does. The error is returned as translation result so even if an unexpected failure occurs, at least a partially meaningful text is shown. Change-Id: I568be30b701f0c374289ed44fc5b31b13f492483 Resolves: #82453 Releases: master Reviewed-on: https://review.typo3.org/54118 Reviewed-by:Benni Mack <benni@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Please register or sign in to comment