in src/co_op_translator/utils/llm/text_utils.py [0:0]
def gen_image_translation_prompt(text_data, language):
"""
Generate a translation prompt for the given text data.
Args:
text_data (list): List of text lines to be translated.
language (str): Target language for translation.
Returns:
str: Generated translation prompt.
"""
prompt = f"""
You are a translator that receives a batch of lines in an image. Given the following yaml file, please translate each line into {language}.
For each line, fill it in with the translation, respecting the context of the text.
Return only the yaml file, fully filled in.
"""
for line in text_data:
prompt += f"- {line}\n"
return prompt