Changeset 859
- Timestamp:
- Jan 21, 2016, 10:20:04 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r858 r859 7 7 8 8 $Version = '1.0-alfa'; 9 $Revision = 85 8; // Subversion revision9 $Revision = 859; // Subversion revision 10 10 $DatabaseRevision = 857; // Database structure revision 11 $ReleaseTime = '2016-01-2 0';11 $ReleaseTime = '2016-01-21'; -
trunk/Modules/Admin/Admin.php
r857 r859 11 11 $this->License = 'GNU/GPL'; 12 12 $this->Description = 'Administrator section of the web'; 13 $this->Dependencies = array( );13 $this->Dependencies = array('Translation'); 14 14 } 15 15 … … 114 114 function RepairVersionEnd() 115 115 { 116 global $TranslationTree;116 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 117 117 118 118 $Output = ''; … … 150 150 function MergeSameText() 151 151 { 152 global $TranslationTree;152 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 153 153 154 154 $Output = ''; … … 204 204 function DbcStructure() 205 205 { 206 global $TranslationTree;206 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 207 207 208 208 $Output = ''; -
trunk/Modules/Dictionary/Dictionary.php
r851 r859 11 11 $this->License = 'GNU/GPL'; 12 12 $this->Description = 'Custom dictionary for better translation coordination'; 13 $this->Dependencies = array( );13 $this->Dependencies = array('Translation'); 14 14 } 15 15 … … 62 62 ); 63 63 64 $buff = GetTranslatNames($Text, $mode,GetTranslatNamesArray());64 $buff = GetTranslatNames($Text, $mode, GetTranslatNamesArray()); 65 65 66 66 // $buff[] = array($Line['ID'],GetIDbyName($Table),$Line[$Column],$Line['Tran']); … … 73 73 $Output .= '<tr><td>'.$Line[2].'</td>'; 74 74 if ($Line[3] <> '') $Output .= '<td><a target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Line[1].'&ID='.$Line[0]).'">'.$Line[3].'</a></td></tr>'; 75 else $Output .= '<td><a target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Line[1].'&ID='.$Line[0]).'"> Překládat</a></td></tr>';75 else $Output .= '<td><a target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Line[1].'&ID='.$Line[0]).'">'.T('Translate').'</a></td></tr>'; 76 76 } 77 77 } else … … 79 79 $Output .= '<tr><td>'.$Line[2].'</td>'; 80 80 if ($Line[3] <> '') $Output .= '<td><a target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Line[1].'&ID='.$Line[0]).'">'.$Line[3].'</a></td></tr>'; 81 else $Output .= '<td><a target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Line[1].'&ID='.$Line[0]).'"> Překládat</a></td></tr>';81 else $Output .= '<td><a target="_NEW2" href="'.$this->System->Link('/form.php?group='.$Line[1].'&ID='.$Line[0]).'">'.T('Translate').'</a></td></tr>'; 82 82 } 83 83 } … … 185 185 function DictionaryGroup() 186 186 { 187 global $TranslationTree;187 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 188 188 189 189 $Output = ''; -
trunk/Modules/Export/CreateAddon.php
r816 r859 103 103 function MakeLanguageFiles() 104 104 { 105 global $TranslationTree, $CreatedFileList; 105 global $CreatedFileList; 106 107 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 106 108 107 109 $Output = ''; … … 217 219 function MakeClientStrings() 218 220 { 219 global $TranslationTree;221 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 220 222 221 223 $this->LoadFilters(); -
trunk/Modules/Export/Export.php
r838 r859 73 73 function BuildQuery($Group, $Version = '') 74 74 { 75 global $TranslationTree;75 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 76 76 $this->SaveAllUsers(); 77 77 … … 153 153 function ExportToMangosSQL() 154 154 { 155 global $TranslationTree;155 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 156 156 157 157 $this->LoadFilters(); … … 221 221 function ExportToAoWoWSQL() 222 222 { 223 global $TranslationTree, $AoWoWconf; 223 global $AoWoWconf; 224 225 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 224 226 225 227 //require_once('../aowow/configs/config.php'); … … 314 316 function ExportToDBC() 315 317 { 316 global $TranslationTree;318 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 317 319 318 320 $this->LoadFilters(); … … 425 427 function ExportToLua() 426 428 { 427 global $TranslationTree;429 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 428 430 429 431 $this->LoadFilters(); … … 642 644 function ExportToXML() 643 645 { 644 global $TranslationTree;646 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 645 647 646 648 $this->LoadFilters(); … … 707 709 $this->License = 'GNU/GPL'; 708 710 $this->Description = 'Allow parametric export of translated texts to various supported output formats'; 709 $this->Dependencies = array( );711 $this->Dependencies = array('Translation'); 710 712 } 711 713 -
trunk/Modules/Export/Page.php
r851 r859 157 157 function ExportViewTranslators() 158 158 { 159 global $TranslationTree;159 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 160 160 161 161 $Output = ''; … … 319 319 function ExportViewLanguages() 320 320 { 321 global $TranslationTree;321 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 322 322 323 323 $Output = ''; … … 410 410 function ExportViewGroups() 411 411 { 412 global $TranslationTree;412 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 413 413 414 414 $Output = ''; -
trunk/Modules/Import/Import.php
r838 r859 15 15 $this->License = 'GNU/GPL'; 16 16 $this->Description = 'Support for import of data.'; 17 $this->Dependencies = array( );17 $this->Dependencies = array('Translation'); 18 18 } 19 19 … … 183 183 function ImportLUA() 184 184 { 185 global $TranslationTree, $PatchVersion; 185 global $PatchVersion; 186 187 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 186 188 $Output = 'Načítání textů z LUA souboru...'; 187 189 … … 237 239 function UpdateTranslated() 238 240 { 239 global $TranslationTree, $PatchVersion, $Config; 240 241 global $PatchVersion, $Config; 242 243 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 241 244 $Output = '<br /><br />Začínám se synchronizací VersionEnd u přeložených textů<br />'; 242 245 foreach($TranslationTree as $Group) … … 341 344 function ImportDBC() 342 345 { 343 global $System, $TranslationTree, $Config; 344 346 global $System, $Config; 347 348 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 345 349 $Output = 'Načítání textů z DBC souboru...'; 346 350 if(($this->Group['DBCFileName'] != '') and ($this->Group['TablePrefix'] != '')) … … 392 396 function ImportGroup($GroupId) 393 397 { 394 global $TranslationTree;398 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 395 399 396 400 $this->Group = $TranslationTree[$GroupId]; … … 406 410 function ImportSQL() 407 411 { 408 global $TranslationTree, $PatchVersion; 409 410 $Output= ''; 412 global $PatchVersion; 413 414 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 415 $Output = ''; 411 416 $File = new FileStream(); 412 417 $File->OpenFile(dirname(__FILE__).'/../../source/'.$this->Version['Version'].'/sql/'.$this->Group['MangosTable'].'.sql'); -
trunk/Modules/Import/Manage.php
r848 r859 43 43 function ShowMenu() 44 44 { 45 global $TranslationTree, $System; 46 45 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 47 46 $Output = '<strong>Import zdrojů:</strong><br/>'. 48 47 '<a href="?action=instructions">Instrukce pro přípravu zdrojových souborů</a><br/>'. 49 48 '<a href="?action=update_translated">Zaktualizovat verze přeložených</a><br/><br/>'. 50 'Verze klienta použitá pro import: <strong>'.$ System->Config['Web']['GameVersion'].'</strong><br/>';51 $DbResult = $ System->Database->query('SELECT COUNT(*) FROM `Group`');49 'Verze klienta použitá pro import: <strong>'.$this->System->Config['Web']['GameVersion'].'</strong><br/>'; 50 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Group`'); 52 51 $DbRow = $DbResult->fetch_row(); 53 52 $PageList = GetPageList($DbRow[0]); … … 68 67 $Output .= $Order['Output']; 69 68 70 $DbResult = $ System->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']);69 $DbResult = $this->System->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']); 71 70 while($Group = $DbResult->fetch_assoc()) 72 71 { -
trunk/Modules/Import/cmd.php
r848 r859 9 9 $System->Run(); 10 10 $Import = new Import($System); 11 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 11 12 12 13 $Output = ''; -
trunk/Modules/Log/Log.php
r857 r859 13 13 $this->License = 'GNU/GPL'; 14 14 $this->Description = 'Log various application events'; 15 $this->Dependencies = array('Error', 'News' );15 $this->Dependencies = array('Error', 'News', 'Translation'); 16 16 17 17 $this->Excludes = array(); … … 121 121 function ShowList() 122 122 { 123 global $TranslationTree;123 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 124 124 125 125 $this->Title = T('System log'); -
trunk/Modules/Translation/Comparison.php
r847 r859 40 40 function Show() 41 41 { 42 global $TranslationTree;42 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 43 43 44 44 $Output = ''; -
trunk/Modules/Translation/Form.php
r848 r859 19 19 function ShowForm() 20 20 { 21 global $TranslationTree;21 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 22 22 23 23 $Output = ''; … … 261 261 function Delete() 262 262 { 263 global $TranslationTree;263 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 264 264 265 265 if($this->System->User->Licence(LICENCE_MODERATOR)) -
trunk/Modules/Translation/LoadNames.php
r843 r859 58 58 function LoadNames() 59 59 { 60 global $TranslationTree;60 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 61 61 62 62 $Output = ''; … … 79 79 } else { 80 80 if(($GroupId == 13)) { 81 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 'TextGlobalString' => 'Text', 'TextArea' => 'Name', 'TextItemSubClass' => 'Name', 'TextCharacterRace' => 'Name1',),false); 81 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 82 'TextGlobalString' => 'Text', 'TextArea' => 'Name', 83 'TextItemSubClass' => 'Name', 'TextCharacterRace' => 'Name1',), false); 82 84 } else { 83 85 $names = GetTranslatNames($Text, 0, GetTranslatNamesArray()); -
trunk/Modules/Translation/Save.php
r848 r859 176 176 function Show() 177 177 { 178 global $ TranslationTree, $Message, $MessageType;178 global $Message, $MessageType; 179 179 180 180 $Output = ''; 181 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 181 182 182 183 unset($Message); -
trunk/Modules/Translation/Translation.php
r854 r859 24 24 function DoStart() 25 25 { 26 global $TranslationTree;26 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 27 27 28 28 $this->System->RegisterPage('comparison.php', 'PageTranslationComparison'); … … 135 135 return($Output); 136 136 } 137 138 function GetTranslationTree() 139 { 140 if(isset($this->TranslationTree)) return($this->TranslationTree); 141 else { 142 $Result = array(); 143 $Groups = array(); 144 $DbResult = $this->System->Database->query('SELECT *, UNIX_TIMESTAMP(`LastImport`) AS `LastImportTime` FROM `Group`'); 145 while($DbRow = $DbResult->fetch_assoc()) 146 $Groups[T($DbRow['Name'])] = $DbRow; 147 ksort($Groups); 148 foreach($Groups as $Group) 149 { 150 $Group['Items'] = array(); 151 $Group['Game'] = T($Group['Name']); 152 $Result[$Group['Id']] = $Group; 153 } 154 $DbResult = $this->System->Database->query('SELECT * FROM `GroupItem` ORDER BY `Group`, `Sequence`'); 155 while($DbRow = $DbResult->fetch_assoc()) 156 { 157 $Result[$DbRow['Group']]['Items'][] = $DbRow; 158 } 159 $this->TranslationTree = $Result; 160 return($Result); 161 } 162 } 137 163 } -
trunk/Modules/Translation/TranslationList.php
r855 r859 18 18 function ShowFilter($GroupId = 0) 19 19 { 20 global $TranslationTree;20 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 21 21 22 22 $Filter = array('SQL' => ''); … … 251 251 function ShowTranslationList($Filter) 252 252 { 253 global $TranslationTree;253 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 254 254 255 255 $Output = $Filter['Output']; … … 310 310 function ShowGroupList($Filter) 311 311 { 312 global $TranslationTree;312 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 313 313 314 314 $Output = $Filter['Output']; … … 333 333 function ShowMenu() 334 334 { 335 global $TranslationTree;335 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 336 336 337 337 $GroupId = GetParameter('group', 0, true); -
trunk/Modules/Translation/UserLevel.php
r833 r859 21 21 function GetXPFromTranslation($UserId) 22 22 { 23 global $System, $TranslationTree, $xp_from_word, $from_diakrit, $Config; 23 global $System, $xp_from_word, $from_diakrit, $Config; 24 25 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 24 26 25 27 $xp = 0; … … 72 74 function UserLevelUpdate($UserId) 73 75 { 74 global $System, $ TranslationTree, $Config;76 global $System, $Config; 75 77 78 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 76 79 // Main code for users 77 80 $DbResult = $System->Database->query('SELECT `ID`, `Name` FROM `User` WHERE `Id` = '.$UserId); -
trunk/includes/Global.php
r858 r859 336 336 } 337 337 338 function GetTranslationTree()339 {340 global $System;341 342 $Result = array();343 $Groups = array();344 $DbResult = $System->Database->query('SELECT *, UNIX_TIMESTAMP(`LastImport`) AS `LastImportTime` FROM `Group`');345 while($DbRow = $DbResult->fetch_assoc())346 $Groups[T($DbRow['Name'])] = $DbRow;347 ksort($Groups);348 foreach($Groups as $Group)349 {350 $Group['Items'] = array();351 $Group['Game'] = T($Group['Name']);352 $Result[$Group['Id']] = $Group;353 }354 $DbResult = $System->Database->query('SELECT * FROM `GroupItem` ORDER BY `Group`, `Sequence`');355 while($DbRow = $DbResult->fetch_assoc())356 {357 $Result[$DbRow['Group']]['Items'][] = $DbRow;358 }359 return($Result);360 }361 362 338 $Moderators = array('Překladatel', 'Moderátor', 'Administrátor'); 363 339 … … 459 435 function LoadGroupIdParameter() 460 436 { 461 global $TranslationTree; 437 global $System; 438 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 462 439 463 440 if(array_key_exists('group', $_GET)) $GroupId = $_GET['group'] * 1; … … 556 533 function GetIDbyName($Table) 557 534 { 558 global $TranslationTree; 535 global $System; 536 537 $TranslationTree = $System->ModuleManager->Modules['Translation']->GetTranslationTree(); 559 538 560 539 foreach($TranslationTree as $TableID => $Value) -
trunk/includes/System.php
r858 r859 91 91 function Run() 92 92 { 93 global $ScriptStartTime, $ TranslationTree, $StopAfterUpdateManager,93 global $ScriptStartTime, $StopAfterUpdateManager, 94 94 $UpdateManager; 95 95 … … 116 116 $this->ModuleManager->Start(); 117 117 } 118 119 // TODO: Global initialized variable should be removed120 $TranslationTree = GetTranslationTree();121 118 122 119 // Initialize application modules … … 450 447 function ShowTranslatedMenu() 451 448 { 452 global $TranslationTree;449 $TranslationTree = $this->System->ModuleManager->Modules['Translation']->GetTranslationTree(); 453 450 454 451 $Output = '<strong>'.T('Translate groups').':</strong><br /><div id="TranslationMenu">'; … … 522 519 $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2); 523 520 524 $Output = '</td>'. 525 '<td class="menu2">'; 526 $Output .= $this->ShowTranslatedMenu(); 527 $Output .= '</td>'. 528 '</tr><tr>'. 521 $Output = '</td>'; 522 if($this->System->ModuleManager->ModulePresent('Translation')) 523 { 524 $Output .= '<td class="menu2">'; 525 $Output .= $this->ShowTranslatedMenu(); 526 $Output .= '</td>'; 527 } 528 $Output .= '</tr><tr>'. 529 529 '<td colspan="4" class="page-bottom">'.T('Version').': '.$Version.' '.T('Revision').': '.$Revision.' ('.HumanDate($ReleaseTime).')'. 530 530 ' <a href="http://svn.zdechov.net/trac/wowpreklad/browser/trunk">'.T('Source code').'</a> '. -
trunk/locale/cs.php
r857 r859 514 514 'Users' => 'Uživatelé', 515 515 'Moderator' => 'Moderátor', 516 'Translate' => 'Překládat', 516 517 ), 517 518 'URL' => array(
Note:
See TracChangeset
for help on using the changeset viewer.