Translation files (XLIFF) must be possible per package
Currently the XliffTranslationProvider uses a hardcoded base path to look for XLIFF files of
But it is necessary to have translations in each package, as it does not make sense to have labels for the Blog package in the FLOW3 package.
Also the TranslateViewHelper needs to offer the use of labels from different packages - e.g. to use labels from the Blog by default but fetch labels for the login screen from a shared file in the FLOW3 package.
[FEATURE] Allow translation files (XLIFF) on a per package basis
Fixes issue in which XliffTranslationProvider prefaces a hardcoded
base path of resource://FLOW3/Private/Locale/Translations before
the sourceName argument passed to getTranslationByOriginalLabel and
This fix modifies the translateById and translateByOriginalLabel
methods in the TYPO3\FLOW3\I18n\Translator to use packageKey
as an argument. The XliffTranslationProvider will construct a
base path of "<packageName>/Private/Locale/Translations". This base
path is prepended to the value of the sourceName argument to create
the translation file resource string.
Unit tests have been adjusted as well to accommodate these changes
to the XliffTranslationProvider and Translator classes. The
TranslationProviderInterface has been adjusted as well.