Changeset 603


Ignore:
Timestamp:
Nov 26, 2013, 12:22:41 AM (10 years ago)
Author:
chronos
Message:
  • Added: Class Locale for handling interface translation. Texts are translated using global function T($Text). New config item Web-Locale added.
Location:
trunk
Files:
3 added
7 edited

Legend:

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

    r578 r603  
    138138        if(isset($_COOKIE['HideWelcome']) and ($_COOKIE['HideWelcome'] == 1))
    139139        {
    140                 $Action = '<a href="?Action=UnHideWelcome">Odkrýt úvod</a>';
     140                $Action = '<a href="?Action=UnHideWelcome">'.T('Show welcome').'</a>';
    141141                $HideWelcome = 'display: none';
    142142        } else
    143143        {
    144                 $Action = '<a href="?Action=HideWelcome">Skrýt úvod</a>';
     144                $Action = '<a href="?Action=HideWelcome">'.T('Hide welcome').'</a>';
    145145                $HideWelcome = '';
    146146        }
  • trunk/Modules/Team/Team.php

    r597 r603  
    106106                                $Output .= $this->ShowTeamList();
    107107                        } else $Output = ShowMessage('Nutno zadat id týmu.', MESSAGE_CRITICAL);
    108                 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL);
     108                } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    109109                return($Output);
    110110        }
     
    133133                                } else $Output .= ShowMessage('Již existuje tým se stejným jménem', MESSAGE_CRITICAL);
    134134                        } else $Output .= ShowMessage('Chybí údaje formuláře', MESSAGE_CRITICAL);
    135                 } else $Output .= ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL);
     135                } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    136136                $Output .= $this->ShowTeamList();
    137137                return($Output);
     
    157157                                } else $Output = ShowMesage('Tým nenalezen.', MESSAGE_CRITICAL);
    158158                        } else $Output = ShowMessage('Nezadáno id týmu', MESSAGE_CRITICAL);
    159                 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL);
     159                } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    160160                return($Output);
    161161        }
     
    183183                                } else $Output .= ShowMessage('Tým nenalezen nebo nemáte oprávnění.', MESSAGE_CRITICAL);
    184184                        } else $Output .= ShowMessage('Nezadáno id týmu nebo některé položky formuláře.', MESSAGE_CRITICAL);
    185                 } else $Output .= ShowMessage('Nemáte oprávnění.', MESSAGE_CRITICAL);
     185                } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    186186                $Output .= $this->ShowTeamList();
    187187                return($Output);
     
    199199                                        '<tr><td colspan="2"><input type="submit" value="Vytvořit a vstoupit" /></td></tr>'.
    200200                                        '</table></fieldset></form>';
    201                 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL);
     201                } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    202202                return($Output);
    203203        }
     
    311311       
    312312                        $Output .= $this->ShowTeamList();
    313                 } else $Output = ShowMessage('Nemáte oprávnění.', MESSAGE_CRITICAL);
     313                } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL);
    314314                return($Output);
    315315        }
  • trunk/admin/DefaultConfig.php

    r571 r603  
    3636    'WebCounter' => '',
    3737    'Advertisement' => '',
     38    'Locale' => 'cs',
    3839  ),
    3940  'ForbiddedUserNames' => array('addon', 'admin', 'administrator'),
  • trunk/admin/install.php

    r602 r603  
    121121    'Timezone' => 'Europe/Prague',
    122122    'Advertisement' => '',
     123    'Locale' => 'cs',
    123124  ),
    124125  'ForbiddedUserNames' => array('addon', 'admin', 'administrator'),
  • trunk/includes/Version.php

    r602 r603  
    66// and system will need database update.
    77
    8 $Revision = 602; // Subversion revision
     8$Revision = 603; // Subversion revision
    99$DatabaseRevision = 600; // Database structure revision
    1010$ReleaseTime = '2013-11-25';
  • trunk/includes/global.php

    r596 r603  
    1010include_once(dirname(__FILE__).'/Version.php');
    1111include_once(dirname(__FILE__).'/AppModule.php');
     12include_once(dirname(__FILE__).'/Locale.php');
     13$Locale = new Locale();
     14$Locale->Dir = dirname(__FILE__).'/../locale';
     15$Locale->Load($Config['Web']['Locale']);
    1216
    1317// Include application modules
  • trunk/includes/system.php

    r602 r603  
    253253                                        'Heslo: <td><input type="password" name="LoginPass" size="8" /> '.
    254254                                        '<input type="submit" value="Přihlásit" /></form> &nbsp; '.
    255                                         '<a href="'.$this->System->Link('/registrace.php').'">Registrace</a></span>';
     255                                        '<a href="'.$this->System->Link('/registrace.php').'">'.T('Registration').'</a></span>';
    256256                }
    257257                $Output .= '</div>';
     
    303303        function ShowMainMenu()
    304304        {
    305                 $Output = '<strong>Nabídka:</strong>'.
     305                $Output = '<strong>'.T('Menu').':</strong>'.
    306306                                '<div class="verticalmenu"><ul>';
    307307                foreach($this->System->Menu as $MenuItem)
Note: See TracChangeset for help on using the changeset viewer.