1818
1919require_once 'inc/session_utility.php ' ;
2020require_once 'inc/googleTimeToken.php ' ;
21- require_once 'inc/classes/googleTranslateClass .php ' ;
21+ require_once 'inc/classes/GoogleTranslate .php ' ;
2222
2323use Lwt \Classes \GoogleTranslate as GoogleTranslate ;
2424
@@ -39,7 +39,8 @@ function translate_sentence($text, $translation)
3939 <span title="Translated via Google Translate">
4040 <?php echo tohtml ($ translation ); ?>
4141 </span>
42- <p>Original sentence: </p><blockquote><?php echo tohtml ($ text ); ?> </blockquote>
42+ <p>Original sentence: </p>
43+ <blockquote><?php echo tohtml ($ text ); ?> </blockquote>
4344 <?php
4445}
4546
@@ -61,8 +62,8 @@ function translate_term($text, $file, $sl, $tl)
6162 <img id="textToSpeech" style="cursor: pointer;" title="Click to read!"
6263 src="<?php print_file_path ('icn/speaker-volume.png ' ); ?> " ></img>
6364
64- <img id="del_translation" style="cursor: pointer;" title="Empty Translation Field"
65- onclick="deleteTranslation ();"
65+ <img id="del_translation" style="cursor: pointer;"
66+ title="Empty Translation Field" onclick="deleteTranslation ();"
6667 src="<?php print_file_path ('icn/broom.png ' ); ?> " ></img>
6768</h2>
6869
@@ -113,7 +114,9 @@ function translate_term($text, $file, $sl, $tl)
113114 */
114115function translate_text ($ text , $ sl , $ tl , $ sentence_mode )
115116{
116- $ file = GoogleTranslate::staticTranslate ($ text , $ sl , $ tl , getGoogleTimeToken ());
117+ $ file = GoogleTranslate::staticTranslate (
118+ $ text , $ sl , $ tl , getGoogleTimeToken ()
119+ );
117120
118121 if ($ file === false ) {
119122 my_die ("Unable to get translation from Google! " );
@@ -151,12 +154,12 @@ function do_content($text)
151154 if (trim ($ text ) != '' ) {
152155 translate_text ($ text , $ _GET ["sl " ], $ _GET ["tl " ], isset ($ _GET ['sent ' ]));
153156 } else {
154- echo " <p class= \ "msgblue \ ">Term is not set!</p> " ;
157+ echo ' <p class="msgblue">Term is not set!</p> ' ;
155158 }
156159 pageend ();
157160}
158161
159- if (isset ($ _GET [' text ' ])) {
162+ if (isset ($ _GET [" text " ])) {
160163 do_content ($ _GET ["text " ]);
161164}
162165?>
0 commit comments