can you adapt the code in order to print to screen ( not on the translated file) which phrases it is translating?

import re
from typing import List, Tuple
from openai import AsyncOpenAI
import os
from dataclasses import dataclass
from typing import Optional

@dataclass
class SubtitleEntry:
    id: str
    timestamp: str
    text: str
    original_text: str

class WebVTTTranslator:
    def __init__(self, api_key: str):
        self.client = AsyncOpenAI(api_key=api_key)  # Changed to AsyncOpenAI
        
    def parse_webvtt(self, content: str) -> List[SubtitleEntry]:
        """Parse WebVTT content into structured format."""
        entries = []
        lines = content.strip().split('\n')
        
        if lines[0] != 'WEBVTT':
            raise ValueError("File must start with WEBVTT")
        
        current_entry = None
        text_buffer = []
        
        for line in lines[1:]:
            line = line.strip()
            
            if not line:
                if current_entry and text_buffer:
                    current_entry.text = '\n'.join(text_buffer)
                    current_entry.original_text = current_entry.text
                    entries.append(current_entry)
                    current_entry = None
                    text_buffer = []
                continue
                
            if re.match(r'^[0-9a-f-]+(-\d+)?$', line):  # ID line
                if current_entry and text_buffer:
                    current_entry.text = '\n'.join(text_buffer)
                    current_entry.original_text = current_entry.text
                    entries.append(current_entry)
                    text_buffer = []
                current_entry = SubtitleEntry(id=line, timestamp='', text='', original_text='')
                
            elif '-->' in line:  # Timestamp line
                if current_entry:
                    current_entry.timestamp = line
                    
            elif current_entry:  # Text line
                text_buffer.append(line)
        
        # Handle last entry
        if current_entry and text_buffer:
            current_entry.text = '\n'.join(text_buffer)
            current_entry.original_text = current_entry.text
            entries.append(current_entry)
            
        return entries

    async def translate_batch(self, text_batch: str, target_language: str = "Italian") -> str:
        """Translate a batch of text using OpenAI API."""
        try:
            response = await self.client.chat.completions.create(
                model="gpt-4o",
                messages=[
                    {"role": "system", "content": f"You are a professional translator. Translate the following text to {target_language}. Maintain the same tone and style. Preserve any special formatting or line breaks."},
                    {"role": "user", "content": text_batch}
                ]
            )
            return response.choices[0].message.content.strip()
        except Exception as e:
            print(f"Translation error: {e}")
            return ""

    async def translate_entries(self, entries: List[SubtitleEntry], batch_size: int = 5) -> List[SubtitleEntry]:
        """Translate entries in batches for efficiency."""
        for i in range(0, len(entries), batch_size):
            batch = entries[i:i + batch_size]
            # Combine texts with special separator
            batch_text = "\n---\n".join(entry.text for entry in batch)
            
            translated_batch = await self.translate_batch(batch_text)
            
            # Split translations and assign back to entries
            translations = translated_batch.split("\n---\n")
            for entry, translation in zip(batch, translations):
                entry.text = translation.strip()
                
        return entries

    def reconstruct_webvtt(self, entries: List[SubtitleEntry]) -> str:
        """Reconstruct WebVTT file from translated entries."""
        output = ["WEBVTT"]
        
        for entry in entries:
            output.extend(["", entry.id, entry.timestamp, entry.text])
            
        return "\n".join(output)

async def translate_webvtt_file(input_path: str, output_path: str, api_key: str):
    """Main function to translate a WebVTT file."""
    translator = WebVTTTranslator(api_key)
    
    # Read input file
    with open(input_path, 'r', encoding='utf-8') as f:
        content = f.read()
    
    # Parse WebVTT
    entries = translator.parse_webvtt(content)
    
    # Translate entries
    translated_entries = await translator.translate_entries(entries)
    
    # Reconstruct and save
    output_content = translator.reconstruct_webvtt(translated_entries)
    
    with open(output_path, 'w', encoding='utf-8') as f:
        f.write(output_content)