Improved custom widget translation