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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/156841907>