Changeset 628
- Timestamp:
- Dec 6, 2013, 7:07:56 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Form.php
r615 r628 6 6 $tran_replace = str_replace(' ',' ',$tran); 7 7 $orig_replace = str_replace(' ',' ',$orig); 8 $Text = str_replace(' '.$orig,' <span Title="Přelož jako: '.$tran_replace.'" class="edit"><a class="edit" target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Group.'&ID='.$ID).'">'.$orig_replace.'</a></span>',$Text); 8 9 if (strlen($orig) < strlen($Text)-1) 10 $Text = str_replace(' '.$orig,' <span Title="Přelož jako: '.$tran_replace.'" class="edit"><a class="edit" target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Group.'&ID='.$ID).'">'.$orig_replace.'</a></span>',$Text); 9 11 return ($Text); 10 12 } 11 13 function ReplaceNotTranslated($orig,$tran,$Text,$ID,$Group) { 12 14 $orig_replace = str_replace(' ',' ',$orig); 13 $Text = str_replace($orig,' <span title="Kliknutím přeložíš" class="needtran"><a class="needtran" target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Group.'&ID='.$ID).'">'.$orig_replace.'</a></span>',$Text); 15 16 // echo $orig.'-'.$Text.'<br>'; 17 if (strlen($orig) < strlen($Text)-1) 18 $Text = str_replace($orig,' <span title="Kliknutím přeložíš" class="needtran"><a class="needtran" target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Group.'&ID='.$ID).'">'.$orig_replace.'</a></span>',$Text); 14 19 return ($Text); 15 20 } … … 194 199 $Text = $Text.' '.$LineAJ[$TextItem['Column']]; 195 200 196 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) {201 // if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) { 197 202 //<span class="edit">barvou.</span> 198 203 $names = GetTranslatNames($Text, 0, GetTranslatNamesArray()); 199 } else {200 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text'));201 }204 // } else { 205 // $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text')); 206 // } 202 207 203 208 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) -
trunk/includes/Version.php
r627 r628 6 6 // and system will need database update. 7 7 8 $Revision = 62 7; // Subversion revision8 $Revision = 628; // Subversion revision 9 9 $DatabaseRevision = 610; // Database structure revision 10 10 $ReleaseTime = '2013-12-04'; -
trunk/includes/global.php
r621 r628 538 538 foreach($TablesColumn as $Table => $Column) 539 539 { 540 $sql = 'SELECT `ID`, `'.$Column.'` AS Orig, (SELECT `'.$Column.'` FROM `'.$Table.'` AS `T` WHERE '.540 $sql = 'SELECT `ID`, (SELECT CONCAT( \''.GetIDbyName($Table).'\' )) AS `GoupId`,`'.$Column.'` AS Orig, (SELECT `'.$Column.'` FROM `'.$Table.'` AS `T` WHERE '. 541 541 '(`O`.`Entry` = `T`.`Entry`) AND (`Language` <> '.$Config['OriginalLanguage'].') LIMIT 1) AS `Tran` FROM `'.$Table.'` AS `O` WHERE '; 542 542 $groupby = ' GROUP BY `'.$Column.'` '; 543 // ORDER BY LENGTH('.$Column.') DESC543 $orderby = ' ORDER BY LENGTH(Orig) DESC '; 544 544 545 545 $where = '(`Language` = '.$Config['OriginalLanguage'].') '; … … 563 563 $where .= ')'; 564 564 } 565 if ($SqlOK) { 566 $DbResult = $System->Database->query($sql.$where.$groupby.' ORDER BY LENGTH(Orig) DESC'); 565 if ($SqlOK) { 566 //$sql.$where.$groupby.$orderby 567 // $buff[] = array($Line['ID'], GetIDbyName($Table), $Line['Orig'], $Line['Tran']); 568 if ($sqlall <> '') { $sqlall .= ' UNION ALL ( '.$sql.$where.$groupby.' )';} 569 else {$sqlall .= ' ( '.$sql.$where.$groupby.' )'; } 570 } 571 572 } 573 $DbResult = $System->Database->query($sqlall.$orderby); 567 574 // echo ($sql.'|'.$where.'|'.$groupby); 568 575 while($Line = $DbResult->fetch_assoc()) 569 576 { 570 $buff[] = array($Line['ID'], GetIDbyName($Table), $Line['Orig'], $Line['Tran']);577 $buff[] = array($Line['ID'], $Line['GoupId'], $Line['Orig'], $Line['Tran']); 571 578 } 572 } 573 574 // if ($sqlall <> '') { $sqlall .= ' UNION ALL ( '.$sql.$where.$groupby.' )';} 575 // else {$sqlall .= ' ( '.$sql.$where.$groupby.' )'; } 576 } 579 577 580 return $buff; 578 581 }
Note:
See TracChangeset
for help on using the changeset viewer.