Be a little smarter about building the badge text string.