Changeset 846 for trunk/Modules


Ignore:
Timestamp:
Jan 15, 2016, 10:24:05 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Now translation groups are also localized.
  • Modified: Translated team page.
Location:
trunk/Modules
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Dictionary/Dictionary.php

    r843 r846  
    9292    {
    9393      $Output .= '<form action="?action=save" method="post">'.
    94         '<fieldset><legend>Vložení nového slova</legend>'.
     94        '<fieldset><legend>'.T('New word insertion').'</legend>'.
    9595        '<table><tr><td>'.
    96         'Původní anglické slovo:</td><td><input type="text" name="Original" /></td></tr>'.
     96        T('Original word').':</td><td><input type="text" name="Original" /></td></tr>'.
    9797        '<tr><td>'.T('Translated').':</td><td><input type="text" name="Translated" /></td></tr>'.
    9898        '<tr><td>'.T('Language').':</td><td>'.WriteLanguages($_SESSION['language']).'</td></tr>'.
     
    238238      if($Language['Enabled'] == 1)
    239239      {
    240         $Lang = ' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>';
     240        $Lang = ' <a href="?language='.$Language['Id'].'">'.T($Language['Name']).'</a>';
    241241        if($Language['Id'] == $_SESSION['language']) $Output .= '<strong>'.$Lang.'</strong> ';
    242242          else $Output .= $Lang;
     
    290290        '<td>'.$Line['Original'].'</td>'.
    291291        '<td><strong>'.$Line['Translated'].'</strong></td>';
    292       if(!is_numeric($_SESSION['language'])) $Output .= '<td>'.$Line['LangName'].'</td>';
     292      if(!is_numeric($_SESSION['language'])) $Output .= '<td>'.T($Line['LangName']).'</td>';
    293293      $Output .= '<td>'.$Line['Description'].'</td>'.
    294294        '<td><a href="'.$this->System->Link('/user/?user='.$Line['UserId']).'">'.
  • trunk/Modules/Export/Page.php

    r843 r846  
    380380    {
    381381      $Output .= '<input type="submit" value="'.T('Save').'" '.$DisabledInput[$Editable].'/>'.
    382           '<input type="hidden" name="Operation" value="Save"/>'.
    383           '<br />'.
    384           T('Select languades from list witch you want to export from. And edit theirs order.').'<br />'.
    385           T('Order is done by numeric value which is can be edit to desirable order. Lines with same number will be renumbered in ascending order.');
     382        '<input type="hidden" name="Operation" value="Save"/>'.
     383        '<br />'.
     384        T('Select languades from list witch you want to export from. And edit theirs order.').'<br />'.
     385        T('Order is done by numeric value which is can be edit to desirable order. Lines with same number will be renumbered in ascending order.');
    386386    }
    387387
     
    399399      $Sequence = '<input type="text" name="seq'.$Langugage['Id'].'" style="text-align: center; width: 40px;" value="'.$Langugage['Sequence2'].'"'.$DisabledInput[$Editable].'/>';
    400400      $Output .= '<tr>
    401       <td>'.$Langugage['Name'].'</td>
     401      <td>'.T($Langugage['Name']).'</td>
    402402      <td>'.$Selection.'</td><td>'.$Sequence.'</td></tr>';
    403403    }
     
    448448      foreach($TranslationTree as $Group)
    449449      {
    450       //  echo $Group['Id'].' ';
    451450        foreach($TranslationTree[$Group['Id']]['Items'] as $Column) {
    452451          if(array_key_exists('item'.$Column['Id'], $_POST)) $Selected = true;
     
    486485    $Order = GetOrderTableHeader($TableColumns, 'Name');
    487486    $Output .= '<form action="?Action=View&amp;ExportId='.$_GET['ExportId'].'" method="post">'.
    488         '<h3>Překladové skupiny</h3>';
     487        '<h3>'.T('Translation groups').'</h3>';
    489488    if($Editable)
    490489    {
     
    518517      $Output .= '<tr>'.
    519518          '<td>'.$Selection.'<input type="hidden" name="seq'.$Group['Id'].'"/></td>'.
    520           '<td>'.$Group['Name'].'</td><td>';
     519          '<td>'.T($Group['Name']).'</td><td>';
    521520          if ($Group['MangosTable'] <> '')
    522521            $Output .= $Group['MangosTable'].'.sql ';
     
    526525            $Output .= $Group['DBCFileName'].'.dbc ';
    527526
    528       $Output .=    '</td><td>';
    529       $Output .=  $Columns. '</td>';
    530       $Output .=     '</tr>';
     527      $Output .= '</td><td>';
     528      $Output .= $Columns. '</td>';
     529      $Output .= '</tr>';
    531530    }
    532531    $Output .= '</table>'.
    533         '</form>'.
    534         $PageList['Output'];
     532      '</form>'.
     533      $PageList['Output'];
    535534    return($Output);
    536535  }
     
    726725        while($Group = $ID->fetch_assoc())
    727726        {
    728           $Output .= '<tr><td>'.$Group['Name'].'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>';
     727          $Output .= '<tr><td>'.T($Group['Name']).'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>';
    729728          $Translated += $Group['Translated'];
    730729          $Total += $Group['Total'];
  • trunk/Modules/Forum/Forum.php

    r838 r846  
    199199        $Output .= '<form action="?Thread='.$_GET['Thread'].'" method="post">'.
    200200            '<fieldset><legend>'.T('New Forum Message').'</legend>'.
    201             'Uživatel: ';
     201            T('User').': ';
    202202        if($this->System->User->Licence(LICENCE_USER)) $Output .= '<b>'.$this->System->User->Name.'</b><br />';
    203203        else $Output .= '<input type="text" name="user" /><br />';
     
    218218        $Output .= '<form action="?" method="post">'.
    219219            '<fieldset><legend>'.T('New thread').'</legend>'.
    220             'Uživatel: ';
     220            T('User').': ';
    221221        if($this->System->User->Licence(LICENCE_USER)) $Output .= '<b>'.$this->System->User->Name.'</b><br />';
    222222        else $Output .= '<input type="text" name="user" /><br />';
  • trunk/Modules/FrontPage/FrontPage.php

    r843 r846  
    123123            '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&amp;ID='.$DbRow['ID']).'">'.$DbRow['ID'].'</a></td>'.
    124124            '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&amp;ID='.$DbRow['Take']).'">'.$DbRow['Take'].'</a></td>'.
    125             '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&amp;action=filter').'">'.$DbRow['GroupName'].'</a></td></tr>';
     125            '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&amp;action=filter').'">'.T($DbRow['GroupName']).'</a></td></tr>';
    126126      }
    127127      $Output .= '</table>';
  • trunk/Modules/Import/Manage.php

    r842 r846  
    7171    while($Group = $DbResult->fetch_assoc())
    7272    {
    73       $Output .= '<tr><td>'.$Group['Name'].'</td>'.
     73      $Output .= '<tr><td>'.T($Group['Name']).'</td>'.
    7474        '<td>'.$Group['SourceType'].'</td><td>';
    7575      if($Group['MangosTable'] != '') $Output .= $Group['MangosTable'].'.sql ';
  • trunk/Modules/Search/Search.php

    r838 r846  
    1717  }
    1818
    19   function doStart()
     19  function DoStart()
    2020  {
    2121    $this->System->RegisterPage('search', 'PageSearch');
  • trunk/Modules/Team/Team.php

    r843 r846  
    230230        } else $Leader = array('Name' => '', 'Id' => 0);
    231231
    232         $Output .='<h3>Překladatelský tým '.$Team['Name'].'</h3><br />'.
    233           'Webové stránky: <a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a><br/>'.
    234           'Vedoucí: <a href="'.$this->System->Link('/user/?user='.$Leader['Id']).'">'.$Leader['Name'].'</a><br/>';
     232        $Output .='<h3>'.T('Translation team').' '.$Team['Name'].'</h3><br />'.
     233          T('Web pages').': <a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a><br/>'.
     234          T('Leader').': <a href="'.$this->System->Link('/user/?user='.$Leader['Id']).'">'.$Leader['Name'].'</a><br/>';
    235235        if($Team['Description'] != '')
    236           $Output .= 'Popis: '.$Team['Description'].'<br />';
     236          $Output .= T('Description').': '.$Team['Description'].'<br />';
    237237        $Output .= '<br />';
    238238        //$Output .= '<a href="export/?team='.$Team['Id'].'">Exportovat překlad týmu</a> ';
    239239        if($this->System->User->Licence(LICENCE_USER))
    240           $Output .='<a href="?action=gointeam&amp;id='.$Team['Id'].'">Vstoupit do týmu</a><br /><br />';
     240          $Output .='<a href="?action=gointeam&amp;id='.$Team['Id'].'">'.T('Enter to team').'</a><br /><br />';
    241241        $XP = GetLevelMinMax($Team['AverageXP']);
    242         $Output .='<fieldset><legend>Statistika</legend>'.
    243           'Počet členů týmu: <a href="'.$this->System->Link('/userlist.php?team='.$Team['Id']).'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a><br />'.
    244           'Počet přeložených textů týmu: <strong>'.$Team['NumberTranslate'].'</strong><br />'.
    245           'Průměrná úroveň překladatelů v týmu: <strong>'.$XP['Level'].'</strong> zkušenost: '.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'<br />'.
     242        $Output .='<fieldset><legend>'.T('Statistics').'</legend>'.
     243          T('Team member count').': <a href="'.$this->System->Link('/userlist/?team='.$Team['Id']).'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a><br />'.
     244          T('Team number of translated texts').': <strong>'.$Team['NumberTranslate'].'</strong><br />'.
     245          T('Average level of team members').': <strong>'.$XP['Level'].'</strong> '.T('experience').': '.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'<br />'.
    246246          '<br />'.
    247           '<strong>Stav dokončení týmu pro verzi '.$this->System->Config['Web']['GameVersion'].'</strong><br />';
     247          '<strong>'.T('Team completion state for version').' '.$this->System->Config['Web']['GameVersion'].'</strong><br />';
    248248
    249249        $BuildNumber = GetBuildNumber($this->System->Config['Web']['GameVersion']);
     
    277277          $Output .='<table class="BaseTable">';
    278278          $TableColumns = array(
    279             array('Name' => 'Name', 'Title' => 'Jméno'),
    280             array('Name' => 'Translated', 'Title' => 'Přeložených'),
    281             array('Name' => 'Total', 'Title' => 'Anglických'),
    282             array('Name' => 'Percent', 'Title' => 'Procenta'),
     279            array('Name' => 'Name', 'Title' => T('Name')),
     280            array('Name' => 'Translated', 'Title' => T('Translated')),
     281            array('Name' => 'Total', 'Title' => T('Original')),
     282            array('Name' => 'Percent', 'Title' => T('Percent')),
    283283          );
    284284
     
    291291          while($Group = $DbResult->fetch_assoc())
    292292          {
    293             $Output .='<tr><td>'.$Group['Name'].'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>';
     293            $Output .='<tr><td>'.T($Group['Name']).'</td><td>'.$Group['Translated'].
     294              '</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>';
    294295            $Translated += $Group['Translated'];
    295296            $Total += $Group['Total'];
     
    297298          if($Total > 0) $Progress = round($Translated / $Total * 100, 2);
    298299          else $Progress = 0;
    299           $Output .='<tr><td><strong>Celkem</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, $Progress).'</strong></td></tr>';
     300          $Output .='<tr><td><strong>'.T('Total').'</strong></td><td><strong>'.
     301            $Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.
     302            ProgressBar(150, $Progress).'</strong></td></tr>';
    300303          $Output .='</table>';
    301304        }
  • trunk/Modules/Translation/Progress.php

    r837 r846  
    5252      while($Group = $DbResult->fetch_assoc())
    5353      {
    54         $Output .= '<tr><td>'.$Group['Name'].'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>';
     54        $Output .= '<tr><td>'.T($Group['Name']).'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>';
    5555        $Translated += $Group['Translated'];
    5656        $Total += $Group['Total'];
     
    114114    if($Language['Enabled'] == 1)
    115115    {
    116       $Lang = ' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>';
     116      $Lang = ' <a href="?language='.$Language['Id'].'">'.T($Language['Name']).'</a>';
    117117      if($Language['Id'] == $_SESSION['language']) $Output .= '<strong>'.$Lang.'</strong> ';
    118118        else $Output .= $Lang;
     
    121121    if(is_numeric($_SESSION['language'])) $LanguageName = $LanguageList[$_SESSION['language']]['Name'];
    122122      else $LanguageName = T('All');
    123     $Output .= '<br/><br /><h3>'.sprintf(T('Statistics of translation completion of language %s for version %s'), $LanguageName, $_SESSION['StatVersion']).'</h3><br/>';
     123    $Output .= '<br/><br /><h3>'.sprintf(T('Statistics of translation completion of language %s for version %s'), T($LanguageName), $_SESSION['StatVersion']).'</h3><br/>';
    124124    $Output .= $this->ShowStatTable();
    125125
  • trunk/Modules/Translation/Translation.php

    r843 r846  
    1919    $this->License = 'GNU/GPL';
    2020    $this->Description = 'Translation of text items and groups from original language to other languages.';
    21     $this->Dependencies = array('News');
     21    $this->Dependencies = array('News', 'Search');
    2222  }
    2323
     
    4949      'Icon' => '',
    5050    ));
     51    /*
    5152    if(array_key_exists('Search', $this->System->ModuleManager->Modules))
    5253    {
     
    6263
    6364        $this->System->ModuleManager->Modules['Search']->RegisterSearch('group'.$Group['Id'],
    64         sprintf(T('Translation group "%s"'), $Group['Name']), $Columns, '`'.$Table.'`', $this->System->Link('/TranslationList.php?group='.
    65         $Group['Id'].'&amp;user=0&amp;state=0&amp;entry=&amp;text='));
     65          sprintf(T('Translation group "%s"'), $Group['Name']), $Columns, '`'.$Table.'`',
     66          $this->System->Link('/TranslationList.php?group='.
     67          $Group['Id'].'&amp;user=0&amp;state=0&amp;entry=&amp;text='));
    6668      }
    6769    }
     70    */
    6871  }
    6972
  • trunk/Modules/Translation/TranslationList.php

    r845 r846  
    5959      if($Filter['Group'] != 0)
    6060      {
    61         if(isset($TranslationTree[$Filter['Group']]) == false) ErrorMessage('Překladová skupina dle zadaného Id neexistuje.');
     61        if(isset($TranslationTree[$Filter['Group']]) == false)
     62          ErrorMessage('Překladová skupina dle zadaného Id neexistuje.');
    6263        $Table = $TranslationTree[$Filter['Group']]['TablePrefix'];
    6364      }
     
    7778      if($Group['Id'] == $Filter['Group']) $Selected = ' selected="selected"';
    7879      else $Selected = '';
    79       $Output .= '<option value="'.$Group['Id'].'"'.$Selected.'>'.$Group['Name'].'</option>';
     80      $Output .= '<option value="'.$Group['Id'].'"'.$Selected.'>'.T($Group['Name']).'</option>';
    8081    }
    8182    $Output .= '</select></td>';
     
    414415   while($Group = $DbResult->fetch_assoc())
    415416   {
    416      $Output .= '<tr><td><a href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;action=filter').'">'.$Group['Name'].'</a></td>'.
     417     $Output .= '<tr><td><a href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&amp;action=filter').'">'.T($Group['Name']).'</a></td>'.
    417418       '<td>'.$Group['SourceType'].'</td><td>';
    418419     if($Group['MangosTable'] != '') $Output .= $Group['MangosTable'].'.sql ';
     
    503504    if($this->System->User->Licence(LICENCE_ADMIN))
    504505    {
    505       $DbResult = $this->System->Database->select('Group', '*', 'Id='.$_GET['id']);
     506      $DbResult = $this->System->Database->select('Group', '*', '`Id`='.$_GET['id']);
    506507      if($DbResult->num_rows == 1)
    507508      {
  • trunk/Modules/User/Profile.php

    r844 r846  
    109109      {
    110110        $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'.
    111             '<td><a href="form.php?group='.$DbRow['Group'].'&amp;ID='.$DbRow['ID'].'">'.$DbRow['ID'].'</a></td>'.
    112             '<td><a href="form.php?group='.$DbRow['Group'].'&amp;ID='.$DbRow['Take'].'">'.$DbRow['Take'].'</a></td>'.
    113             '<td><a href="TranslationList.php?group='.$DbRow['Group'].'&amp;action=filter">'.$DbRow['GroupName'].'</a></td></tr>';
     111            '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&amp;ID='.$DbRow['ID']).'">'.$DbRow['ID'].'</a></td>'.
     112            '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&amp;ID='.$DbRow['Take']).'">'.$DbRow['Take'].'</a></td>'.
     113            '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&amp;action=filter').'">'.T($DbRow['GroupName']).'</a></td></tr>';
    114114      }
    115115      $Output .= '</table>';
     
    153153      $Output .=
    154154        '<h3>'.T('Translator').' '.$UserLine['Name'].'</h3>'.
    155         T('Default language:').' <strong>'.$UserLine['LanguageName'].'</strong><br />'.
     155        T('Default language:').' <strong>'.T($UserLine['LanguageName']).'</strong><br />'.
    156156        T('Default client version:').' <a href="'.$this->System->Link('/client-version/?action=item&amp;id='.$UserLine['PreferredVersion']).'"><strong>'.$UserLine['Version'].'</strong></a><br />'.
    157157        T('Last logged in:').' <strong>'.HumanDateTime($UserLine['LastLogin']).'</strong><br />'.
Note: See TracChangeset for help on using the changeset viewer.