babel icon indicating copy to clipboard operation
babel copied to clipboard

BabelTranslation multiple ids for Resource

Open arjen-t opened this issue 1 year ago • 1 comments

In the past, I can remember that when filling in a resourceId comma-separated, you would receive all those resources back once translated. However, this does not seem to work anymore.

It appears that the casting of the default property, resourceId::int, is causing this issue. It casts the given resourceId, whether comma-separated or not, first to an integer. While examining the logic of the BabelTranslation snippet class, it seems that the logic supports comma-separated values for resource ids, but it always receives an integer and not a string.

arjen-t avatar Apr 09 '24 09:04 arjen-t

The int casting happens here: https://github.com/mikrobi/babel/blob/master/core/components/babel/src/Snippets/BabelTranslation.php#L26C1-L27C1

Please remove the ::int there. It will be fixed with the next version.

Jako avatar Apr 09 '24 10:04 Jako