Changeset 393 for trunk/form.php
- Timestamp:
- Mar 17, 2010, 1:21:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/form.php
r376 r393 2 2 3 3 include('includes/global.php'); 4 5 function ColorNames($Text,$names) { 6 7 // $buff[] = array($Line['ID'],GetIDbyName($Table),$Line[$Column],$Line['Tran']); 8 foreach($names as $Line) { 9 if ($Line[3] <> '') { 10 $Text = str_replace($Line[2],'<span Title="Byl nalezen překlad: '.$Line[3].'" class="edit">'.$Line[2].'</span>',$Text); 11 $Text = str_replace(strtolower($Line[2]),'<span Title="Byl nalezen překlad: '.$Line[3].'" class="edit">'.$Line[2].'</span>',$Text); 12 } else { 13 $Text = str_replace($Line[2],'<span Title="Jméno bylo nalezeno v názvech a můžete ho přeložit. Začnete kliknutím na: Vyhledat v názvech" class="edit">'.$Line[2].'</span>',$Text); 14 $Text = str_replace(strtolower($Line[2]),'<span Title="Jméno bylo nalezeno v názvech a můžete ho přeložit. Začnete kliknutím na: Vyhledat v názvech" class="edit">'.$Line[2].'</span>',$Text); 15 } 16 } 17 return $Text; 18 } 4 19 5 20 ShowPage(); … … 110 125 WriteLanguages($Language); 111 126 echo('</td></tr>'); 127 128 //zvýrazňování jmen 129 $Text = ''; 130 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 131 if($TextItem['Visible'] == 1) 132 $Text = $Text.' '.$LineAJ[$TextItem['Column']]; 133 134 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) { 135 //<span class="edit">barvou.</span> 136 $names = GetTranslatNames($Text,0,array('Dictionary' => 'Text','TextCreature' => 'name')); 137 } else { 138 $names = GetTranslatNames($Text,0,array('Dictionary' => 'Text')); 139 } 140 //print_r($names); 141 112 142 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 113 143 if($TextItem['Visible'] == 1) … … 117 147 if ($TextItem['Name'] == 'Text' AND (($Table == 'global_strings') OR ($Table == 'glue_strings'))) echo('<tr><th>'.$LineAJ['ShortCut'].'</th>'); 118 148 else echo('<tr><th>'.$TextItem['Name'].'</th>'); 119 echo('<td>'.str_replace("\n", '<br/>', htmlspecialchars($LineAJ[$TextItem['Column']])).'</td>149 echo('<td>'.str_replace("\n", '<br/>', ColorNames(htmlspecialchars($LineAJ[$TextItem['Column']]),$names)).'</td> 120 150 <td><textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">'.htmlspecialchars($Line[$TextItem['Column']]).'</textarea></td></tr>'); 121 151 }
Note:
See TracChangeset
for help on using the changeset viewer.