craft-linkfield icon indicating copy to clipboard operation
craft-linkfield copied to clipboard

"No Link" does not get translated

Open dgsiegel opened this issue 3 years ago • 0 comments

The string '(No link)' gets defined here: https://github.com/sebastian-lenz/craft-linkfield/blob/main/src/models/LinkType.php#L113

I was hoping that it will get translated in the linkfield twig template for the select field. But looking at the twig code, I can't find any translation in there. However, as you already added a few translated strings, replacing that line with

return Craft::t('typedlinkfield', '(No link)');

might be the easiest solution.

Interestingly you do translate all other display groups: https://github.com/sebastian-lenz/craft-linkfield/blob/main/src/models/LinkType.php#L103

dgsiegel avatar Dec 07 '22 20:12 dgsiegel