HuggingFacePipeline._generate rejects valid translation tasks due to substring check
The `_generate` method uses `self.pipeline.task in "translation"` instead of an equality or prefix check, causing valid transformers translation tasks like `translation_en_to_fr` to raise ValueError. It also incorrectly matches empty string.
