Changeset 84
- Timestamp:
- 03/20/2009 10:38:37 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/parser.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/parser.php
r80 r84 424 424 translate_text($start); 425 425 $pos = $start = $end_of_number; 426 } 426 } 427 427 else 428 428 { … … 585 585 /* 586 586 * Determines if the current position marks the begining of a number, e.g. 123 050-391212232 587 * 588 * Return 0 if not a number otherwise return the position past this number. 587 * 588 * Return 0 if not a number otherwise return the position past this number. 589 589 */ 590 590 function is_number($position) … … 592 592 global $page; 593 593 $start = $position; 594 595 while(is_digit($position) || $page[$position] == '-' || $page[$position] == '+') 594 595 while(is_digit($position) || $page[$position] == '-' || $page[$position] == '+' || 596 (($page[$position] == ',' || $page[$position] == '.' || $page[$position] == '\\' || $page[$position] == '/') && is_digit($position+1))) 596 597 { 597 598 $position++; 598 599 } 599 600 600 601 if($position != $start && (is_white_space($position) || $page[$position] == '<')) 601 602 { 602 return $position; 603 } 604 603 return $position; 604 } 605 605 606 return 0; 606 607 } … … 783 784 // We will mark translated text with tr_t class and untranslated with tr_u 784 785 $span = "<span class=\"$span_prefix"; 785 786 786 787 //Use base64 encoding to make that when the page is translated (i.e. update_translation) we 787 //get back exactlly the same string without having the client decode/encode it in anyway. 788 //get back exactlly the same string without having the client decode/encode it in anyway. 788 789 $token = "token=\"" . base64_encode($original_text) . "\""; 789 790 790 791 if($translated_text == NULL) 791 792 { … … 821 822 } 822 823 } 823 824 824 825 logger("Exit " . __METHOD__ . " : $original_text" , 4); 825 826 }
Note: See TracChangeset
for help on using the changeset viewer.
