Changeset 604
- Timestamp:
- 01/26/2011 07:15:19 PM (16 months ago)
- Location:
- trunk/WordPress/plugin/transposh
- Files:
-
- 3 edited
-
core/parser.php (modified) (4 diffs)
-
transposh.php (modified) (4 diffs)
-
wp/transposh_db.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/core/parser.php
r602 r604 674 674 if ($this->split_url_func != null) { 675 675 foreach ($this->atags as $e) { 676 logger($e->href);677 676 foreach (call_user_func_array($this->split_url_func, array($e->href)) as $part) { 678 677 $originals[$part] = true; … … 680 679 } 681 680 foreach ($this->otags as $e) { 682 logger($e->value);683 681 foreach (call_user_func_array($this->split_url_func, array($e->value)) as $part) { 684 682 $originals[$part] = true; … … 691 689 // fix urls... 692 690 foreach ($this->atags as $e) { 693 logger($e->href);694 691 $e->href = call_user_func_array($this->url_rewrite_func, array($e->href)); 695 692 } 696 693 foreach ($this->otags as $e) { 697 logger($e->value);698 694 $e->value = call_user_func_array($this->url_rewrite_func, array($e->value)); 699 695 } … … 735 731 736 732 // this adds saved spans to the first not in select element which is in the body 737 if (!$ep->inselect && $savedspan && $ep->inbody) { 733 if (!$ep->inselect && $savedspan && $ep->inbody) { // (TODO: might not be...?) 738 734 $e->outertext = $savedspan . $e->outertext; 739 735 $savedspan = ''; -
trunk/WordPress/plugin/transposh/transposh.php
r603 r604 760 760 // Ignore urls not from this site 761 761 if (!transposh_utils::is_rewriteable_url($href, $this->home_url)) { 762 logger($href);763 762 return $ret; 764 763 } … … 789 788 } 790 789 } 791 logger($ret);792 790 return $ret; 793 791 } … … 958 956 if ($comment_lang) { 959 957 $text = "<span lang =\"$comment_lang\">" . $text . "</span>"; 958 if (strpos($text, '<a href="' . $this->home_url) !== FALSE) { 959 $text = str_replace('<a href="' . $this->home_url, '<a lang="' . $this->options->get_default_language() . '" href="' . $this->home_url, $text); 960 } 960 961 } 961 962 logger("$comment_lang " . get_comment_ID(), 4); … … 974 975 if ($lang) { 975 976 $text = "<span lang =\"$lang\">" . $text . "</span>"; 977 if (strpos($text, '<a href="' . $this->home_url) !== FALSE) { 978 $text = str_replace('<a href="' . $this->home_url, '<a lang="' . $this->options->get_default_language() . '" href="' . $this->home_url, $text); 979 } 976 980 } 977 981 return $text; -
trunk/WordPress/plugin/transposh/wp/transposh_db.php
r600 r604 197 197 if (isset($this->translations[$original])) { 198 198 $translated = $this->translations[$original]; 199 logger("prefetch result for $original >>> {$this->translations[$original][0]} ({$this->translations[$original][1]})", 3);199 logger("prefetch result for $original >>> {$this->translations[$original][0]} ({$this->translations[$original][1]})", 4); 200 200 } else { 201 201 // make sure $lang is reasonable, unless someone is messing with us, it will be ok
Note: See TracChangeset
for help on using the changeset viewer.
