- Timestamp:
- Jan 14, 2016, 10:25:47 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ClientVersion/ClientVersion.php
r838 r843 44 44 { 45 45 $YesNo = array('Ne', 'Ano'); 46 $DbResult = $this->System->Database->query('SELECT * FROM ClientVersion WHERE Id='.($_GET['id']*1));46 $DbResult = $this->System->Database->query('SELECT * FROM `ClientVersion` WHERE `Id`='.($_GET['id']*1)); 47 47 if($DbResult->num_rows > 0) 48 48 { … … 61 61 $Output .= '<div><a href="?">'.T('All versions list').'</a></div>'; 62 62 if($Version['Imported']) 63 $Output .= '<div><a href="'.$this->System->Link('/progress/?Version='.$Version['Version']).'">'.T('Progress').'</a></div>'; 63 $Output .= '<div><a href="'.$this->System->Link('/progress/?Version='. 64 $Version['Version']).'">'.T('Progress').'</a></div>'; 64 65 } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 65 66 } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL); -
trunk/Modules/Dictionary/Dictionary.php
r841 r843 292 292 if(!is_numeric($_SESSION['language'])) $Output .= '<td>'.$Line['LangName'].'</td>'; 293 293 $Output .= '<td>'.$Line['Description'].'</td>'. 294 '<td><a href="'.$this->System->Link('/user .php?user='.$Line['UserId']).'">'.294 '<td><a href="'.$this->System->Link('/user/?user='.$Line['UserId']).'">'. 295 295 $Line['UserName'].'</a></td>'; 296 296 if($this->System->User->Licence(LICENCE_USER)) -
trunk/Modules/Download/Download.php
r838 r843 32 32 { 33 33 $fileslink = $this->System->Link('/files'); 34 $Output = '<h3>'.T('Accessories for client').'</h3>'.34 $Output = '<h3>'.T('Accessories for client').'</h3>'. 35 35 '<strong><a href="'.$fileslink.'/WowLua/wowpatcher.exe">wowpatcher</a></strong> - '.T('Tool to command line, which search and edit file wow.exe for support editing files Glue Strings.lua and GlobalStrings.lua.').' '. 36 36 T('Designed for one-time creation of new modified version of wow.exe. Help can be called with the - help option. The ability to modify future versions not guaranteed.').' '. … … 81 81 $Output = '<h3>'.T('Download czech').'</h3><br />'; 82 82 83 $Output .= T('Additional files: modified wow.exe, fonts to game, translated interface aowow and more can be found on page').' <a href="'.$this->System->Link('/download/?Files').'">'.T('Files').'</a><br />'; 83 $Output .= T('Additional files: modified wow.exe, fonts to game, translated interface aowow and more can be found on page'). 84 ' <a href="'.$this->System->Link('/download/?Files').'">'.T('Files').'</a><br />'; 84 85 $Output .= T('If none of these files is suitable for you, for example, to the Czech without the translated interface. You can generate your own section in section').' <a href="'.$this->System->Link('/export').'">'.T('Export').'</a><br /><br />'; 85 86 $Output .= T('The following files are generated every day, if needed. That means if is added new translation to database. Therefore, if you translate a translation or correct the mistake, tomorrow you can download the new patched version. Or you can rebuild and download for a few minutes the repaired file.').'<br />'; -
trunk/Modules/Export/Page.php
r841 r843 69 69 if($this->System->User->Id != null) $Action .= ' <a href="?Action=Clone&ExportId='.$Export['Id'].'" onclick="return confirmAction(\''.T('Realy clone item?').'\');">'.T('Clone').'</a>'; 70 70 $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'. 71 '<td><a href="'.$this->System->Link('/user .php?user='.$Export['User']).'">'.$Export['UserName'].'</a></td>'.71 '<td><a href="'.$this->System->Link('/user/?user='.$Export['User']).'">'.$Export['UserName'].'</a></td>'. 72 72 '<td>'.$Export['Title'].'</td>'. 73 73 '<td>'.$Export['OutputType'].'</td>'. … … 753 753 $UserLine = $DbResult->fetch_assoc(); 754 754 $Output .= 'Export <strong><a href="?Action=View&Tab=6&ExportId='.$Export['Id'].'">'.$_GET['ExportId'].'</a></strong> překladatele <strong>'.$UserLine['Name'].'</strong> s označením <strong>'.$Export['Title'].'</strong>'; 755 $Output .= ShowTabs(array(T('General'), T('Translators'), 'Překlady', T('Languages'), T('Format'), T('Version'), T('Statistic'), T('Output')));755 $Output .= ShowTabs(array(T('General'), T('Translators'), T('Translations'), T('Languages'), T('Format'), T('Version'), T('Statistic'), T('Output'))); 756 756 $Output .= '<div id="content">'; 757 757 if($_SESSION['Tab'] == TAB_GENERAL) $Output .= $this->ExportViewGeneral(); -
trunk/Modules/FrontPage/FrontPage.php
r838 r843 120 120 { 121 121 $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'. 122 '<td><a href=" user.php?user='.$DbRow['UserId'].'">'.$DbRow['UserName'].'</a></td>'.123 '<td><a href=" form.php?group='.$DbRow['Group'].'&ID='.$DbRow['ID'].'">'.$DbRow['ID'].'</a></td>'.124 '<td><a href=" form.php?group='.$DbRow['Group'].'&ID='.$DbRow['Take'].'">'.$DbRow['Take'].'</a></td>'.125 '<td><a href=" TranslationList.php?group='.$DbRow['Group'].'&action=filter">'.$DbRow['GroupName'].'</a></td></tr>';122 '<td><a href="'.$this->System->Link('/user/?user='.$DbRow['UserId']).'">'.$DbRow['UserName'].'</a></td>'. 123 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['ID']).'">'.$DbRow['ID'].'</a></td>'. 124 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['Take']).'">'.$DbRow['Take'].'</a></td>'. 125 '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&action=filter').'">'.$DbRow['GroupName'].'</a></td></tr>'; 126 126 } 127 127 $Output .= '</table>'; -
trunk/Modules/Log/Log.php
r842 r843 194 194 if($_SESSION['type'] == '') $Output .= '<td>'.$Line['LogName'].'</td>'; 195 195 $Output .= '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'. 196 '<td><a href="'.$this->System->Link('/user .php?user='.$Line['User']).'">'.$Line['UserName'].'</a></td>'.196 '<td><a href="'.$this->System->Link('/user/?user='.$Line['User']).'">'.$Line['UserName'].'</a></td>'. 197 197 '<td>'.$Line['IP'].'</td>'. 198 198 '<td>'.$Line['URL'].'</td></tr>'; -
trunk/Modules/Redirection/Redirection.php
r838 r843 37 37 if($this->System->PathItems[0] == 'phpbb3') $Output = $this->Redirect($this->System->Link('/forum/')); 38 38 if($this->System->PathItems[0] == 'statistic.php') $Output = $this->Redirect($this->System->Link('/progress/')); 39 if($this->System->PathItems[0] == 'register.php') $Output = $this->Redirect($this->System->Link('/registra ce.php'));39 if($this->System->PathItems[0] == 'register.php') $Output = $this->Redirect($this->System->Link('/registration/')); 40 40 if($this->System->PathItems[0] == 'dictionary.php') $Output = $this->Redirect($this->System->Link('/dictionary/')); 41 41 if($this->System->PathItems[0] == 'download-addon.php') $Output = $this->Redirect($this->System->Link('/download/')); … … 46 46 { 47 47 if(($this->System->PathItems[0] == 'team') and ($this->System->PathItems[1] == 'userlist.php')) 48 $Output = $this->Redirect($this->System->Link('/userlist .php'));48 $Output = $this->Redirect($this->System->Link('/userlist/')); 49 49 if(($this->System->PathItems[0] == 'dictionary') and ($this->System->PathItems[1] == 'user.php')) 50 $Output = $this->Redirect($this->System->Link('/user .php'));50 $Output = $this->Redirect($this->System->Link('/user/')); 51 51 if(($this->System->PathItems[0] == 'forum') and ($this->System->PathItems[1] == 'index.php')) 52 52 $Output = $this->Redirect($this->System->Link('/forum/')); -
trunk/Modules/Team/Team.php
r838 r843 77 77 '<td><a href="?action=team&id='.$Team['Id'].'">'.$Team['Name'].'</a></td>'. 78 78 '<td><a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a></td>'. 79 '<td><a href="'.$this->System->Link('/user .php?user='.$Team['Leader']).'">'.$Team['LeaderName'].'</a></td>'.80 '<td><a href="'.$this->System->Link('/user list.php?team='.$Team['Id']).'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a></td>'.79 '<td><a href="'.$this->System->Link('/user/?user='.$Team['Leader']).'">'.$Team['LeaderName'].'</a></td>'. 80 '<td><a href="'.$this->System->Link('/users/?team='.$Team['Id']).'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a></td>'. 81 81 '<td>'.HumanDate($Team['TimeCreate']).'</td>'; 82 82 if($this->System->User->Licence(LICENCE_USER)) … … 232 232 $Output .='<h3>Překladatelský tým '.$Team['Name'].'</h3><br />'. 233 233 'Webové stránky: <a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a><br/>'. 234 'Vedoucí: <a href="'.$this->System->Link('/user .php?user='.$Leader['Id']).'">'.$Leader['Name'].'</a><br/>';234 'Vedoucí: <a href="'.$this->System->Link('/user/?user='.$Leader['Id']).'">'.$Leader['Name'].'</a><br/>'; 235 235 if($Team['Description'] != '') 236 236 $Output .= 'Popis: '.$Team['Description'].'<br />'; -
trunk/Modules/Translation/Form.php
r836 r843 91 91 92 92 if(($Line['Language'] <> 0) and ($LineUser['Name'] <> '')) 93 $Output .= 'Přeložil: <a href="'.$this->System->Link('/user .php?user='.$Line['User']).'"><strong>'.$LineUser['Name'].'</strong></a> dne '.HumanDate($Line['ModifyTime']).'<br />';93 $Output .= 'Přeložil: <a href="'.$this->System->Link('/user/?user='.$Line['User']).'"><strong>'.$LineUser['Name'].'</strong></a> dne '.HumanDate($Line['ModifyTime']).'<br />'; 94 94 if(($Line['Take'] <> 0) and ($Line['Take'] <> $Line['ID'])) 95 95 { -
trunk/Modules/Translation/LoadNames.php
r816 r843 15 15 } else { 16 16 $Text = str_replace(' '.$orig,' <span Title="Přelož jako: '.$tran_replace. 17 '" class="edit"><a class="edit" target="_NEW2" href="'.$this->System->Link('/ dictionary/?search='.$tran).'">'.$orig_replace.'</a></span>',$Text);17 '" class="edit"><a class="edit" target="_NEW2" href="'.$this->System->Link('/'.T('dictionary', 'URL').'/?search='.$tran).'">'.$orig_replace.'</a></span>',$Text); 18 18 } 19 19 // } -
trunk/Modules/Translation/Translation.php
r842 r843 30 30 $this->System->RegisterPage('save.php', 'PageTranslationSave'); 31 31 $this->System->RegisterPage('progress', 'PageProgress'); 32 $this->System->RegisterPage('translation-groups', 'PageTranslationGroups'); 32 33 $this->System->RegisterPage('TranslationList.php', 'PageTranslationList'); 33 34 $this->System->RegisterPage('LoadNames.php', 'PageLoadNames'); … … 44 45 'Title' => T('Data source'), 45 46 'Hint' => 'Informace o překladových skupinách', 46 'Link' => $this->System->Link('/ TranslationList.php?action=grouplist'),47 'Link' => $this->System->Link('/translation-groups/'), 47 48 'Permission' => LICENCE_ANONYMOUS, 48 49 'Icon' => '', -
trunk/Modules/Translation/TranslationList.php
r842 r843 24 24 $Output = '<form action="?" method="post">'. 25 25 '<table class="BaseTable"><tr>'. 26 '<th> Zpracování</th>'.27 '<th> Skupina</th>'.28 '<th> Verze</th>'.29 '<th> Jazyk</th>'.30 '<th> Překladatel</th>'.31 '<th> Slova</th>'.32 '<th> Položka</th>'.26 '<th>'.T('Processing').'</th>'. 27 '<th>'.T('Group').'</th>'. 28 '<th>'.T('Version').'</th>'. 29 '<th>'.T('Language').'</th>'. 30 '<th>'.T('Translator').'</th>'. 31 '<th>'.T('Words').'</th>'. 32 '<th>'.T('Item').'</th>'. 33 33 '<th></th></tr><tr>'; 34 34 … … 37 37 $Output .= '<td><select name="state">'; 38 38 $StateTypes = array( 39 CompletionState::All => 'Všechny',40 CompletionState::NotTranslated => 'Nepřeložené',41 CompletionState::Translated => 'Přeložené',42 CompletionState::NotFinished => 'Rozpracované',43 CompletionState::Original => 'Anglické',44 CompletionState::NotFinishedNotTranslated => 'Rozpracované-Nepřeložené',45 CompletionState::Missing1 => 'Chybějící $ ($N,$s..)',46 CompletionState::Missing2 => 'Chybějící $-Neopravený'39 CompletionState::All => T('All'), 40 CompletionState::NotTranslated => T('Not translated'), 41 CompletionState::Translated => T('Translated'), 42 CompletionState::NotFinished => T('Unfinished'), 43 CompletionState::Original => T('Original'), 44 CompletionState::NotFinishedNotTranslated => T('Unfinished - Not translated'), 45 CompletionState::Missing1 => T('Missing $ ($N,$s..)'), 46 CompletionState::Missing2 => T('Missing $ - Not fixed'), 47 47 ); 48 foreach ($StateTypes as $index =>$StateType) {48 foreach ($StateTypes as $index => $StateType) { 49 49 if($Filter['State'] == $index) $Selected = ' selected="selected"'; 50 50 else $Selected = ''; … … 71 71 if($Filter['Group'] == 0) $Selected = ' selected="selected"'; 72 72 else $Selected = ''; 73 $Output .= '<option value="0"'.$Selected.'> Všechny</option>';73 $Output .= '<option value="0"'.$Selected.'>'.T('All').'</option>'; 74 74 $DbResult = $this->Database->query('SELECT `Id`,`Name` FROM `Group` ORDER BY `Name`'); 75 75 while($Group = $DbResult->fetch_assoc()) … … 97 97 if($Filter['Version'] == 0) $Selected = ' selected="selected"'; 98 98 else $Selected = ''; 99 $Output .= '<option value="0"'.$Selected.'> Všechny</option>';99 $Output .= '<option value="0"'.$Selected.'>'.T('All').'</option>'; 100 100 $DbResult = $this->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE `Imported` = 1 ORDER BY `BuildNumber` DESC'); 101 101 while($Version = $DbResult->fetch_assoc()) … … 136 136 if($Filter['User'] == 0) $Selected = ' selected="selected"'; 137 137 else $Selected = ''; 138 $Output .= '<option value="0"'.$Selected.'> Všichni</option>';138 $Output .= '<option value="0"'.$Selected.'>'.T('All').'</option>'; 139 139 $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `User` ORDER BY `Name`'); 140 140 while($User = $DbResult->fetch_assoc()) … … 238 238 */ 239 239 240 $Output .= '<td><input type="submit" value=" Filtrovat"/></td>';240 $Output .= '<td><input type="submit" value="'.T('Filter').'"/></td>'; 241 241 $Output .= '</tr></table>'; 242 242 $Output .= '</form><br/>'; … … 270 270 $Output .= $PageList['Output']; 271 271 $TableColumns = array( 272 array('Name' => 'ID', 'Title' => 'Číslo'),273 array('Name' => 'Entry', 'Title' => 'Položka'),274 array('Name' => $TranslationTree[$Filter['Group']]['Items'][0]['Column'], 'Title' => 'Název'),275 array('Name' => 'VersionStart', 'Title' => 'Verze od'),276 array('Name' => 'VersionEnd', 'Title' => 'Verze do'),277 array('Name' => 'LanguageName', 'Title' => 'Jazyk'),278 array('Name' => 'UserName', 'Title' => 'Překladatel'),279 array('Name' => 'ModifyTime', 'Title' => 'Datum'),272 array('Name' => 'ID', 'Title' => T('Number')), 273 array('Name' => 'Entry', 'Title' => T('Item')), 274 array('Name' => $TranslationTree[$Filter['Group']]['Items'][0]['Column'], 'Title' => T('Name')), 275 array('Name' => 'VersionStart', 'Title' => T('From version')), 276 array('Name' => 'VersionEnd', 'Title' => T('To version')), 277 array('Name' => 'LanguageName', 'Title' => T('Language')), 278 array('Name' => 'UserName', 'Title' => T('Translator')), 279 array('Name' => 'ModifyTime', 'Title' => T('Date')), 280 280 ); 281 281 … … 295 295 GetVersionWOWId($Line['VersionEnd'])).'">'.GetVersionWOW($Line['VersionEnd']).'</a></td>'. 296 296 '<td>'.$Line['LanguageName'].'</td>'. 297 '<td><a href=" user.php?user='.$Line['UserId'].'">'.$Line['UserName'].'</a></td>'.297 '<td><a href="'.$this->System->Link('/user/?user='.$Line['UserId']).'">'.$Line['UserName'].'</a></td>'. 298 298 '<td>'.HumanDate($Line['ModifyTime']).'</td>'. 299 299 '</tr>'; … … 310 310 $Output = $Filter['Output']; 311 311 312 $Output .= '<table class="BaseTable"><tr><th> Skupina</th><th>Počet</th></tr>';312 $Output .= '<table class="BaseTable"><tr><th>'.T('Group').'</th><th>'.T('Count').'</th></tr>'; 313 313 $Total = 0; 314 314 foreach($TranslationTree as $Group) … … 322 322 $Total += $Line[0]; 323 323 } 324 $Output .= '<tr><td><strong> Celkem</strong></td><td><strong>'.$Total.'</strong></td></tr>'.324 $Output .= '<tr><td><strong>'.T('Total').'</strong></td><td><strong>'.$Total.'</strong></td></tr>'. 325 325 '</table>'; 326 326 return($Output); 327 }328 329 function ShowGroupTypeList()330 {331 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Group`');332 $DbRow = $DbResult->fetch_row();333 $PageList = GetPageList($DbRow[0]);334 $Output = '<h3>'.T('List of translation groups').'</h3>'.335 $PageList['Output'];336 337 $Output .= '<table class="BaseTable">';338 $TableColumns = array(339 array('Name' => 'Name', 'Title' => T('Name')),340 array('Name' => 'SourceType', 'Title' => T('Source type')),341 array('Name' => '', 'Title' => T('Sources')),342 array('Name' => 'LastImport', 'Title' => T('Date of last import')),343 array('Name' => 'LastVersion', 'Title' => T('Version of last import')),344 );345 if($this->System->User->Licence(LICENCE_ADMIN))346 $TableColumns[] = array('Name' => '', 'Title' => T('Actions'));347 348 $Order = GetOrderTableHeader($TableColumns, 'Name', 0);349 $Output .= $Order['Output'];350 351 $DbResult = $this->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']);352 while($Group = $DbResult->fetch_assoc())353 {354 $Output .= '<tr><td><a href="?group='.$Group['Id'].'&action=filter">'.$Group['Name'].'</a></td>'.355 '<td>'.$Group['SourceType'].'</td><td>';356 if($Group['MangosTable'] != '') $Output .= $Group['MangosTable'].'.sql ';357 if($Group['DBCFileName'] != '') $Output .= $Group['DBCFileName'].'.dbc ';358 if($Group['LuaFileName'] != '') $Output .= $Group['LuaFileName'].'.lua ';359 $Output .= '</td>';360 if($this->System->User->Licence(LICENCE_ADMIN))361 $Output .= '<td><a title="Změny po posledním importu u vybrané překladové skupiny" href="'.$this->System->Link('/log/?group='.362 $Group['Id'].'&type=11').'">'.HumanDate($Group['LastImport']).'</a></td>';363 else $Output .= '<td>'.HumanDate($Group['LastImport']).'</td>';364 $Output .= '<td><a href="'.$this->System->Link('/client-version/?action=item&id='.365 GetVersionWOWId($Group['LastVersion'])).'">'.GetVersionWOW($Group['LastVersion']).'</a></td>';366 if($this->System->User->Licence(LICENCE_ADMIN))367 $Output .= '<td><a href="?action=groupdelete&id='.$Group['Id'].'">'.T('Remove').'</a></td>';368 $Output .= '</tr>';369 370 }371 $Output .= '</table>'.372 '<br /><a title="'.T('Changelog of changes after import').'" href="'.$this->System->Link('/log/?type=11').'">'.T('Changelog of text modification during import').'</a><br/>';373 if($this->System->User->Licence(LICENCE_ADMIN)) $Output .= '<a href="?action=groupadd">'.T('Add translation group').'</a>';374 return($Output);375 327 } 376 328 … … 417 369 $Output .= '</table>'; 418 370 } 371 return($Output); 372 } 373 374 function Show() 375 { 376 $this->Title = T('Translation groups'); 377 $Action = GetParameter('action', ''); 378 if($Action == 'filter') $Output = $this->ShowMenu(); 379 else 380 { 381 $Filter = $this->ShowFilter(); 382 if($Filter['Group'] > 0) $Output = $this->ShowTranslationList($Filter); 383 else $Output = $this->ShowGroupList($Filter); 384 } 385 return($Output); 386 } 387 } 388 389 class PageTranslationGroups extends Page 390 { 391 function ShowList() 392 { 393 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Group`'); 394 $DbRow = $DbResult->fetch_row(); 395 $PageList = GetPageList($DbRow[0]); 396 $Output = '<h3>'.T('List of translation groups').'</h3>'. 397 $PageList['Output']; 398 399 $Output .= '<table class="BaseTable">'; 400 $TableColumns = array( 401 array('Name' => 'Name', 'Title' => T('Name')), 402 array('Name' => 'SourceType', 'Title' => T('Source type')), 403 array('Name' => '', 'Title' => T('Sources')), 404 array('Name' => 'LastImport', 'Title' => T('Date of last import')), 405 array('Name' => 'LastVersion', 'Title' => T('Version of last import')), 406 ); 407 if($this->System->User->Licence(LICENCE_ADMIN)) 408 $TableColumns[] = array('Name' => '', 'Title' => T('Actions')); 409 410 $Order = GetOrderTableHeader($TableColumns, 'Name', 0); 411 $Output .= $Order['Output']; 412 413 $DbResult = $this->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']); 414 while($Group = $DbResult->fetch_assoc()) 415 { 416 $Output .= '<tr><td><a href="?group='.$Group['Id'].'&action=filter">'.$Group['Name'].'</a></td>'. 417 '<td>'.$Group['SourceType'].'</td><td>'; 418 if($Group['MangosTable'] != '') $Output .= $Group['MangosTable'].'.sql '; 419 if($Group['DBCFileName'] != '') $Output .= $Group['DBCFileName'].'.dbc '; 420 if($Group['LuaFileName'] != '') $Output .= $Group['LuaFileName'].'.lua '; 421 $Output .= '</td>'; 422 if($this->System->User->Licence(LICENCE_ADMIN)) 423 $Output .= '<td><a title="Změny po posledním importu u vybrané překladové skupiny" href="'.$this->System->Link('/log/?group='. 424 $Group['Id'].'&type=11').'">'.HumanDate($Group['LastImport']).'</a></td>'; 425 else $Output .= '<td>'.HumanDate($Group['LastImport']).'</td>'; 426 $Output .= '<td><a href="'.$this->System->Link('/client-version/?action=item&id='. 427 GetVersionWOWId($Group['LastVersion'])).'">'.GetVersionWOW($Group['LastVersion']).'</a></td>'; 428 if($this->System->User->Licence(LICENCE_ADMIN)) 429 $Output .= '<td><a href="?action=groupdelete&id='.$Group['Id'].'">'.T('Remove').'</a></td>'; 430 $Output .= '</tr>'; 431 } 432 $Output .= '</table>'. 433 '<br /><a title="'.T('Changelog of changes after import').'" href="'.$this->System->Link('/log/?type=11').'">'.T('Changelog of text modification during import').'</a><br/>'; 434 if($this->System->User->Licence(LICENCE_ADMIN)) $Output .= '<a href="?action=groupadd">'.T('Add translation group').'</a>'; 419 435 return($Output); 420 436 } … … 478 494 $Output = ShowMessage('Překladová skupina vytvořena', MESSAGE_INFORMATION); 479 495 } else $Output = ShowMessage('Překladová skupina '.$TableName.' již existuje', MESSAGE_CRITICAL); 480 $Output .= $this->Show GroupTypeList();496 $Output .= $this->ShowList(); 481 497 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 482 498 return($Output); … … 497 513 } else $Output = ShowMessage('Překladová skupina nenalezena', MESSAGE_CRITICAL); 498 514 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 499 $Output .= $this->Show GroupTypeList();515 $Output .= $this->ShowList(); 500 516 return($Output); 501 517 } … … 506 522 $Action = GetParameter('action', ''); 507 523 if($Action == 'filter') $Output = $this->ShowMenu(); 508 else if($Action == 'grouplist') $Output = $this->ShowGroupTypeList();509 524 else if($Action == 'groupadd') $Output = $this->ShowGroupAdd(); 510 525 else if($Action == 'groupdelete') $Output = $this->ShowGroupDelete(); 511 526 else if($Action == 'groupaddfinish') $Output = $this->ShowGroupAddFinish(); 512 else 513 { 514 $Filter = $this->ShowFilter(); 515 if($Filter['Group'] > 0) $Output = $this->ShowTranslationList($Filter); 516 else $Output = $this->ShowGroupList($Filter); 517 } 527 else $Output = $this->ShowList(); 518 528 return($Output); 519 529 } -
trunk/Modules/User/Profile.php
r837 r843 159 159 T('Level:').' <strong>'.$XP['Level'].'</strong> '.T('experience:').' '.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'<br/>'; 160 160 if($UserLine['TeamName'] != '') 161 $Output .= T('Member of team:').' <a href=" team/?action=team&id='.$UserLine['Team'].'"><strong>'.$UserLine['TeamName'].'</strong></a><br />';161 $Output .= T('Member of team:').' <a href="'.$this->System->Link('/team/?action=team&id='.$UserLine['Team']).'"><strong>'.$UserLine['TeamName'].'</strong></a><br />'; 162 162 163 163 // User tags … … 222 222 'Prohlížeč: <strong>'.$UserLine['UserAgent'].'</strong><br />'. 223 223 'Email: <strong>'.$UserLine['Email'].'</strong><br />'; 224 $Output .= '<br/><form action=" user.php" method="post"><div>'.224 $Output .= '<br/><form action="'.$this->System->Link('/user/').'" method="post"><div>'. 225 225 'Napsat E-mail:'. 226 226 '<input type="text" name="email" value="'.$UserLine['Email'].'" /><br/>'. -
trunk/Modules/User/Registration.php
r837 r843 19 19 <fieldset><legend>'.T('New user registration').'</legend> 20 20 <table> 21 <tr><td colspan="2">'.T('Please read carefully <a href=" info.php">translation guidelines</a> and follow them. Translate with diacritics!').'<br/><br/></td></tr>21 <tr><td colspan="2">'.T('Please read carefully <a href="'.$this->System->Link('/info/').'">translation guidelines</a> and follow them. Translate with diacritics!').'<br/><br/></td></tr> 22 22 <tr> 23 23 <th class="Left">'.T('Are you human?').'</th>'; -
trunk/Modules/User/User.php
r838 r843 22 22 { 23 23 $this->System->User = new User($this->System); 24 $this->System->RegisterPage('user list.php', 'PageUserList');25 $this->System->RegisterPage(' Options.php', 'PageUserOptions');26 $this->System->RegisterPage('registra ce.php', 'PageUserRegistration');27 $this->System->RegisterPage('user .php', 'PageUserProfile');24 $this->System->RegisterPage('users', 'PageUserList'); 25 $this->System->RegisterPage('options', 'PageUserOptions'); 26 $this->System->RegisterPage('registration', 'PageUserRegistration'); 27 $this->System->RegisterPage('user', 'PageUserProfile'); 28 28 $this->System->RegisterPage('login', 'PageUserLogin'); 29 29 $this->System->RegisterMenuItem(array( 30 30 'Title' => T('Translators'), 31 31 'Hint' => 'Seznam registrovaných uživatelů', 32 'Link' => $this->System->Link('/user list.php'),32 'Link' => $this->System->Link('/users/'), 33 33 'Permission' => LICENCE_ANONYMOUS, 34 34 'Icon' => '', … … 36 36 if(array_key_exists('Search', $this->System->ModuleManager->Modules)) 37 37 $this->System->ModuleManager->Modules['Search']->RegisterSearch('user', 38 T('Translators'), array('Name'), '`User`', $this->System->Link('/user list.php?search='));38 T('Translators'), array('Name'), '`User`', $this->System->Link('/users/?search=')); 39 39 } 40 40 … … 43 43 $Output = T('Online translators').':<br />'; 44 44 $DbResult = $this->System->Database->query('SELECT * FROM ('. 45 'SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '.46 47 48 45 'SELECT `User`.`Name`, `User`.`ID` FROM `UserOnline` '. 46 'JOIN `User` ON `User`.`ID` = `UserOnline`.`User` '. 47 'WHERE (`ActivityTime` >= NOW() - 300) '. 48 'ORDER BY `ActivityTime` DESC ) AS `T` GROUP BY `Name`'); 49 49 while($DbUser = $DbResult->fetch_assoc()) 50 50 { 51 $Name = '<a href="'.$this->System->Link('/user .php?user='.$DbUser['ID']).'">'.$DbUser['Name'].'</a>';51 $Name = '<a href="'.$this->System->Link('/user/?user='.$DbUser['ID']).'">'.$DbUser['Name'].'</a>'; 52 52 $Output .= $Name.'<br />'; 53 53 } … … 124 124 // Prepare cookies for permanent login 125 125 $StayLoggedSalt = $this->GetPasswordSalt(); 126 $this->Database->update('UserOnline', ' SessionId="'.$SID.'"', array(126 $this->Database->update('UserOnline', '`SessionId`="'.$SID.'"', array( 127 127 'User' => $User['ID'], 'StayLogged' => $StayLogged, 'StayLoggedHash' => $StayLoggedSalt)); 128 128 if($StayLogged) 129 129 { 130 setcookie('LoginUserId', $User['ID'], time() +365*24*60*60);131 setcookie('LoginHash', sha1($User['ID'].$StayLoggedSalt), time() +365*24*60*60);130 setcookie('LoginUserId', $User['ID'], time() + 365 * 24 * 60 * 60); 131 setcookie('LoginHash', sha1($User['ID'].$StayLoggedSalt), time() + 365 * 24 * 60 * 60); 132 132 } else { 133 133 setcookie('LoginUserId', '', time() - 3600); … … 150 150 if($this->Role != LICENCE_ANONYMOUS) 151 151 { 152 $this->Database->update('UserOnline', ' SessionId="'.$SID.'"', array('User' => null));152 $this->Database->update('UserOnline', '`SessionId`="'.$SID.'"', array('User' => null)); 153 153 $this->Database->query('UPDATE `UserTrace` SET '. 154 154 '`LastLogout` = NOW() WHERE `User` = '.$this->Id); -
trunk/Modules/User/UserList.php
r826 r843 61 61 { 62 62 $XP = GetLevelMinMax($Line['XP']); 63 $Output .= '<tr><td><a href=" user.php?user='.$Line['ID'].'">'.$Line['Name'].'</a></td>'.64 '<td style="text-align: center;"><a href=" TranslationList.php?user='.$Line['ID'].'&group=0&state=2" title="Zobrazit Všechny jeho přeložené texty">'.$Line['TranslatedCount'].'</a></td>'.63 $Output .= '<tr><td><a href="'.$this->System->Link('/user/?user='.$Line['ID']).'">'.$Line['Name'].'</a></td>'. 64 '<td style="text-align: center;"><a href="'.$this->System->Link('/TranslationList.php?user='.$Line['ID'].'&group=0&state=2').'" title="Zobrazit Všechny jeho přeložené texty">'.$Line['TranslatedCount'].'</a></td>'. 65 65 '<td>'.$XP['Level'].'</td>'. 66 66 '<td>'.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'</td>'. -
trunk/Modules/Wiki/Wiki.php
r838 r843 164 164 $Output .= '<tr>'. 165 165 '<td>'.HumanDateTime($PageContent['Time']).'</td>'. 166 '<td><a href="'.$this->System->Link('/user .php?user='.$PageContent['User']).'">'.$PageContent['UserName'].'</a></td>'.166 '<td><a href="'.$this->System->Link('/user/?user='.$PageContent['User']).'">'.$PageContent['UserName'].'</a></td>'. 167 167 '<td><a href="?id='.$PageContent['Id'].'&ver='.$PageContent['Id'].'">Zobrazit</a></td>'; 168 168 $Output .= '</tr>'; -
trunk/admin/install.php
r840 r843 171 171 $System = new Core(); 172 172 $System->Init(); 173 $Locale = new LocaleManager($System);174 $Locale->Dir = dirname(__FILE__).'/../locale';175 $Locale->LoadLocale('en');176 173 $UpdateManager = new UpdateManager(); 177 174 $UpdateManager->Database = $System->Database; -
trunk/includes/Locale.php
r841 r843 18 18 } 19 19 20 function Translate($Text )21 { 22 if(array_key_exists($Text, $this->Data ) and ($this->Data[$Text] != ''))23 return($this->Data[$ Text]);20 function Translate($Text, $Group = '') 21 { 22 if(array_key_exists($Text, $this->Data[$Group]) and ($this->Data[$Group][$Text] != '')) 23 return($this->Data[$Group][$Text]); 24 24 else return($Text); 25 } 26 27 function TranslateReverse($Text, $Group = '') 28 { 29 $Key = array_search($Text, $this->Data[$Group]); 30 if(($Key === FALSE) or ($this->Data[$Group][$Key] == '')) return($Text); 31 else return($Key); 25 32 } 26 33 } … … 232 239 } 233 240 234 // Short named global function235 function T($Text )241 // Short named global translation function 242 function T($Text, $Group = '') 236 243 { 237 244 global $GlobalLocaleManager; 238 245 239 if(isset($GlobalLocaleManager)) return($GlobalLocaleManager->CurrentLocale->Texts->Translate($Text ));246 if(isset($GlobalLocaleManager)) return($GlobalLocaleManager->CurrentLocale->Texts->Translate($Text, $Group)); 240 247 else return($Text); 241 248 } -
trunk/includes/Version.php
r842 r843 6 6 // and system will need database update. 7 7 8 $Revision = 84 2; // Subversion revision8 $Revision = 843; // Subversion revision 9 9 $DatabaseRevision = 811; // Database structure revision 10 $ReleaseTime = '2016-01-1 2';10 $ReleaseTime = '2016-01-14'; -
trunk/includes/system.php
r842 r843 9 9 var $OnPageNotFound; 10 10 var $Pages; 11 /* @var LocaleManager */ 12 var $LocaleManager; 11 13 12 14 function __construct() … … 23 25 function Init() 24 26 { 25 global $GlobalLocaleManager; 27 global $GlobalLocaleManager, $Config; 28 29 $this->Config = $Config; 30 date_default_timezone_set($this->Config['Web']['Timezone']); 26 31 27 32 $this->Database->Connect($this->Config['Database']['Host'], … … 55 60 } 56 61 } 57 $this->LocaleManager->LoadLocale($this->LocaleManager->LangCode); 62 if(array_key_exists($this->LocaleManager->LangCode, $this->LocaleManager->Available)) 63 $this->LocaleManager->LoadLocale($this->LocaleManager->LangCode); 58 64 59 65 $this->Menu = array … … 93 99 function Run() 94 100 { 95 global $ScriptStartTime, $TranslationTree, $StopAfterUpdateManager, $Config,101 global $ScriptStartTime, $TranslationTree, $StopAfterUpdateManager, 96 102 $UpdateManager, $DatabaseRevision; 97 103 98 $this->Config = $Config;99 104 $ScriptStartTime = GetMicrotime(); 100 101 105 if(GetRemoteAddress() != '') session_start(); 102 106 103 107 if(!isset($this->Config)) die('Systém není nainstalován. Pokračujte v instalaci <a href="admin/install.php">zde</a>.'); 104 date_default_timezone_set($this->Config['Web']['Timezone']);105 108 106 109 $this->Init(); … … 181 184 } 182 185 186 function TranslateURL($URL, $Locale) 187 { 188 // Try translate URL directory parts from current locale to target locale 189 $Remaining = $URL; 190 $RemainingParts = explode('?', $Remaining); 191 $Directory = $RemainingParts[0]; 192 if(count($RemainingParts) > 1) 193 { 194 $Params = $RemainingParts[1]; 195 } else { 196 $Params = ''; 197 } 198 $TargetLocaleManager = new LocaleManager($this); 199 $TargetLocaleManager->Dir = $this->LocaleManager->Dir; 200 $TargetLocaleManager->Available = $this->LocaleManager->Available; 201 $TargetLocaleManager->LoadLocale($Locale); 202 203 $DirectoryParts = explode('/', $Directory); 204 foreach($DirectoryParts as $Index => $Item) 205 { 206 $NewText = $TargetLocaleManager->CurrentLocale->Texts->Translate($Item, 'URL'); 207 $DirectoryParts[$Index] = $NewText; 208 } 209 $Directory = implode('/', $DirectoryParts); 210 $Remaining = $Directory; 211 if($Params != '') $Remaining .= '?'.$Params; 212 213 return($Remaining); 214 } 215 216 function TranslateReverseURL($URL, $Locale) 217 { 218 // Try translate URL directory parts from current locale to target locale 219 $Remaining = $URL; 220 $RemainingParts = explode('?', $Remaining); 221 $Directory = $RemainingParts[0]; 222 if(count($RemainingParts) > 1) 223 { 224 $Params = $RemainingParts[1]; 225 } else { 226 $Params = ''; 227 } 228 $TargetLocaleManager = new LocaleManager($this); 229 $TargetLocaleManager->Dir = $this->LocaleManager->Dir; 230 $TargetLocaleManager->Available = $this->LocaleManager->Available; 231 $TargetLocaleManager->LoadLocale($Locale); 232 233 $DirectoryParts = explode('/', $Directory); 234 foreach($DirectoryParts as $Index => $Item) 235 { 236 $NewText = $TargetLocaleManager->CurrentLocale->Texts->TranslateReverse($Item, 'URL'); 237 $DirectoryParts[$Index] = $NewText; 238 } 239 $Directory = implode('/', $DirectoryParts); 240 $Remaining = $Directory; 241 if($Params != '') $Remaining .= '?'.$Params; 242 243 return($Remaining); 244 } 245 183 246 function LinkLocale($Target, $Locale = '') 184 247 { 185 248 if($Locale == '') $Locale = $this->LocaleManager->LangCode; 249 250 $Target = $this->TranslateURL($Target, $Locale); 251 186 252 if($Locale == $this->LocaleManager->DefaultLangCode) 187 253 return($this->Config['Web']['BaseURL'].$Target); … … 216 282 if(count($PathItems) == 0) $PathItems = array(''); 217 283 $PathItem = $PathItems[0]; 284 $PathItem = $this->LocaleManager->CurrentLocale->Texts->TranslateReverse($PathItem, 'URL'); 285 218 286 if(array_key_exists($PathItem, $Pages)) 219 287 { … … 286 354 if($Locale['Code'] == $this->System->LocaleManager->CurrentLocale->Texts->Code) $Selected = ' selected="selected"'; 287 355 else $Selected = ''; 356 $Remaining = $this->System->TranslateReverseURL($Remaining, $this->System->LocaleManager->LangCode); 357 288 358 $URL = $this->System->LinkLocale($Remaining, $Locale['Code']); 289 359 $Output .= '<option title="" value="'.$URL.'"'.$Selected.' onchange="this.form.submit()">'.$Locale['Title'].'</option>'; … … 306 376 //$Output .= ''<span class="MenuItem">Moje překlady: <a href="">Dokončené</a> <a href="">Rozpracované</a> <a href="">Exporty</a> Tým: <a href="">'.$Team['name'].'</a></span>'; 307 377 $Output .= $this->System->User->Name.' <a href="'.$this->System->Link('/?action=logout').'">'.T('Logout').'</a>'. 308 ' <a href="'.$this->System->Link('/user .php?user='.$this->System->User->Id).'">'.T('My page').'</a>'.309 ' <a href="'.$this->System->Link('/ Options.php').'">'.T('Options').'</a>'.378 ' <a href="'.$this->System->Link('/user/?user='.$this->System->User->Id).'">'.T('My page').'</a>'. 379 ' <a href="'.$this->System->Link('/options/').'">'.T('Options').'</a>'. 310 380 ' <a title="Vámi přeložené texty" href="'.$this->System->Link('/TranslationList.php?user='. 311 381 $this->System->User->Id.'&group=0&state=2&text=&entry=').'">'.T('Translated').'</a>'. … … 317 387 { 318 388 $Output .= '<a href="'.$this->System->Link('/login/').'">'.T('Login').'</a> '. 319 '<a href="'.$this->System->Link('/registrace.php').'">'.T('Registration').'</a>';389 '<a href="'.$this->System->Link('/registration/').'">'.T('Registration').'</a>'; 320 390 } 321 391 $Output .= $this->ShowLocaleSelector(); -
trunk/locale/cs.php
r838 r843 8 8 $this->Title = 'Česky'; 9 9 $this->Data = array( 10 '' => array( 10 11 'Access denied' => 'Nemáte oprávnění', 11 12 'Show welcome' => 'Odkrýt úvod', … … 160 161 'Online check port' => 'Zkontroloat port online', 161 162 'There are servers listed which are in fact offering translated game. '. 162 'There is resoluted if translation is offered either on client side, on server side or both. '. 163 'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.' => 164 'Zde jsou uvedeny servery, které opravdu nabízí přeloženou hru. Rozlišuje se, jestli překlad je nabízen na straně klienta, serveru nebo obou.'. 165 'Pojem "Český server" neznamená, že server je provozovaný čechy, ale že je možné hrát v češtině', 163 'There is resoluted if translation is offered either on client side, on server side or both. '. 164 'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.' => 165 'Zde jsou uvedeny servery, které opravdu nabízí přeloženou hru. Rozlišuje se, jestli '. 166 'překlad je nabízen na straně klienta, serveru nebo obou.'. 167 'Pojem "Český server" neznamená, že server je provozovaný čechy, ale že je možné hrát v češtině', 166 168 'Last translations' => 'Poslední překlady', 167 169 'View' => 'Zobrazit', … … 345 347 'Language:' => 'Jazyk:', 346 348 'Statistics of translation completion of language %s for version %s' => 'Statistika dokončení překladů jazyka %s pro verzi %s', 349 'Translations' => 'Překlady', 350 'Processing' => 'Zpracování', 351 'Words' => 'Slova', 352 'Not translated' => 'Nepřeložené', 353 'Unfinished - Not translated' => 'Rozpracované-Nepřeložené', 354 'Missing $ ($N,$s..)' => 'Chybějící $ ($N,$s..)', 355 'Missing $ - Not fixed' => 'Chybějící $ - Neopravený', 356 'Number' => 'Číslo', 357 'From version' => 'Verze od', 358 'To version' => 'Verze do', 359 'Count' => 'Počet', 360 ), 361 'URL' => array( 362 'download' => 'stahovani', 363 'team' => 'tym', 364 'client-version' => 'verze-klienta', 365 'login' => 'prihlaseni', 366 'registration' => 'registrace', 367 'options' => 'volby', 368 'profile' => 'profil', 369 'user' => 'uzivatel', 370 'users' => 'uzivatele', 371 'dictionary' => 'slovnik', 372 'progress' => 'prubeh', 373 'admin' => 'sprava', 374 'files' => 'soubory', 375 'server' => 'server', 376 'export' => 'export', 377 'team' => 'tym', 378 'translation-groups' => 'prekladove-skupiny', 379 'news' => 'novinky', 380 'shoutbox' => 'kecatko', 381 ), 347 382 ); 348 383 } -
trunk/locale/en.php
r816 r843 8 8 $this->Title = 'English'; 9 9 $this->Data = array( 10 '' => array( 10 11 'Access denied' => '', 11 12 'Home' => '', … … 166 167 'Edit' => '', 167 168 'List' => '', 169 ), 170 'URL' => array( 171 ) 168 172 ); 169 173 }
Note:
See TracChangeset
for help on using the changeset viewer.