FIX: Make score's reason link building more explicit (PR #14475)

We relied on backticks to identify and replace site setting names with links. Unfortunately, some translations don’t follow this convention, breaking this feature.

Additionally, this lets us linkify category settings and watched words without using HTML in the translations.

You may notice that I split the texts we want to linkify into two groups. I did this on purpose to emphasize those that should be translated (regular_links) from those who don’t (site_settings_link). If you can think of a better solution, I’m open to suggestions.

GitHub

Sorry, I missed that PR. Is there a particular reason why those site setting names need to be in the locale file? We don’t want them to be translated, do we? I think they should be moved into code.

My motivation to do it this way is that it was easy for plugins like Akismet to extend it, but you’re right, I’ll change it in a new PR.

1 Like