Traduzir-paginas-web icon indicating copy to clipboard operation
Traduzir-paginas-web copied to clipboard

[FR] Ignoring code blocks from translation

Open boromyr opened this issue 3 years ago • 4 comments

As per title, I propose a new feature to prevent translation to some sensitive areas of web pages. When a web page is translated with TPW or a built-in translator like in Chrome and Edge, it is translated in full, including sections containing code like in GitHub or any site containing scripts or instructions that need to be copied exactly. This can lead to constant switching between translations or to copy errors. Preventing translation in these areas will make TPW much more efficient and enjoyable.

Examples

Before:

Hi print("Hello Word")

After:

Ciao / Bonjour / Hallo / ecc. stampante "Ciao Mondo"

Improved:

Ciao / Bonjour / Hallo / ecc. print("Hello Word")

boromyr avatar Jan 02 '22 22:01 boromyr

If this is happening on any site, it is the fault of the site itself that does not use the html tags properly. The extension does not translate <code> tags. If any site uses the <code> tag and the extension is still translating, then please send me the site link as an example.

FilipePS avatar Jan 02 '22 23:01 FilipePS

In reality, it happens on many sites, but in particular I refer to GitHub and analogues, as in GreasyFork.org Practical example, a code I was reading right now: https://github.com/PaulStoffregen/XPT2046_Touchscreen/blob/master/XPT2046_Touchscreen.cpp

boromyr avatar Jan 02 '22 23:01 boromyr

I have the same problem on this page : https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Persistence.md

And this page for example : https://www.ired.team/offensive-security/privilege-escalation/windows-namedpipes-privilege-escalation

ghost avatar Jan 17 '22 15:01 ghost

I tried them, same problem for me too.

boromyr avatar Jan 17 '22 15:01 boromyr