Bug 296244

Summary: Paragraphs with <code> elements fail to translate
Product: WebKit Reporter: aglow_sibling3n
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

aglow_sibling3n
Reported 2025-07-20 05:25:42 PDT
I noticed Safari's language translation feature fails to translate any paragraph that contains an inline <code> element. This would be really annoying for technical programming documentation, where inline <code> elements are frequently used. Unsure if this is WebKit or Safari related. Test page: ``` <!DOCTYPE html> <html lang="es"> <meta charset="utf-8"> <title>Prueba de traducción</title> <body> <p>Este es un párrafo en español que debería traducirse completamente al inglés. <code>console.log("Hola");</code> Esta es otra oración en español que también debería traducirse si el proceso continuara.</p> <p>Un párrafo final para confirmar si la traducción se reanuda o no.</p> </body> </html> ``` Expected output: - User switches translation in Safari to 'English' - All text (except the <code>) should be translated to English Actual output: - User switches translation in Safari to 'English' - First paragraph remains untranslated - Second paragraph successfully translates
Attachments
Radar WebKit Bug Importer
Comment 1 2025-07-27 05:26:17 PDT
Note You need to log in before you can comment on or make changes to this bug.