Don't apply string placeholders if unneccessary

Avoids "too many arguments for format string" when `$DEBUG`
is true and the string isn't expecting a placeholder.

Couldn't find a neat way to write a spec for this.

Fixes #1090
Merge pull request #1116 from justinfrench/1090-too-many-arguments-debug-mode

Don't apply string placeholders to legends if unneccessary