You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're treating <script> and <style> elements in a special way right now to not translate their contents. Should we also do this for:
<code>: translating code is probably not going to go well
<kbd>: semantic meaning is a bit like that of code.
<pre>: bit more debatable but right now we're not handling white space around tags very consistently so there is a good chance we'll mess up the intended preformatted text. But this might end up skipping large parts of specific types of sites, like mailing list archives.
<textarea>: we probably do not want to mess with its contents
This could be handled inside the extension, but other uses of bergamot-translator might also benefit from having it here. Also, if you'd implement it in the extension you'd need to add a new mechanism for the whole element substitution thing.
The text was updated successfully, but these errors were encountered:
- Prefer spreading markup over a full word.
- Ignore certain tags that are unlikely to be supposed to be translated,
such as `<code>` and `<samp>`.
- Never treat `<wbr>` as a space.
- Allow for inconsistent cases in tag names.
- Fix bug where void elements were inserted multiple times.
- Better handling of whitespace around punctuation.
- Ignore parsing `<noscript>` to be compatible with Firefox.
- Improvements to documentation and readability of `HTML` and `Scanner`
classes.
Fixes: #313, #339
We're treating
<script>
and<style>
elements in a special way right now to not translate their contents. Should we also do this for:<code>
: translating code is probably not going to go well<kbd>
: semantic meaning is a bit like that of code.<pre>
: bit more debatable but right now we're not handling white space around tags very consistently so there is a good chance we'll mess up the intended preformatted text. But this might end up skipping large parts of specific types of sites, like mailing list archives.<textarea>
: we probably do not want to mess with its contentsThis could be handled inside the extension, but other uses of bergamot-translator might also benefit from having it here. Also, if you'd implement it in the extension you'd need to add a new mechanism for the whole element substitution thing.
The text was updated successfully, but these errors were encountered: