Sometimes, We just need format string.

Format the string only when `variables` is not empty