because ViewComponent does not have the method hintIcon hintColour hintIconTooltip. You should check whether these methods are available in your target Component, if not it will not work there.
•Created by Roland Barkóczi on 5/14/2024 in #❓┊help
Translation hasMany relation: how to populate form and field by locale
In your case it would be very helpful if you had a demo repo. This way it is very difficult to understand what it should do and what it is currently doing