Call broadcast change app_languages array from $content to $text (similar to gettext). Rename some of the labels put a dash between all words consistently.

This commit is contained in:
Mark Crane
2012-10-23 15:36:57 +00:00
parent b4fd0d2a92
commit 58783d2204
5 changed files with 102 additions and 110 deletions
+62 -62
View File
@@ -1,100 +1,100 @@
<?php
//v_call_broadcast
$content['title']['en-us'] = 'Call Broadcast List';
$content['title']['pt-pt'] = 'Lista de Chamadas Broadcast';
$text['title']['en-us'] = 'Call Broadcasts';
$text['title']['pt-pt'] = 'Chamadas Broadcasts';
$content['label-name']['en-us'] = 'Name';
$content['label-name']['pt-pt'] = 'Nome';
$text['label-name']['en-us'] = 'Name';
$text['label-name']['pt-pt'] = 'Nome';
$content['label-concurrent-limit']['en-us'] = 'Concurrent Limit';
$content['label-concurrent-limit']['pt-pt'] = 'Limite de concorrencia';
$text['label-concurrent-limit']['en-us'] = 'Concurrent Limit';
$text['label-concurrent-limit']['pt-pt'] = 'Limite de concorrencia';
$content['label-description']['en-us'] = 'Description';
$content['label-description']['pt-pt'] = 'Descrição';
$text['label-description']['en-us'] = 'Description';
$text['label-description']['pt-pt'] = 'Descrição';
$content['confirm-delete-info']['en-us'] = 'Do you really want to delete this?';
$content['confirm-delete-info']['pt-pt'] = 'Deseja realmente eliminar isto?';
$text['confirm-delete-info']['en-us'] = 'Do you really want to delete this?';
$text['confirm-delete-info']['pt-pt'] = 'Deseja realmente eliminar isto?';
//v_call_broadcast_delete
$content['confirm-delete']['en-us'] = 'Delete Complete';
$content['confirm-delete']['pt-pt'] = 'Eliminação Completa';
$text['confirm-delete']['en-us'] = 'Delete Complete';
$text['confirm-delete']['pt-pt'] = 'Eliminação Completa';
//v_call_broadcast_edit
$content['confirm-name']['en-us'] = 'Please provide: Name';
$content['confirm-name']['pt-pt'] = 'Por favor, forneça: Nome';
$text['confirm-name']['en-us'] = 'Please provide: Name';
$text['confirm-name']['pt-pt'] = 'Por favor, forneça: Nome';
$content['confirm-add']['en-us'] = 'Add Complete';
$content['confirm-add']['pt-pt'] = 'Adição Completa';
$text['confirm-add']['en-us'] = 'Add Complete';
$text['confirm-add']['pt-pt'] = 'Adição Completa';
$content['confirm-update']['en-us'] = 'Update Complete';
$content['confirm-update']['pt-pt'] = 'Actualização Completa';
$text['confirm-update']['en-us'] = 'Update Complete';
$text['confirm-update']['pt-pt'] = 'Actualização Completa';
$content['label-call-broadcast']['en-us'] = 'Call Broadcast';
$content['label-call-broadcast']['pt-pt'] = 'Chamada Broadcast';
$text['label-call-broadcasts']['en-us'] = 'Call Broadcasts';
$text['label-call-broadcasts']['pt-pt'] = 'Chamada Broadcasts';
$content['label-call-broadcast-edit']['en-us'] = 'Call Broadcast Edit';
$content['label-call-broadcast-edit']['pt-pt'] = 'Editar Chamada Broadcast';
$text['label-call-broadcast']['en-us'] = 'Call Broadcast';
$text['label-call-broadcast']['pt-pt'] = 'Chamada Broadcast';
$content['button-back']['en-us'] = 'Back';
$content['button-back']['pt-pt'] = 'Voltar';
$text['button-back']['en-us'] = 'Back';
$text['button-back']['pt-pt'] = 'Voltar';
$content['description-name']['en-us'] = 'Enter the name here.';
$content['description-name']['pt-pt'] = 'Insira aqui o nome.';
$text['description-name']['en-us'] = 'Enter the name here.';
$text['description-name']['pt-pt'] = 'Insira aqui o nome.';
$content['label-timeout']['en-us'] = 'Timeout';
$content['label-timeout']['pt-pt'] = 'Tempo Limite';
$text['label-timeout']['en-us'] = 'Timeout';
$text['label-timeout']['pt-pt'] = 'Tempo Limite';
$content['description-timeout']['en-us'] = 'Limit the length of the call. Leave this empty for no limit.';
$content['description-timeout']['pt-pt'] = 'Limitar a duração da chamada. Deixe em branco para não ter limite.';
$text['description-timeout']['en-us'] = 'Limit the length of the call. Leave this empty for no limit.';
$text['description-timeout']['pt-pt'] = 'Limitar a duração da chamada. Deixe em branco para não ter limite.';
$content['description-concurrent-limit']['en-us'] = 'Limit the approximate number of concurrent calls. Leave this empty for no limit.';
$content['description-concurrent-limit']['pt-pt'] = 'Limitar o número de chamadas simultâneas. Deixe em branco para não ter limite.';
$text['description-concurrent-limit']['en-us'] = 'Limit the approximate number of concurrent calls. Leave this empty for no limit.';
$text['description-concurrent-limit']['pt-pt'] = 'Limitar o número de chamadas simultâneas. Deixe em branco para não ter limite.';
$content['label-callerid-name']['en-us'] = 'Caller ID Name';
$content['label-callerid-name']['pt-pt'] = 'Nome de Origem';
$text['label-caller-id-name']['en-us'] = 'Caller ID Name';
$text['label-caller-id-name']['pt-pt'] = 'Nome de Origem';
$content['label-callerid-number']['en-us'] = 'Caller ID Number';
$content['label-callerid-number']['pt-pt'] = 'Numero de Origem';
$text['label-callerid-number']['en-us'] = 'Caller ID Number';
$text['label-callerid-number']['pt-pt'] = 'Numero de Origem';
$content['description-callerid-name']['en-us'] = 'Applicable if the provider allow the Caller ID Name to be set. default: anonymous';
$content['description-callerid-name']['pt-pt'] = 'Aplicável se o provedor permitir o nome de origem para serem enviadas as chamadas. padrão: anonymous';
$text['description-caller-id-name']['en-us'] = 'Applicable if the provider allow the Caller ID Name to be set. default: anonymous';
$text['description-caller-id-name']['pt-pt'] = 'Aplicável se o provedor permitir o nome de origem para serem enviadas as chamadas. padrão: anonymous';
$content['description-callerid-number']['en-us'] = 'Applicable if the provider that allow the Caller ID number to be sent. default: 0000000000';
$content['description-callerid-number']['pt-pt'] = 'Aplicável se o provedor permitir o numero de origem para serem eninationviadas as chamadas. padrão: 0000000000';
$text['description-caller-id-number']['en-us'] = 'Applicable if the provider that allow the Caller ID number to be sent. default: 0000000000';
$text['description-caller-id-number']['pt-pt'] = 'Aplicável se o provedor permitir o numero de origem para serem eninationviadas as chamadas. padrão: 0000000000';
$content['label-destination']['en-us'] = 'Destination Number';
$content['label-destination']['pt-pt'] = 'Numero de Destino';
$text['label-destination']['en-us'] = 'Destination Number';
$text['label-destination']['pt-pt'] = 'Numero de Destino';
$content['description-destination']['en-us'] = 'Send the call to the extension an IVR Menu, Conference Room, or any other number.';
$content['description-destination']['pt-pt'] = 'Enviar a chamada para a extensão de um menu de IVR, Sala de Conferência, ou qualquer outro número.';
$text['description-destination']['en-us'] = 'Send the call to the extension an IVR Menu, Conference Room, or any other number.';
$text['description-destination']['pt-pt'] = 'Enviar a chamada para a extensão de um menu de IVR, Sala de Conferência, ou qualquer outro número.';
$content['label-phone']['en-us'] = 'Phone Number List';
$content['label-phone']['pt-pt'] = 'Lista de Números de Telefone';
$text['label-phone']['en-us'] = 'Phone Number List';
$text['label-phone']['pt-pt'] = 'Lista de Números de Telefone';
$content['description-phone']['en-us'] = 'Optional, set a list of phone numbers one per row in the following format: 123-123-1234|Last Name, First Name';
$content['description-phone']['pt-pt'] = 'Opcional, definir uma lista de números de telefone, um por linha no seguinte formato:  123-123-1234 | Sobrenome, Nome';
$text['description-phone']['en-us'] = 'Optional, set a list of phone numbers one per row in the following format: 123-123-1234|Last Name, First Name';
$text['description-phone']['pt-pt'] = 'Opcional, definir uma lista de números de telefone, um por linha no seguinte formato:  123-123-1234 | Sobrenome, Nome';
$content['label-description']['en-us'] = 'Description';
$content['label-description']['pt-pt'] = 'Descrição';
$text['label-description']['en-us'] = 'Description';
$text['label-description']['pt-pt'] = 'Descrição';
$content['description-info']['en-us'] = 'Enter the description here.';
$content['description-info']['pt-pt'] = 'Insira aqui a descrição';
$text['description-info']['en-us'] = 'Enter the description here.';
$text['description-info']['pt-pt'] = 'Insira aqui a descrição';
$content['button-send']['en-us'] = 'Send Broadcast';
$content['button-send']['pt-pt'] = 'Enviar Broadcast';
$text['button-send']['en-us'] = 'Send Broadcast';
$text['button-send']['pt-pt'] = 'Enviar Broadcast';
$content['button-save']['en-us'] = 'Save';
$content['button-save']['pt-pt'] = 'Guardar';
$text['button-save']['en-us'] = 'Save';
$text['button-save']['pt-pt'] = 'Guardar';
//v_call_broadcast_send
$content['label-viewcalls']['en-us'] = 'View Calls';
$content['label-viewcalls']['pt-pt'] = 'Ver Chamadas';
$text['label-view-calls']['en-us'] = 'View Calls';
$text['label-view-calls']['pt-pt'] = 'Ver Chamadas';
$content['label-message']['en-us'] = 'Message';
$content['label-message']['pt-pt'] = 'Mensagem';
$text['label-message']['en-us'] = 'Message';
$text['label-message']['pt-pt'] = 'Mensagem';
$content['label-hasbeen']['en-us'] = 'has been started';
$content['label-hasbeen']['pt-pt'] = 'foi iniciada';
$text['label-has-been']['en-us'] = 'has been started';
$text['label-has-been']['pt-pt'] = 'foi iniciada';
?>
+7 -8
View File
@@ -37,15 +37,14 @@ else {
//add multi-lingual support
require_once "app_languages.php";
foreach($content_broadcast as $key => $value) {
$content[$key] = $value[$_SESSION['domain']['language']['code']];
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//add the includes
require_once "includes/header.php";
require_once "includes/paging.php";
//get the http get variables and set them to php variables
$order_by = $_GET["order_by"];
$order = $_GET["order"];
@@ -59,7 +58,7 @@ else {
echo " <br>";
echo "<table width='100%' border='0'><tr>\n";
echo "<td width='50%' nowrap='nowrap' align='left'><b>".$content['title']."</b></td>\n";
echo "<td width='50%' nowrap='nowrap' align='left'><b>".$text['title']."</b></td>\n";
echo "<td width='50%' align='right'>&nbsp;</td>\n";
echo "</tr></table>\n";
@@ -96,9 +95,9 @@ else {
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo th_order_by('broadcast_name', $content['label-name'], $order_by, $order);
echo th_order_by('broadcast_concurrent_limit', $content['label-concurrent-limit'], $order_by, $order);
echo th_order_by('broadcast_description', $content['label-description'], $order_by, $order);
echo th_order_by('broadcast_name', $text['label-name'], $order_by, $order);
echo th_order_by('broadcast_concurrent_limit', $text['label-concurrent-limit'], $order_by, $order);
echo th_order_by('broadcast_description', $text['label-description'], $order_by, $order);
//echo th_order_by('recordingid', 'Recording', $order_by, $order);
echo "<td align='right' width='42'>\n";
if (permission_exists('call_broadcast_add')) {
@@ -119,7 +118,7 @@ else {
echo " <a href='v_call_broadcast_edit.php?id=".$row['call_broadcast_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('call_broadcast_delete')) {
echo " <a href='v_call_broadcast_delete.php?id=".$row['call_broadcast_uuid']."' alt='delete' onclick=\"return confirm('".$content['confirm-delete-info']."')\">$v_link_label_delete</a>\n";
echo " <a href='v_call_broadcast_delete.php?id=".$row['call_broadcast_uuid']."' alt='delete' onclick=\"return confirm('".$text['confirm-delete-info']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
@@ -36,8 +36,8 @@ else {
//add multi-lingual support
require_once "app_languages.php";
foreach($content_broadcast as $key => $value) {
$content[$key] = $value[$_SESSION['domain']['language']['code']];
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//get the id
@@ -59,7 +59,7 @@ else {
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=v_call_broadcast.php\">\n";
echo "<div align='center'>\n";
echo "".$content['confirm-delete']."\n";
echo "".$text['confirm-delete']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
+25 -32
View File
@@ -36,8 +36,8 @@ else {
//add multi-lingual support
require_once "app_languages.php";
foreach($content_broadcast as $key => $value) {
$content[$key] = $value[$_SESSION['domain']['language']['code']];
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//set the action with add or update
@@ -71,7 +71,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
if (strlen($broadcast_name) == 0) { $msg .= "".$content['confirm-name']."<br>\n"; }
if (strlen($broadcast_name) == 0) { $msg .= "".$text['confirm-name']."<br>\n"; }
//if (strlen($broadcast_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
//if (strlen($broadcast_timeout) == 0) { $msg .= "Please provide: Timeout<br>\n"; }
//if (strlen($broadcast_concurrent_limit) == 0) { $msg .= "Please provide: Concurrent Limit<br>\n"; }
@@ -144,7 +144,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=v_call_broadcast.php\">\n";
echo "<div align='center'>\n";
echo "".$content['confirm-add']."\n";
echo "".$text['confirm-add']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
@@ -180,7 +180,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=v_call_broadcast.php\">\n";
echo "<div align='center'>\n";
echo "".$content['confirm-update']."\n";
echo "".$text['confirm-update']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
@@ -230,47 +230,42 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
echo "<tr>\n";
if ($action == "add") {
echo "<td width='30%' align='left' nowrap='nowrap'><b>".$content['label-call-broadcast']."</b></td>\n";
}
if ($action == "update") {
echo "<td width='30%' align='left' nowrap='nowrap'><b>".$content['label-call-broadcast-edit']."</b></td>\n";
}
echo "<td width='30%' align='left' nowrap='nowrap'><b>".$text['label-call-broadcast']."</b></td>\n";
echo "<td width='70%' align='right'>\n";
echo " <input type='button' class='btn' name='back' alt='back' onclick=\"window.location='v_call_broadcast.php'\" value='".$content['button-back']."'>\n";
echo " <input type='button' class='btn' name='back' alt='back' onclick=\"window.location='v_call_broadcast.php'\" value='".$text['button-back']."'>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$content['label-name'].":\n";
echo " ".$text['label-name'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_name' maxlength='255' value=\"$broadcast_name\">\n";
echo "<br />\n";
echo "".$content['description-name']."\n";
echo "".$text['description-name']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-timeout'].":\n";
echo " ".$text['label-timeout'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_timeout' maxlength='255' value=\"$broadcast_timeout\">\n";
echo "<br />\n";
echo "".$content['description-timeout']."\n";
echo "".$text['description-timeout']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-concurrent-limit'].":\n";
echo " ".$text['label-concurrent-limit'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_concurrent_limit' maxlength='255' value=\"$broadcast_concurrent_limit\">\n";
echo "<br />\n";
echo "".$content['description-concurrent-limit']."\n";
echo "".$text['description-concurrent-limit']."\n";
echo "</td>\n";
echo "</tr>\n";
@@ -306,23 +301,23 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-callerid-name'].":\n";
echo " ".$text['label-caller-id-name'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_caller_id_name' maxlength='255' value=\"$broadcast_caller_id_name\">\n";
echo "<br />\n";
echo "".$content['description-callerid-name']."\n";
echo "".$text['description-caller-id-name']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-callerid-number'].":\n";
echo " ".$text['label-callerid-number'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_caller_id_number' maxlength='255' value=\"$broadcast_caller_id_number\">\n";
echo "<br />\n";
echo "".$content['description-callerid-number']."\n";
echo "".$text['description-caller-id-number']."\n";
echo "</td>\n";
echo "</tr>\n";
/*
@@ -355,34 +350,34 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-destination'].":\n";
echo " ".$text['label-destination'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_destination_data' maxlength='255' value=\"$broadcast_destination_data\">\n";
echo "<br />\n";
echo "".$content['description-destination']." <br /><br />\n";
echo "".$text['description-destination']." <br /><br />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-phone'].":\n";
echo " ".$text['label-phone'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <textarea class='formfld' type='text' name='broadcast_phone_numbers' rows='10'>$broadcast_phone_numbers</textarea>\n";
echo "<br />\n";
echo "".$content['description-phone']." <br /><br />\n";
echo "".$text['description-phone']." <br /><br />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$content['label-description'].":\n";
echo " ".$text['label-description'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_description' maxlength='255' value=\"$broadcast_description\">\n";
echo "<br />\n";
echo "".$content['description-info']."\n";
echo "".$text['description-info']."\n";
echo "</td>\n";
echo "</tr>\n";
@@ -390,10 +385,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <td colspan='2' align='right'>\n";
if ($action == "update") {
echo " <input type='hidden' name='call_broadcast_uuid' value='$call_broadcast_uuid'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='v_call_broadcast_send.php?call_broadcast_uuid=$call_broadcast_uuid'\" value='".$content['button-send']."'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='v_call_broadcast_send.php?call_broadcast_uuid=$call_broadcast_uuid'\" value='".$text['button-send']."'>\n";
}
echo " <input type='submit' name='submit' class='btn' value='".$content['button-save']."'>\n";
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo " </td>\n";
echo " </tr>";
echo "</table>";
@@ -555,12 +550,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
*/
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</div>";
require_once "includes/footer.php";
?>
+5 -5
View File
@@ -36,8 +36,8 @@ else {
//add multi-lingual support
require_once "app_languages.php";
foreach($content_broadcast as $key => $value) {
$content[$key] = $value[$_SESSION['domain']['language']['code']];
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//set the max execution time to 1 hour
@@ -122,7 +122,7 @@ function cmd_async($cmd) {
echo "<div align='center'>\n";
echo "<table width='40%'>\n";
echo "<tr>\n";
echo "<th align='left'>".$content['label-message']."</th>\n";
echo "<th align='left'>".$text['label-message']."</th>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='row_style1'><strong>$msg</strong></td>\n";
@@ -201,12 +201,12 @@ function cmd_async($cmd) {
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='row_style1' align='center'>\n";
echo " <strong>".$content['label-call-broadcast']." $broadcast_name ".$content['label-hasbeen']."</strong>\n";
echo " <strong>".$text['label-call-broadcast']." $broadcast_name ".$text['label-has-been']."</strong>\n";
echo " <br /><br />\n";
echo " <table width='100%'>\n";
echo " <tr>\n";
echo " <td align='center'>\n";
echo " <a href='".PROJECT_PATH."/app/calls_active/v_calls_active.php'>".$content['label-viewcalls']."</a>\n";
echo " <a href='".PROJECT_PATH."/app/calls_active/v_calls_active.php'>".$text['label-view-calls']."</a>\n";
echo " </td>\n";
echo " </table>\n";
echo "</td>\n";