Changes in Translation Functions
1. Added Chinese Language to "Translate One Word Per Sentence"
2. Made Replacement Changes in "Translate One Word Per Sentence" Previously, the function was changing the first occurence of the word in the sentence. In a sentence like "Original in the world", if "in" is to be replaced, the "in" in "Original" will be replaced.
3. Changed deepHTMLReplacement with translateDeep :
Problems with deepHTMLReplacement :
-
It was too slow. Took around 40 seconds to render translations for large pages due to recursive calls. During this time, the page was unresponsive. New function takes a lot less time.
-
Non-Uniform Distribution of words. Before the change, all translations were concentrated towards the end of the page. This may give the user the impression that the extension is not working.
In the new function, each paragraph gets an equal distribution of words.