Changeset 301

Show
Ignore:
Timestamp:
04/05/05 19:48:14 (4 years ago)
Author:
rcourtna
Message:

began adding gettext support and some Italian translations.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/AMP/amp_conf/htdocs/admin/common/script.js

    r298 r301  
    325325        } 
    326326} 
     327 
     328function changeLang(lang) { 
     329        document.cookie='lang='+lang; 
     330        window.location.reload(); 
     331} 
     332 
  • trunk/AMP/amp_conf/htdocs/admin/config.php

    r199 r301  
    8383// setup menu  
    8484$amp_sections = array( 
    85                 9=>"Incoming Calls"
    86                 3=>"Extensions"
    87                 4=>"Ring Groups"
    88                 11=>"Queues"
    89                 2=>"Digital Receptionist"
    90                 6=>"Trunks"
    91                 8=>"Outbound Routing"
    92                 7=>"DID Routes"
    93                 1=>"On Hold Music"
    94                 12=>"System Recordings"
    95                 5=>"General Settings"
    96                 99=>"Apply Changes Bar" 
     85                9=>_("Incoming Calls")
     86                3=>_("Extensions")
     87                4=>_("Ring Groups")
     88                11=>_("Queues")
     89                2=>_("Digital Receptionist")
     90                6=>_("Trunks")
     91                8=>_("Outbound Routing")
     92                7=>_("DID Routes")
     93                1=>_("On Hold Music")
     94                12=>_("System Recordings")
     95                5=>_("General Settings")
     96                99=>_("Apply Changes Bar") 
    9797        ); 
    9898         
     
    134134switch($display) { 
    135135        default: 
    136                 echo "<p>Welcome to AMP</p>"; 
     136                echo "<p>"._("Welcome to AMP")."</p>"; 
    137137                echo str_repeat("<br />", 12); 
    138138        break; 
    139139        case 'noaccess': 
    140                 echo "<h2>Not found</h2>"; 
    141                 echo "<p>The section you requested does not exist or you do not have access to it.</p>"; 
     140                echo "<h2>"._("Not found")."</h2>"; 
     141                echo "<p>"._("The section you requested does not exist or you do not have access to it.")."</p>"; 
    142142                echo str_repeat("<br />", 10); 
    143143        break; 
    144144        case '9': 
    145                 echo "<h2>Incoming Calls</h2>"; 
     145                echo "<h2>"._("Incoming Calls")."</h2>"; 
    146146                include 'incoming.php'; 
    147147        break; 
     
    150150        break; 
    151151        case '2': 
    152                 echo "<h2>Digital Receptionist</h2>"; 
     152                echo "<h2>"._("Digital Receptionist")."</h2>"; 
    153153                // The Digital Receptionist code is a rat's nest.  If you are planning on making significant modifications, just re-write from scratch. 
    154154                //if menu_id is being empty, or if we are requesting delete, just use ivr_action.php 
     
    168168        break; 
    169169        case '5': 
    170                 echo "<h2>General Settings</h2>"; 
     170                echo "<h2>"._("General Settings")."</h2>"; 
    171171                include 'general.php'; 
    172172        break; 
  • trunk/AMP/amp_conf/htdocs/admin/footer.php

    r176 r301  
    7171        if ($need_reload[0] == 'true') { 
    7272        ?> 
    73         <div class="inyourface"><a href="<?php  echo $_SERVER["PHP_SELF"]?>?display=<?php  echo $_REQUEST['display'] ?>&clk_reload=true">You have made changes - when finished, click here to APPLY them</a></div> 
     73        <div class="inyourface"><a href="<?php  echo $_SERVER["PHP_SELF"]?>?display=<?php  echo $_REQUEST['display'] ?>&clk_reload=true"><?php echo _("You have made changes - when finished, click here to APPLY them") ?></a></div> 
    7474        <?php  
    7575        } 
  • trunk/AMP/amp_conf/htdocs/admin/header.php

    r196 r301  
    3636</head> 
    3737 
     38<?php 
     39        setlocale(LC_MESSAGES,  $_COOKIE['lang'] ? $_COOKIE['lang']:'en_US'); 
     40        bindtextdomain('amp','./i18n'); 
     41        textdomain('amp'); 
     42?> 
     43 
    3844<body> 
    3945<div id="page"> 
     
    5056    <a id="<?php  echo ($currentFile=='config.php' ? 'current':'') ?>" href="config.php?"> 
    5157        &#8226; 
    52         <li>Setup</li> 
     58        <li><?php echo _("Setup") ?></li> 
    5359    </a> 
    5460    <a id="<?php  echo ($currentFile=='reports.php' ? 'current':'') ?>" href="reports.php?"> 
    5561        &#8226; 
    56         <li>Reports</li> 
     62        <li><?php echo _("Reports") ?></li> 
    5763    </a> 
    5864    <a id="<?php  echo ($currentFile=='panel.php' ? 'current':'') ?>" href="panel.php?"> 
    5965        &#8226; 
    60         <li>Panel</li> 
     66        <li><?php echo _("Panel") ?></li> 
    6167    </a> 
    6268</div> 
  • trunk/AMP/amp_conf/htdocs/admin/index.php

    r173 r301  
    2323 
    2424<?php 
    25 $title="Asterisk Management Portal"
    26 $message="Administration"
     25$title=_("Asterisk Management Portal")
     26$message=_("Administration")
    2727 
    2828require_once('functions.php'); 
     
    5252?> 
    5353 
     54    <p align="right"> 
     55        Language: 
     56        <select onchange="javascript:changeLang(this.value)"> 
     57        <option value="en_US" <? echo ($_COOKIE['lang']=="en_US" ? "selected" : "") ?> >English</option> 
     58        <option value="it_IT" <? echo ($_COOKIE['lang']=="it_IT" ? "selected" : "") ?> >Italian</option> 
     59    </select> 
     60    </p> 
     61 
    5462    <h2>AMP</h2> 
    5563    <p> 
    5664        Welcome to the Asterisk Management Portal <?php $ver=getversion(); echo $ver[0][0];?> 
     65        <?php echo _("Welcome to the Asterisk Management Portal") ?> <?php $ver=getversion(); echo $ver[0][0];?> 
    5766        <br><br><br><br><br><br> 
    5867    </p> 
  • trunk/AMP2-UseAmportal/amp_conf/var/www/html/admin/common/script.js

    r298 r301  
    325325        } 
    326326} 
     327 
     328function changeLang(lang) { 
     329        document.cookie='lang='+lang; 
     330        window.location.reload(); 
     331} 
     332 
  • trunk/AMP2-UseAmportal/amp_conf/var/www/html/admin/config.php

    r199 r301  
    8383// setup menu  
    8484$amp_sections = array( 
    85                 9=>"Incoming Calls"
    86                 3=>"Extensions"
    87                 4=>"Ring Groups"
    88                 11=>"Queues"
    89                 2=>"Digital Receptionist"
    90                 6=>"Trunks"
    91                 8=>"Outbound Routing"
    92                 7=>"DID Routes"
    93                 1=>"On Hold Music"
    94                 12=>"System Recordings"
    95                 5=>"General Settings"
    96                 99=>"Apply Changes Bar" 
     85                9=>_("Incoming Calls")
     86                3=>_("Extensions")
     87                4=>_("Ring Groups")
     88                11=>_("Queues")
     89                2=>_("Digital Receptionist")
     90                6=>_("Trunks")
     91                8=>_("Outbound Routing")
     92                7=>_("DID Routes")
     93                1=>_("On Hold Music")
     94                12=>_("System Recordings")
     95                5=>_("General Settings")
     96                99=>_("Apply Changes Bar") 
    9797        ); 
    9898         
     
    134134switch($display) { 
    135135        default: 
    136                 echo "<p>Welcome to AMP</p>"; 
     136                echo "<p>"._("Welcome to AMP")."</p>"; 
    137137                echo str_repeat("<br />", 12); 
    138138        break; 
    139139        case 'noaccess': 
    140                 echo "<h2>Not found</h2>"; 
    141                 echo "<p>The section you requested does not exist or you do not have access to it.</p>"; 
     140                echo "<h2>"._("Not found")."</h2>"; 
     141                echo "<p>"._("The section you requested does not exist or you do not have access to it.")."</p>"; 
    142142                echo str_repeat("<br />", 10); 
    143143        break; 
    144144        case '9': 
    145                 echo "<h2>Incoming Calls</h2>"; 
     145                echo "<h2>"._("Incoming Calls")."</h2>"; 
    146146                include 'incoming.php'; 
    147147        break; 
     
    150150        break; 
    151151        case '2': 
    152                 echo "<h2>Digital Receptionist</h2>"; 
     152                echo "<h2>"._("Digital Receptionist")."</h2>"; 
    153153                // The Digital Receptionist code is a rat's nest.  If you are planning on making significant modifications, just re-write from scratch. 
    154154                //if menu_id is being empty, or if we are requesting delete, just use ivr_action.php 
     
    168168        break; 
    169169        case '5': 
    170                 echo "<h2>General Settings</h2>"; 
     170                echo "<h2>"._("General Settings")."</h2>"; 
    171171                include 'general.php'; 
    172172        break; 
  • trunk/AMP2-UseAmportal/amp_conf/var/www/html/admin/footer.php

    r176 r301  
    7171        if ($need_reload[0] == 'true') { 
    7272        ?> 
    73         <div class="inyourface"><a href="<?php  echo $_SERVER["PHP_SELF"]?>?display=<?php  echo $_REQUEST['display'] ?>&clk_reload=true">You have made changes - when finished, click here to APPLY them</a></div> 
     73        <div class="inyourface"><a href="<?php  echo $_SERVER["PHP_SELF"]?>?display=<?php  echo $_REQUEST['display'] ?>&clk_reload=true"><?php echo _("You have made changes - when finished, click here to APPLY them") ?></a></div> 
    7474        <?php  
    7575        } 
  • trunk/AMP2-UseAmportal/amp_conf/var/www/html/admin/header.php

    r196 r301  
    3636</head> 
    3737 
     38<?php 
     39        setlocale(LC_MESSAGES,  $_COOKIE['lang'] ? $_COOKIE['lang']:'en_US'); 
     40        bindtextdomain('amp','./i18n'); 
     41        textdomain('amp'); 
     42?> 
     43 
    3844<body> 
    3945<div id="page"> 
     
    5056    <a id="<?php  echo ($currentFile=='config.php' ? 'current':'') ?>" href="config.php?"> 
    5157        &#8226; 
    52         <li>Setup</li> 
     58        <li><?php echo _("Setup") ?></li> 
    5359    </a> 
    5460    <a id="<?php  echo ($currentFile=='reports.php' ? 'current':'') ?>" href="reports.php?"> 
    5561        &#8226; 
    56         <li>Reports</li> 
     62        <li><?php echo _("Reports") ?></li> 
    5763    </a> 
    5864    <a id="<?php  echo ($currentFile=='panel.php' ? 'current':'') ?>" href="panel.php?"> 
    5965        &#8226; 
    60         <li>Panel</li> 
     66        <li><?php echo _("Panel") ?></li> 
    6167    </a> 
    6268</div> 
  • trunk/AMP2-UseAmportal/amp_conf/var/www/html/admin/index.php

    r173 r301  
    2323 
    2424<?php 
    25 $title="Asterisk Management Portal"
    26 $message="Administration"
     25$title=_("Asterisk Management Portal")
     26$message=_("Administration")
    2727 
    2828require_once('functions.php'); 
     
    5252?> 
    5353 
     54    <p align="right"> 
     55        Language: 
     56        <select onchange="javascript:changeLang(this.value)"> 
     57        <option value="en_US" <? echo ($_COOKIE['lang']=="en_US" ? "selected" : "") ?> >English</option> 
     58        <option value="it_IT" <? echo ($_COOKIE['lang']=="it_IT" ? "selected" : "") ?> >Italian</option> 
     59    </select> 
     60    </p> 
     61 
    5462    <h2>AMP</h2> 
    5563    <p> 
    5664        Welcome to the Asterisk Management Portal <?php $ver=getversion(); echo $ver[0][0];?> 
     65        <?php echo _("Welcome to the Asterisk Management Portal") ?> <?php $ver=getversion(); echo $ver[0][0];?> 
    5766        <br><br><br><br><br><br> 
    5867    </p> 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads