sebastian-lenz / craft-linkfield

Link field for Craft 3
MIT License
122 stars 65 forks source link

"No Link" does not get translated #246

Open dgsiegel opened 1 year ago

dgsiegel commented 1 year ago

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