Move missing placeholder text generation into its own function