Changeset 880 for trunk/Modules/Translation/Comparison.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Comparison.php
r859 r880 12 12 $ArrStr2 = explode(' ', $String2); 13 13 14 for ($i = 0; $i < count($ArrStr1); $i++)14 for ($i = 0; $i < count($ArrStr1); $i++) 15 15 { 16 if (isset($ArrStr2[$i]))16 if (isset($ArrStr2[$i])) 17 17 { 18 if ($ArrStr1[$i] == $ArrStr2[$i])18 if ($ArrStr1[$i] == $ArrStr2[$i]) 19 19 { 20 20 $Result .= $ArrStr1[$i].' '; … … 22 22 { 23 23 $find = false; 24 for ($j = 0; $j < count($ArrStr2); $j++)24 for ($j = 0; $j < count($ArrStr2); $j++) 25 25 { 26 if (($ArrStr1[$i] == $ArrStr2[$j]) and ($find == false))26 if (($ArrStr1[$i] == $ArrStr2[$j]) and ($find == false)) 27 27 { 28 28 $Result .= $ArrStr1[$i].' '; … … 30 30 } 31 31 } 32 if ($find == false)32 if ($find == false) 33 33 $Result .= '<span class="edit">'.$ArrStr1[$i].' </span>'; 34 34 } 35 35 } else $Result .= '<span class="edit">'.$ArrStr1[$i].' </span>'; 36 36 } 37 return ($Result);37 return $Result; 38 38 } 39 39 … … 44 44 $Output = ''; 45 45 46 if ($this->System->User->Licence(LICENCE_USER))46 if ($this->System->User->Licence(LICENCE_USER)) 47 47 { 48 48 $Output = 'Text je porovnáván vždy ku předešlému (vlevo). Změny jsou zvýrazněny <span class="edit">barvou.</span><br /><br />'; … … 51 51 $Table = $TranslationTree[$GroupId]['TablePrefix']; 52 52 53 if (array_key_exists('entry', $_GET))53 if (array_key_exists('entry', $_GET)) 54 54 { 55 55 $Textentry = $_GET['entry']; 56 if ((array_key_exists('ID1', $_GET)) and ($_GET['ID1'] <> -1)) //porovnání pouze 2 textů56 if ((array_key_exists('ID1', $_GET)) and ($_GET['ID1'] <> -1)) //porovnání pouze 2 textů 57 57 { 58 58 $TextID1 = $_GET['ID1']; … … 66 66 ' LEFT JOIN `Language` ON `Language`.`Id` = `'.$Table.'`.`Language` '. 67 67 'WHERE `Entry` = '.$Textentry.' '.$WhereID.' ORDER BY `Language`'); 68 while ($Line[] = $DataID->fetch_assoc());68 while ($Line[] = $DataID->fetch_assoc()); 69 69 array_pop($Line); 70 70 … … 74 74 '<table class="BaseTable">'. 75 75 '<tr><th>Přeložil</th>'; 76 foreach ($Line as $Index => $LineItem)76 foreach ($Line as $Index => $LineItem) 77 77 $Output .= '<th>'.$LineItem['UserName'].'</th>'; 78 78 $Output .= '</tr>'. 79 79 '<tr>'. 80 80 '<th>ID textu</th>'; 81 foreach ($Line as $Index => $LineItem)81 foreach ($Line as $Index => $LineItem) 82 82 $Output .= '<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['ID'].'">'.$LineItem['ID'].'</a></td>'; 83 83 $Output .= '</tr>'. 84 84 '<tr><th>Převzato</th>'; 85 foreach ($Line as $Index => $LineItem)85 foreach ($Line as $Index => $LineItem) 86 86 $Output .= '<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['Take'].'">'.$LineItem['Take'].'</a></td>'; 87 87 $Output .= '</tr>'. 88 88 '<tr><th>'.T('Language').'</th>'; 89 foreach ($Line as $Index => $LineItem)89 foreach ($Line as $Index => $LineItem) 90 90 $Output .= '<td>'.T($LineItem['LanguageName']).'</td>'; 91 91 $Output .= '</tr>'. 92 92 '<tr><th>'.T('Version').'</th>'; 93 foreach ($Line as $Index => $LineItem)93 foreach ($Line as $Index => $LineItem) 94 94 $Output .= '<td>'.GetVersionWOW($LineItem['VersionStart']).' - '.GetVersionWOW($LineItem['VersionEnd']).'</td>'; 95 95 $Output .= '</tr>'; 96 foreach ($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)96 foreach ($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 97 97 { 98 98 $writethis = false; 99 for ($i = 0; $i < count($Line); $i++)99 for ($i = 0; $i < count($Line); $i++) 100 100 { 101 if ($Line[$i][$TextItem['Column']] <> '') $writethis = true;101 if ($Line[$i][$TextItem['Column']] <> '') $writethis = true; 102 102 } 103 if ($writethis)103 if ($writethis) 104 104 { 105 105 $Output .= '<tr><th>'.$TextItem['Name'].'</th>'; 106 for ($i = 0; $i < count($Line); $i++)106 for ($i = 0; $i < count($Line); $i++) 107 107 { 108 if ($i > 0)108 if ($i > 0) 109 109 { 110 110 $Output .= '<td>'; … … 120 120 } else $Output .= ShowMessage('Porovnávat můžou pouze překladatelé!', MESSAGE_CRITICAL); 121 121 122 return ($Output);122 return $Output; 123 123 } 124 124 }
Note:
See TracChangeset
for help on using the changeset viewer.