quote:
Originally posted by Keikonium
Most people have semi good grammar, so this should be a nice little fix. When you type, you usually use spaces. Ex:
Bob says:
Hey John, I g2g, hospital time...
---> Hey John, I got to go, hospital time...
John says:
Okay, br buddy
---> Okay, best reguards buddy
So, a simple fix would be instead of:
sMessage = sMessage.replace(/br/gi,"best reguards");
make it
sMessage = sMessage.replace(/ br /gi," best reguards ");
. Notice the space. This wont catch "br" at the end of a sentance however. But if you put an extra space at the end, it'll catch it .
This is how I wrote my personal script anyway.
i modified the script on my machine to have a space of br in the syntax as you suggested so it dont bring up breakfast as best regardseakfast the only think you get then is that even if you put a space after the br when you do want to say best regards the capital letter script messes up the word so it prevents the translation so i have to not use capital letter script at present.