Changeset 855 for trunk


Ignore:
Timestamp:
Jan 19, 2016, 11:10:33 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Translation groups sorted by localized name again.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r854 r855  
    77
    88$Version = '1.0-alfa';
    9 $Revision = 852; // Subversion revision
     9$Revision = 855; // Subversion revision
    1010$DatabaseRevision = 849; // Database structure revision
    11 $ReleaseTime = '2016-01-17';
     11$ReleaseTime = '2016-01-19';
  • trunk/Modules/Translation/TranslationList.php

    r847 r855  
    2323
    2424    $Output = '<form action="?" method="post">'.
    25         '<table class="BaseTable"><tr>'.
    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         '<th></th></tr><tr>';
     25      '<table class="BaseTable"><tr>'.
     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      '<th></th></tr><tr>';
    3434
    3535    // State
     
    7373    else $Selected = '';
    7474    $Output .= '<option value="0"'.$Selected.'>'.T('All').'</option>';
    75     $DbResult = $this->Database->query('SELECT `Id`,`Name` FROM `Group` ORDER BY `Name`');
     75    $DbResult = $this->Database->query('SELECT `Id`,`Name` FROM `Group`');
    7676    while($Group = $DbResult->fetch_assoc())
     77      $Groups[T($Group['Name'])] = $Group;
     78    ksort($Groups);
     79    foreach($Groups as $Group)
    7780    {
    7881      if($Group['Id'] == $Filter['Group']) $Selected = ' selected="selected"';
     
    382385      $Filter = $this->ShowFilter();
    383386      if($Filter['Group'] > 0) $Output = $this->ShowTranslationList($Filter);
    384       else $Output = $this->ShowGroupList($Filter);
     387        else $Output = $this->ShowGroupList($Filter);
    385388    }
    386389    return($Output);
  • trunk/includes/Global.php

    r854 r855  
    343343
    344344  $Result = array();
    345   $DbResult = $System->Database->query('SELECT *, UNIX_TIMESTAMP(`LastImport`) AS `LastImportTime` FROM `Group` ORDER BY `Name`');
     345  $Groups = array();
     346  $DbResult = $System->Database->query('SELECT *, UNIX_TIMESTAMP(`LastImport`) AS `LastImportTime` FROM `Group`');
    346347  while($DbRow = $DbResult->fetch_assoc())
    347   {
    348     $DbRow['Items'] = array();
    349     $DbRow['Name'] = T($DbRow['Name']);
    350     $Result[$DbRow['Id']] = $DbRow;
     348    $Groups[T($DbRow['Name'])] = $DbRow;
     349  ksort($Groups);
     350  foreach($Groups as $Group)
     351  {
     352    $Group['Items'] = array();
     353    $Group['Game'] = T($Group['Name']);
     354    $Result[$Group['Id']] = $Group;
    351355  }
    352356  $DbResult = $System->Database->query('SELECT * FROM `GroupItem` ORDER BY `Group`, `Sequence`');
  • trunk/includes/Locale.php

    r843 r855  
    147147  function UpdateToDatabase(Database $Database, $LangCode)
    148148  {
    149     $DbResult = $Database->select('Language', '*', 'Code='.$Database->quote($LangCode));
     149    $DbResult = $Database->select('Language', '*', '`Code`='.$Database->quote($LangCode));
    150150    if($DbResult->num_rows > 0)
    151151    {
     
    153153      foreach($this->Texts->Data as $Index => $Item)
    154154      {
    155         $DbResult = $Database->select('Locale', '*', '(`Original` ='.$Database->quote($Index).') AND (`Language`='.($Language['Id']).')');
     155        $DbResult = $Database->select('Locale', '*', '(`Original` ='.$Database->quote($Index).
     156          ') AND (`Language`='.($Language['Id']).')');
    156157        if($DbResult->num_rows > 0)
    157158        $Database->update('Locale', '(`Language`='.($Language['Id']).') AND '.
  • trunk/includes/System.php

    r854 r855  
    452452    while($Group = $DbResult->fetch_assoc())
    453453    {
     454      $Groups[T($Group['Name'])] = $Group;
     455    }
     456    ksort($Groups);
     457    foreach($Groups as $Group)
     458    {
    454459      $Output .= '<div id="menuitem-group'.$Group['Id'].'" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">'.
    455460        '<a href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].
Note: See TracChangeset for help on using the changeset viewer.