diff --git a/account.php b/account.php index 255ac77610a266b29cd71371599e585ed2d91cbf..e8bcaf07a0270ef61c18cd300e42ada49391449f 100644 --- a/account.php +++ b/account.php @@ -72,7 +72,7 @@ elseif ($_POST) { $user_form->getField('email')->addError( sprintf(__('Email already registered. Would you like to %1$s sign in %2$s?'), '<a href="login.php?e='.urlencode($addr).'" style="color:inherit"><strong>', - '</strong></a>'); + '</strong></a>')); $errors['err'] = __('Unable to register account. See messages below'); } // Users created from ClientCreateRequest diff --git a/client.inc.php b/client.inc.php index 856943c0be6cacd65d5adb9ce52db9ebc614a168..3b8b41014955dbab1a2b69a3fa578b51f7d643dd 100644 --- a/client.inc.php +++ b/client.inc.php @@ -46,6 +46,11 @@ $msg=''; $nav=null; //Make sure the user is valid..before doing anything else. $thisclient = UserAuthenticationBackend::getUser(); + +// Bootstrap gettext translations as early as possible, but after attempting +// to sign on the agent +TextDomain::configureForUser($thisclient); + //is the user logged in? if($thisclient && $thisclient->getId() && $thisclient->isValid()){ $thisclient->refreshSession(); diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index c32f170d02656aa39530d491f8549d70ffbc002e..817d4694615c0976a1e87c9c91fd338d34e1b978 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -251,7 +251,8 @@ class TicketsAjaxAPI extends AjaxController { $uid = md5($_SERVER['QUERY_STRING']); $_SESSION["adv_$uid"] = $tickets; $result['success'] = sprintf(__("Search criteria matched %s"), - _N('%d ticket', '%d tickets', count($tickets))) + sprintf(_N('%d ticket', '%d tickets', count($tickets), + $tickets))) . " - <a href='tickets.php?advsid=$uid'>".__('view')."</a>"; } else { $result['fail']=__('No tickets found matching your search criteria.'); diff --git a/include/class.forms.php b/include/class.forms.php index c3f1ff2c2133b21b1c60ef6c01f87f4de689ffbd..126aaaf741050fa2e8e094d06b4b6912a1df5d04 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -919,7 +919,7 @@ class PriorityField extends ChoiceField { return $this->to_php(null, $id); } - function to_php($value, $id) { + function to_php($value, $id=false) { return Priority::lookup($id); } @@ -1252,7 +1252,8 @@ class ThreadEntryWidget extends Widget { && ($thisclient && $thisclient->isValid()))) { ?> <div class="clear"></div> <hr/> - <div><strong style="padding-right:1em;vertical-align:top">Attachments: </strong> + <div><strong style="padding-right:1em;vertical-align:top"><?php + echo __('Attachments'); ?>: </strong> <div style="display:inline-block"> <div class="uploads" style="display:block"></div> <input type="file" class="multifile" name="attachments[]" id="attachments" size="30" value="" /> diff --git a/include/staff/apikeys.inc.php b/include/staff/apikeys.inc.php index e363d031ced3dea95e071ebb102b928610fa4416..43c8d4f7fcc922d07656d60ccf631f15a3fa9ae5 100644 --- a/include/staff/apikeys.inc.php +++ b/include/staff/apikeys.inc.php @@ -55,7 +55,7 @@ else <tr> <th width="7"> </th> <th width="320"><a <?php echo $key_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=key"><?php echo __('API Key');?></a></th> - <th width="120"><a <?php echo $ip_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Addr.');?></a></th> + <th width="120"><a <?php echo $ip_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Address');?></a></th> <th width="100"><a <?php echo $status_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th> <th width="150" nowrap><a <?php echo $date_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=date"><?php echo __('Date Added');?></a></th> <th width="150" nowrap><a <?php echo $updated_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th> diff --git a/include/staff/attachment.inc.php b/include/staff/attachment.inc.php deleted file mode 100644 index 6027678123ca55684c721ae72f98133135f603f7..0000000000000000000000000000000000000000 --- a/include/staff/attachment.inc.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -if(!defined('OSTADMININC') || !$thisstaff->isAdmin()) die('Access Denied'); -//Get the config info. -$config=($errors && $_POST)?Format::input($_POST):$cfg->getConfigInfo(); -?> -<table width="100%" border="0" cellspacing=0 cellpadding=0> - <form action="admin.php?t=attach" method="post"> - <input type="hidden" name="t" value="attach"> - <tr> - <td> - <table width="100%" border="0" cellspacing=0 cellpadding=2 class="tform"> - <tr class="header"> - <td colspan=2> Attachments Settings</td> - </tr> - <tr class="subheader"> - <td colspan=2"> - Before enabling attachments make sure you understand the security settings and issues related to file uploads.</td> - </tr> - <tr> - <th width="165">Allow Attachments:</th> - <td> - <input type="checkbox" name="allow_attachments" <?php echo $config['allow_attachments'] ?'checked':''; ?>><b>Allow Attachments</b> - (<i>Global Setting</i>) - <font class="error"> <?php echo $errors['allow_attachments']; ?></font> - </td> - </tr> - <tr> - <th>Emailed Attachments:</th> - <td> - <input type="checkbox" name="allow_email_attachments" <?php echo $config['allow_email_attachments'] ? 'checked':''; ?> > Accept emailed files - <font class="warn"> <?php echo $warn['allow_email_attachments']; ?></font> - </td> - </tr> - <tr> - <th>Online Attachments:</th> - <td> - <input type="checkbox" name="allow_online_attachments" <?php echo $config['allow_online_attachments'] ?'checked':''; ?> > - Allow online attachments upload<br/> - <input type="checkbox" name="allow_online_attachments_onlogin" <?php echo $config['allow_online_attachments_onlogin'] ?'checked':''; ?> > - Authenticated users Only. (<i>User must be logged in to upload files </i>) - <font class="warn"> <?php echo $warn['allow_online_attachments']; ?></font> - </td> - </tr> - <tr> - <th>Staff Response Files:</th> - <td> - <input type="checkbox" name="email_attachments" <?php echo $config['email_attachments']?'checked':''; ?> >Email attachments to the user - </td> - </tr> - <tr> - <th nowrap>Maximum File Size:</th> - <td> - <input type="text" name="max_file_size" value="<?php echo $config['max_file_size']; ?>"> <i>bytes</i> - <font class="error"> <?php echo $errors['max_file_size']; ?></font> - </td> - </tr> - <tr> - <th>Attachment Folder:</th> - <td> - Web user (e.g apache) must have write access to the folder. <font class="error"> <?php echo $errors['upload_dir']; ?></font><br> - <input type="text" size=60 name="upload_dir" value="<?php echo $config['upload_dir']; ?>"> - <font color=red> - <?php echo $attwarn; ?> - </font> - </td> - </tr> - <tr> - <th valign="top"><br/>Accepted File Types:</th> - <td> - Enter file extensions allowed separated by a comma. e.g <i>.doc, .pdf, </i> <br> - To accept all files enter wildcard <b><i>.*</i></b> i.e dotStar (NOT recommended). - <textarea name="allowed_filetypes" cols="21" rows="4" style="width: 65%;" wrap=HARD ><?php echo $config['allowed_filetypes']; ?></textarea> - </td> - </tr> - </table> - </td></tr> - <tr><td style="padding:10px 0 10px 200px"> - <input class="button" type="submit" name="submit" value="Save Changes"> - <input class="button" type="reset" name="reset" value="Reset Changes"> - </td></tr> - </form> -</table> diff --git a/include/staff/cannedresponses.inc.php b/include/staff/cannedresponses.inc.php index 853242f98e3ddafb0737b393d3c163c4c90fe4ed..0e73eb8051257aab43ea377749bfa882da564258 100644 --- a/include/staff/cannedresponses.inc.php +++ b/include/staff/cannedresponses.inc.php @@ -42,7 +42,8 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC'); $query="$sql GROUP BY canned.canned_id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit(); $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=$pageNav->showing().' '.__('premade responses'); + $showing=$pageNav->showing().' '._N('premade response', 'premade responses', + $total); else $showing=__('No premade responses found!'); diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php index 3437f72ae8f398eb643c3840b3d27dec113b0aba..53d30908c9b324be7e0a1ce3db0554cc15e0c30f 100644 --- a/include/staff/department.inc.php +++ b/include/staff/department.inc.php @@ -224,21 +224,21 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong><?php echo _('Alerts and Notices'); ?>:</strong> + <em><strong><?php echo __('Alerts and Notices'); ?>:</strong> <i class="help-tip icon-question-sign" href="#group_membership"></i></em> </th> </tr> <tr> <td width="180"> - <?php echo _('Recipients'); ?>: + <?php echo __('Recipients'); ?>: </td> <td> <span> <select name="group_membership"> <?php foreach (array( - Dept::ALERTS_DISABLED => _("No one (disable Alerts and Notices)"), - Dept::ALERTS_DEPT_ONLY => _("Department members only"), - Dept::ALERTS_DEPT_AND_GROUPS => _("Department and Group members"), + Dept::ALERTS_DISABLED => __("No one (disable Alerts and Notices)"), + Dept::ALERTS_DEPT_ONLY => __("Department members only"), + Dept::ALERTS_DEPT_AND_GROUPS => __("Department and Group members"), ) as $mode=>$desc) { ?> <option value="<?php echo $mode; ?>" <?php if ($info['group_membership'] == $mode) echo 'selected="selected"'; diff --git a/include/staff/departments.inc.php b/include/staff/departments.inc.php index 288ba30c7c6b6e6571859ad55bb763be9cd1bda5..4cbcda17eeb84cdd50d3983aa5fa6dbe846fadf1 100644 --- a/include/staff/departments.inc.php +++ b/include/staff/departments.inc.php @@ -35,7 +35,8 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC'); $query="$sql GROUP BY dept.dept_id ORDER BY $order_by"; $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=sprintf(__('Showing 1-%1$d of %2$d departments'),$num,$num); + $showing=sprintf(_N('Showing %d department', 'Showing %d departments', + $num),$num); else $showing=__('No departments found!'); diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php index 5f9905c40807faad2d30df2d49a1d0d0c1f5744c..94f568698861f3fceb0f3d9b4fe0731d558fc0b4 100644 --- a/include/staff/dynamic-form.inc.php +++ b/include/staff/dynamic-form.inc.php @@ -2,17 +2,17 @@ $info=array(); if($form && $_REQUEST['a']!='add') { - $title = 'Update custom form section'; + $title = __('Update custom form section'); $action = 'update'; $url = "?id=".urlencode($_REQUEST['id']); - $submit_text='Save Changes'; + $submit_text=__('Save Changes'); $info = $form->ht; $newcount=2; } else { - $title = 'Add new custom form section'; + $title = __('Add new custom form section'); $action = 'add'; $url = '?a=add'; - $submit_text='Add Form'; + $submit_text=__('Add Form'); $newcount=4; } $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); @@ -23,20 +23,21 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <input type="hidden" name="do" value="<?php echo $action; ?>"> <input type="hidden" name="a" value="<?php echo $action; ?>"> <input type="hidden" name="id" value="<?php echo $info['id']; ?>"> - <h2>Custom Form</h2> + <h2><?php echo __('Custom Form'); ?></h2> <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th colspan="2"> <h4><?php echo $title; ?></h4> - <em>Custom forms are used to allow custom data to be - associated with tickets</em> + <em><?php echo __( + 'Custom forms are used to allow custom data to be associated with tickets' + ); ?></em> </th> </tr> </thead> <tbody style="vertical-align:top"> <tr> - <td width="180" class="required">Title:</td> + <td width="180" class="required"><?php echo __('Title'); ?>:</td> <td><input type="text" name="title" size="40" value="<?php echo $info['title']; ?>"/> <i class="help-tip icon-question-sign" href="#form_title"></i> @@ -45,7 +46,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> </tr> <tr> - <td width="180">Instructions:</td> + <td width="180"><?php echo __('Instructions'); ?>:</td> <td><textarea name="instructions" rows="3" cols="40"><?php echo $info['instructions']; ?></textarea> <i class="help-tip icon-question-sign" href="#form_instructions"></i> @@ -58,17 +59,20 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <thead> <tr> <th colspan="7"> - <em><strong>User Information Fields</strong> more information here</em> + <em><strong><?php echo __('User Information Fields'); ?></strong> + <?php echo sprintf(__('(These fields are requested for new tickets + via the %s form)', + UserForm::objects()->one()->get('title'))); ?></em> </th> </tr> <tr> <th></th> - <th>Label</th> - <th>Type</th> - <th>Internal</th> - <th>Required</th> - <th>Variable</th> - <th>Delete</th> + <th><?php echo __('Label'); ?></th> + <th><?php echo __('Type'); ?></th> + <th><?php echo __('Internal'); ?></th> + <th><?php echo __('Required'); ?></th> + <th><?php echo __('Variable'); ?></th> + <th><?php echo __('Delete'); ?></th> </tr> </thead> <tbody> @@ -94,23 +98,24 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <thead> <tr> <th colspan="7"> - <em><strong>Form Fields</strong> fields available for ticket information</em> + <em><strong><?php echo __('Form Fields'); ?></strong> + <?php echo __('fields available where this form is used'); ?></em> </th> </tr> <tr> - <th nowrap>Sort + <th nowrap><?php echo __('Sort'); ?> <i class="help-tip icon-question-sign" href="#field_sort"></i></th> - <th nowrap>Label + <th nowrap><?php echo __('Label'); ?> <i class="help-tip icon-question-sign" href="#field_label"></i></th> - <th nowrap>Type + <th nowrap><?php echo __('Type'); ?> <i class="help-tip icon-question-sign" href="#field_type"></i></th> - <th nowrap>Internal + <th nowrap><?php echo __('Internal'); ?> <i class="help-tip icon-question-sign" href="#field_internal"></i></th> - <th nowrap>Required + <th nowrap><?php echo __('Required'); ?> <i class="help-tip icon-question-sign" href="#field_required"></i></th> - <th nowrap>Variable + <th nowrap><?php echo __('Variable'); ?> <i class="help-tip icon-question-sign" href="#field_variable"></i></th> - <th nowrap>Delete + <th nowrap><?php echo __('Delete'); ?> <i class="help-tip icon-question-sign" href="#field_delete"></i></th> </tr> </thead> @@ -153,7 +158,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); $('#field-config .body').load($(this).attr('href').substr(1)); $('#field-config').show(); return false; - "><i class="icon-edit"></i> Config</a> + "><i class="icon-edit"></i> <?php echo __('Config'); ?></a> <?php } ?> <div class="error" style="white-space:normal"><?php if ($ferrors['type']) echo $ferrors['type']; @@ -221,7 +226,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tbody> <tr> <th colspan="7"> - <em><strong>Internal Notes:</strong> be liberal, they're internal</em> + <em><strong><?php echo __('Internal Notes'); ?>:</strong> + <?php echo __("be liberal, they're internal"); ?></em> </th> </tr> <tr> @@ -239,16 +245,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </p> <div style="display:none;" class="draggable dialog" id="delete-confirm"> - <h3><i class="icon-trash"></i> Remove Existing Data?</h3> + <h3><i class="icon-trash"></i> <?php echo __('Remove Existing Data?'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p> <strong>You are about to delete <span id="deleted-count"></span> fields.</strong> - Would you also like to remove data currently entered for this field? - <em>If you opt not to remove the data now, you will have the option - to delete the the data when editing it</em> + <?php echo __('Would you also like to remove data currently entered for this field? <em> If you opt not to remove the data now, you will have the option to delete the the data when editing it.</em>'); ?> </p><p style="color:red"> - Deleted data CANNOT be recovered. + <?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <hr> <div id="deleted-fields"></div> @@ -281,7 +285,8 @@ $('form.manage-form').on('submit.inline', function(e) { .append($('<input/>').attr({type:'checkbox',name:'delete-data-' + $(e).data('fieldId')}) ).append($('<strong>').html( - 'Remove all data entered for <u>' + $(e).data('fieldLabel') + '</u>' + '<?php echo __('Remove all data entered for <u> %s </u>?'); + ?>'.replace('%s', $(e).data('fieldLabel')) )) ); }); diff --git a/include/staff/dynamic-forms.inc.php b/include/staff/dynamic-forms.inc.php index 9709d0cec199a07b8050db7c7b48e34b506f47a0..fb7ea48a4ee184be791e585809a50468c30d22dd 100644 --- a/include/staff/dynamic-forms.inc.php +++ b/include/staff/dynamic-forms.inc.php @@ -1,5 +1,5 @@ <div style="width:700;padding-top:5px; float:left;"> - <h2>Custom Forms</h2> + <h2><?php echo __('Custom Forms'); ?></h2> </div> <div style="float:right;text-align:right;padding-top:5px;padding-right:5px;"> <b><a href="forms.php?a=add" class="Icon form-add">Add New Custom Form</a></b></div> @@ -10,7 +10,7 @@ $page = ($_GET['p'] && is_numeric($_GET['p'])) ? $_GET['p'] : 1; $count = DynamicForm::objects()->filter(array('type__in'=>array('G')))->count(); $pageNav = new Pagenate($count, $page, PAGE_LIMIT); $pageNav->setURL('forms.php'); -$showing=$pageNav->showing().' forms'; +$showing=$pageNav->showing().' '._N('form','forms',$count); ?> <form action="forms.php" method="POST" name="forms"> @@ -21,8 +21,8 @@ $showing=$pageNav->showing().' forms'; <thead> <tr> <th width="7"> </th> - <th>Built-in Forms</th> - <th>Last Updated</th> + <th><?php echo __('Built-in Forms'); ?></th> + <th><?php echo __('Last Updated'); ?></th> </tr> </thead> <tbody> @@ -49,8 +49,8 @@ $showing=$pageNav->showing().' forms'; <thead> <tr> <th width="7"> </th> - <th>Custom Forms</th> - <th>Last Updated</th> + <th><?php echo __('Custom Forms'); ?></th> + <th><?php echo __('Last Updated'); ?></th> </tr> </thead> <tbody> @@ -76,12 +76,14 @@ $showing=$pageNav->showing().' forms'; <tr> <td colspan="3"> <?php if($count){ ?> - Select: - <a id="selectAll" href="#ckb">All</a> - <a id="selectNone" href="#ckb">None</a> - <a id="selectToggle" href="#ckb">Toggle</a> + <?php echo __('Select'); ?>: + <a id="selectAll" href="#ckb"><?php echo __('All'); ?></a> + <a id="selectNone" href="#ckb"><?php echo __('None'); ?></a> + <a id="selectToggle" href="#ckb"><?php echo __('Toggle'); ?></a> <?php }else{ - echo 'No extra forms defined yet — <a href="forms.php?a=add">add one!</a>'; + echo sprintf(__( + 'No extra forms defined yet — %s add one! %s'), + '<a href="forms.php?a=add">','</a>'); } ?> </td> </tr> @@ -89,7 +91,7 @@ $showing=$pageNav->showing().' forms'; </table> <?php if ($count) //Show options.. - echo '<div> Page:'.$pageNav->getPageLinks().' </div>'; + echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <p class="centered" id="actions"> <input class="button" type="submit" name="delete" value="Delete"> @@ -97,14 +99,15 @@ if ($count) //Show options.. </form> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> - <font color="red"><strong>Are you sure you want to DELETE selected forms?</strong></font> - <br><br>Deleted forms CANNOT be recovered. + <font color="red"><strong><?php echo __( + 'Are you sure you want to DELETE selected forms?'); ?></strong></font> + <br><br><?php echo __('Deleted forms CANNOT be recovered.'); ?> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> diff --git a/include/staff/dynamic-list.inc.php b/include/staff/dynamic-list.inc.php index 32b8921e0707c4bd741f89efe33584c05af468f8..6a1d67f6b71725dfa5d7d722bc1f49387e3d730e 100644 --- a/include/staff/dynamic-list.inc.php +++ b/include/staff/dynamic-list.inc.php @@ -2,15 +2,15 @@ $info=array(); if($list && !$errors) { - $title = 'Update custom list'; + $title = __('Update custom list'); $action = 'update'; - $submit_text='Save Changes'; + $submit_text = __('Save Changes'); $info = $list->ht; $newcount=2; } else { - $title = 'Add new custom list'; + $title = __('Add new custom list'); $action = 'add'; - $submit_text='Add List'; + $submit_text = __('Add List'); $newcount=4; } $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); @@ -21,15 +21,15 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <input type="hidden" name="do" value="<?php echo $action; ?>"> <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>"> <input type="hidden" name="id" value="<?php echo $info['id']; ?>"> - <h2>Custom List</h2> + <h2><?php echo __('Custom List'); ?></h2> <ul class="tabs"> <li><a href="#definition" class="active"> - <i class="icon-plus"></i> Definition</a></li> + <i class="icon-plus"></i> <?php echo __('Definition'); ?></a></li> <li><a href="#items"> - <i class="icon-list"></i> Items</a></li> + <i class="icon-list"></i> <?php echo __('Items'); ?></a></li> <li><a href="#properties"> - <i class="icon-asterisk"></i> Properties</a></li> + <i class="icon-asterisk"></i> <?php echo __('Properties'); ?></a></li> </ul> <div id="definition" class="tab_content"> @@ -38,22 +38,24 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <h4><?php echo $title; ?></h4> - <em>Custom lists are used to provide drop-down lists for custom forms. <i class="help-tip icon-question-sign" href="#custom_lists"></i></em> + <em><?php echo __( + 'Custom lists are used to provide drop-down lists for custom forms.' + ); ?> <i class="help-tip icon-question-sign" href="#custom_lists"></i></em> </th> </tr> </thead> <tbody> <tr> - <td width="180" class="required">Name:</td> + <td width="180" class="required"><?php echo __('Name'); ?>:</td> <td><input size="50" type="text" name="name" value="<?php echo $info['name']; ?>"/> <span class="error">*<br/><?php echo $errors['name']; ?></td> </tr> <tr> - <td width="180">Plural Name:</td> + <td width="180"><?php echo __('Plural Name'); ?>:</td> <td><input size="50" type="text" name="name_plural" value="<?php echo $info['name_plural']; ?>"/></td> </tr> <tr> - <td width="180">Sort Order:</td> + <td width="180"><?php echo __('Sort Order'); ?>:</td> <td><select name="sort_mode"> <?php foreach (DynamicList::getSortModes() as $key=>$desc) { ?> <option value="<?php echo $key; ?>" <?php @@ -66,7 +68,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tbody> <tr> <th colspan="7"> - <em><strong>Internal Notes:</strong> be liberal, they're internal</em> + <em><strong><?php echo __('Internal Notes'); ?>:</strong> + <?php echo __("be liberal, they're internal"); ?></em> </th> </tr> <tr> @@ -83,15 +86,16 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <thead> <tr> <th colspan="7"> - <em><strong>Item Properties</strong> properties definable for each item</em> + <em><strong><?php echo __('Item Properties'); ?></strong> + <?php echo __('properties definable for each item'); ?></em> </th> </tr> <tr> - <th nowrap>Sort</th> - <th nowrap>Label</th> - <th nowrap>Type</th> - <th nowrap>Variable</th> - <th nowrap>Delete</th> + <th nowrap><?php echo __('Sort'); ?></th> + <th nowrap><?php echo __('Label'); ?></th> + <th nowrap><?php echo __('Type'); ?></th> + <th nowrap><?php echo __('Variable'); ?></th> + <th nowrap><?php echo __('Delete'); ?></th> </tr> </thead> <tbody class="sortable-rows" data-sort="prop-sort-"> @@ -131,7 +135,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); $('#field-config .body').load($(this).attr('href').substr(1)); $('#field-config').show(); return false; - "><i class="icon-edit"></i> Config</a> + "><i class="icon-edit"></i> <?php echo __('Config'); ?></a> <?php } ?></td> <td> <input type="text" size="20" name="name-<?php echo $id; ?>" @@ -187,10 +191,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); $count = $list->getItemCount(); $pageNav = new Pagenate($count, $page, PAGE_LIMIT); $pageNav->setURL('dynamic-list.php', 'id='.urlencode($_REQUEST['id'])); - $showing=$pageNav->showing().' list items'; - ?> - <?php } - else $showing = 'Add a few initial items to the list'; + $showing=$pageNav->showing().' '.__('list items'); + } + else $showing = __('Add a few initial items to the list'); ?> <tr> <th colspan="5"> @@ -199,10 +202,11 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th></th> - <th>Value</th> - <th>Extra <em style="display:inline">— abbreviations and such</em></th> - <th>Disabled</th> - <th>Delete</th> + <th><?php echo __('Value'); ?></th> + <th><?php echo __('Extra'); ?> <em style="display:inline">— + <?php echo __('abbreviations and such'); ?></em></th> + <th><?php echo __('Disabled'); ?></th> + <th><?php echo __('Delete'); ?></th> </tr> </thead> @@ -229,7 +233,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); $('#field-config .body').load($(this).attr('href').substr(1)); $('#field-config').show(); return false; - "><i class="icon-edit"></i> Properties</a> + "><i class="icon-edit"></i> <?php echo __('Properties'); ?></a> <?php } ?></td> <td><input type="text" size="30" name="extra-<?php echo $id; ?>" value="<?php echo $i->get('extra'); ?>"/></td> @@ -256,8 +260,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </div> <p class="centered"> <input type="submit" name="submit" value="<?php echo $submit_text; ?>"> - <input type="reset" name="reset" value="Reset"> - <input type="button" name="cancel" value="Cancel" onclick='window.location.href="?"'> + <input type="reset" name="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>" + onclick='window.location.href="?"'> </p> </form> diff --git a/include/staff/dynamic-lists.inc.php b/include/staff/dynamic-lists.inc.php index 3ef22874d6103bfefd76bc60f97eb3a31c0d8e11..ad5c6dfe9c16b13b6633c5434d17f4617aae234e 100644 --- a/include/staff/dynamic-lists.inc.php +++ b/include/staff/dynamic-lists.inc.php @@ -1,8 +1,9 @@ <div style="width:700;padding-top:5px; float:left;"> - <h2>Custom Lists</h2> + <h2><?php echo __('Custom Lists'); ?></h2> </div> <div style="float:right;text-align:right;padding-top:5px;padding-right:5px;"> - <b><a href="lists.php?a=add" class="Icon list-add">Add New Custom List</a></b></div> + <b><a href="lists.php?a=add" class="Icon list-add"><?php + echo __('Add New Custom List'); ?></a></b></div> <div class="clear"></div> <?php @@ -10,7 +11,7 @@ $page = ($_GET['p'] && is_numeric($_GET['p'])) ? $_GET['p'] : 1; $count = DynamicList::objects()->count(); $pageNav = new Pagenate($count, $page, PAGE_LIMIT); $pageNav->setURL('lists.php'); -$showing=$pageNav->showing().' custom lists'; +$showing=$pageNav->showing().' '._N('custom list', 'custom lists', $count); ?> <form action="lists.php" method="POST" name="lists"> @@ -22,9 +23,9 @@ $showing=$pageNav->showing().' custom lists'; <thead> <tr> <th width="7"> </th> - <th>List Name</th> - <th>Created</th> - <th>Last Updated</th> + <th><?php echo __('List Name'); ?></th> + <th><?php echo __('Created') ?></th> + <th><?php echo __('Last Updated'); ?></th> </tr> </thead> <tbody> @@ -49,12 +50,13 @@ $showing=$pageNav->showing().' custom lists'; <tr> <td colspan="4"> <?php if($count){ ?> - Select: - <a id="selectAll" href="#ckb">All</a> - <a id="selectNone" href="#ckb">None</a> - <a id="selectToggle" href="#ckb">Toggle</a> + <?php echo __('Select'); ?>: + <a id="selectAll" href="#ckb"><?php echo __('All'); ?></a> + <a id="selectNone" href="#ckb"><?php echo __('None'); ?></a> + <a id="selectToggle" href="#ckb"><?php echo __('Toggle'); ?></a> <?php } else { - echo 'No custom lists defined yet — add one!'; + echo sprintf(__('No custom lists defined yet — %s add one %s!'), + '<a href="lists.php?a=add">','</a>'); } ?> </td> </tr> @@ -62,7 +64,7 @@ $showing=$pageNav->showing().' custom lists'; </table> <?php if ($count) //Show options.. - echo '<div> Page:'.$pageNav->getPageLinks().' </div>'; + echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <p class="centered" id="actions"> @@ -71,14 +73,15 @@ if ($count) //Show options.. </form> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> - <font color="red"><strong>Are you sure you want to DELETE selected lists?</strong></font> - <br><br>Deleted forms CANNOT be recovered. + <font color="red"><strong><?php echo __( + 'Are you sure you want to DELETE selected lists?'); ?></strong></font> + <br><br><?php echo __('Deleted forms CANNOT be recovered.'); ?> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php index 4e217ccb80acd4a6b1a6cdd584d79150ea3d86d2..3300200f940adf1fc532b3ce5f03303e9f097483 100644 --- a/include/staff/email.inc.php +++ b/include/staff/email.inc.php @@ -71,7 +71,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong>New Ticket Settings</strong></em> + <em><strong><?php echo __('New Ticket Settings'); ?></strong></em> </th> </tr> <tr> @@ -81,7 +81,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <td> <span> <select name="dept_id"> - <option value="0" selected="selected">— System Default —</option> + <option value="0" selected="selected">— <?php + echo __('System Default'); ?> —</option> <?php $sql='SELECT dept_id, dept_name FROM '.DEPT_TABLE.' dept ORDER by dept_name'; if(($res=db_query($sql)) && db_num_rows($res)){ @@ -104,7 +105,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <td> <span> <select name="priority_id"> - <option value="0" selected="selected">— System Default —</option> + <option value="0" selected="selected">— <?php + echo __('System Default'); ?> —</option> <?php $sql='SELECT priority_id, priority_desc FROM '.PRIORITY_TABLE.' pri ORDER by priority_urgency DESC'; if(($res=db_query($sql)) && db_num_rows($res)){ @@ -243,7 +245,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr><td><?php echo __('Emails Per Fetch'); ?></td> <td> <span> - <input type="text" name="mail_fetchmax" size=4 value="<?php echo $info['mail_fetchmax']?$info['mail_fetchmax']:''; ?>"> emails + <input type="text" name="mail_fetchmax" size=4 value="<?php echo + $info['mail_fetchmax']?$info['mail_fetchmax']:''; ?>"> + <?php echo __('emails'); ?> <i class="help-tip icon-question-sign" href="#emails_per_fetch"></i> <font class="error"> <?php echo $errors['mail_fetchmax']; ?></font> </span> @@ -308,13 +312,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <td><?php echo __('Header Spoofing'); ?></td> <td> <label><input type="checkbox" name="smtp_spoofing" value="1" <?php echo $info['smtp_spoofing'] ?'checked="checked"':''; ?>> - Allow for this Email Address</label> + <?php echo __('Allow for this Email Address'); ?></label> <i class="help-tip icon-question-sign" href="#header_spoofing"></i> </td> </tr> <tr> <th colspan="2"> - <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("Admin's notes.");?> <span class="error"> <?php echo $errors['notes']; ?></span></em> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php + echo __("be liberal, they're internal.");?> <span class="error"> <?php echo $errors['notes']; ?></span></em> </th> </tr> <tr> diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php index 73724f98b414d98e8dd1768225480c7aa4d8769b..8cda5c0051e9a88ebf1fc1021bb1de8bc23b46dc 100644 --- a/include/staff/filter.inc.php +++ b/include/staff/filter.inc.php @@ -53,7 +53,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </td> <td> <input type="text" size="6" name="execorder" value="<?php echo $info['execorder']; ?>"> - <em>(1...99 )</em> + <em>(1...99)</em> <span class="error">* <?php echo $errors['execorder']; ?></span> <input type="checkbox" name="stop_onmatch" value="1" <?php echo $info['stop_onmatch']?'checked="checked"':''; ?> > @@ -133,10 +133,11 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <option value="">— <?php echo __('Select One');?> —</option> <?php foreach ($matches as $group=>$ms) { ?> - <optgroup label="<?php echo $group; ?>"><?php + <optgroup label="<?php echo __($group); ?>"><?php foreach ($ms as $k=>$v) { $sel=($info["rule_w$i"]==$k)?'selected="selected"':''; - echo sprintf('<option value="%s" %s>%s</option>',$k,$sel,$v); + echo sprintf('<option value="%s" %s>%s</option>', + $k,$sel,__($v)); } ?> </optgroup> <?php } ?> @@ -146,7 +147,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <?php foreach($match_types as $k=>$v){ $sel=($info["rule_h$i"]==$k)?'selected="selected"':''; - echo sprintf('<option value="%s" %s>%s</option>',$k,$sel,$v); + echo sprintf('<option value="%s" %s>%s</option>', + $k,$sel,__($v)); } ?> </select> @@ -330,11 +332,12 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <td width="180"> - Help Topic + <?php echo __('Help Topic'); ?> </td> <td> <select name="topic_id"> - <option value="0" selected="selected">— Unchanged —</option> + <option value="0" selected="selected">— <?php + echo __('Unchanged'); ?> —</option> <?php $sql='SELECT topic_id, topic FROM '.TOPIC_TABLE.' T ORDER by topic'; if(($res=db_query($sql)) && db_num_rows($res)){ @@ -350,7 +353,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong><?php echo __('Admin Notes');?></strong>: <?php echo __('Internal notes');?></em> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php + echo __("be liberal, they're internal");?></em> </th> </tr> <tr> diff --git a/include/staff/filters.inc.php b/include/staff/filters.inc.php index 21b79cae083db9ce42e215ca3f04ae9dce54b2f8..e3cf17a93dd41663a510f8ca2d21d0ae8eba11e8 100644 --- a/include/staff/filters.inc.php +++ b/include/staff/filters.inc.php @@ -38,7 +38,7 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC'); $query="$sql ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit(); $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=$pageNav->showing().' '.__('filters'); + $showing=$pageNav->showing().' '._N('filter', 'filters', $count); else $showing=__('No filters found!'); diff --git a/include/staff/header.inc.php b/include/staff/header.inc.php index 3f68321532e33d1de0b0f9d41b70b4f9216b5a93..931987ad52641e20ebd15cce9a7c20b8beb042b9 100644 --- a/include/staff/header.inc.php +++ b/include/staff/header.inc.php @@ -7,7 +7,7 @@ <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="x-pjax-version" content="<?php echo GIT_VERSION; ?>"> - <title><?php echo ($ost && ($title=$ost->getPageTitle()))?$title:__('osTicket :: Staff Control Panel'); ?></title> + <title><?php echo ($ost && ($title=$ost->getPageTitle()))?$title:'osTicket :: '.__('Staff Control Panel'); ?></title> <!--[if IE]> <style type="text/css"> .tip_shadow { display:block !important; } @@ -75,7 +75,7 @@ echo sprintf('<div id="notice_bar">%s</div>', $ost->getNotice()); ?> <div id="header"> - <a href="index.php" class="no-pjax" id="logo"><?php echo __('osTicket — Customer Support System'); ?></a> + <a href="index.php" class="no-pjax" id="logo">osTicket — <?php echo __('Customer Support System'); ?></a> <p id="info"><?php echo sprintf(__('Welcome, %s'), '<strong>'.$thisstaff->getFirstName().'</strong>.'); ?> <?php if($thisstaff->isAdmin() && !defined('ADMINPAGE')) { ?> @@ -84,7 +84,7 @@ | <a href="index.php" class="no-pjax"><?php echo __('Staff Panel'); ?></a> <?php } ?> | <a href="profile.php"><?php echo __('My Preferences'); ?></a> - | <a href="logout.php?auth=<?php echo $ost->getLinkToken(); ?>" class="no-pjax">Log Out</a> + | <a href="logout.php?auth=<?php echo $ost->getLinkToken(); ?>" class="no-pjax"><?php echo __('Log Out'); ?></a> </p> </div> <div id="pjax-container" class="<?php if ($_POST) echo 'no-pjax'; ?>"> @@ -98,7 +98,7 @@ if (strpos($h, '<script ') !== false) echo $h; } ?> - <title><?php echo ($ost && ($title=$ost->getPageTitle()))?$title:_('osTicket :: Staff Control Panel'); ?></title><?php + <title><?php echo ($ost && ($title=$ost->getPageTitle()))?$title:'osTicket :: '.__('Staff Control Panel'); ?></title><?php header('X-PJAX-Version: ' . GIT_VERSION); } # endif X_PJAX ?> <ul id="nav"> diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php index b3bf3ae295b8bb083745f3d2bc068e0ed5ea07c2..5b39046171ff81a921b0e8c47d1fa8165cb9541a 100644 --- a/include/staff/helptopic.inc.php +++ b/include/staff/helptopic.inc.php @@ -88,14 +88,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr><th colspan="2"><em><?php echo __('New ticket options');?></em></th></tr> <tr> - <td><strong><?php echo _('Custom Form'); ?></strong>:</td> + <td><strong><?php echo __('Custom Form'); ?></strong>:</td> <td><select name="form_id"> <option value="0" <?php if ($info['form_id'] == '0') echo 'selected="selected"'; - ?>>— <?php echo _('None'); ?> —</option> + ?>>— <?php echo __('None'); ?> —</option> <option value="<?php echo Topic::FORM_USE_PARENT; ?>" <?php if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"'; - ?>>— <?php echo _('Use Parent Form'); ?> —</option> + ?>>— <?php echo __('Use Parent Form'); ?> —</option> <?php foreach (DynamicForm::objects()->filter(array('type'=>'G')) as $group) { ?> <option value="<?php echo $group->get('id'); ?>" <?php if ($group->get('id') == $info['form_id']) @@ -219,7 +219,7 @@ if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"'; $selected = ($info['assign']==$k || $info['team_id']==$id)?'selected="selected"':''; if (!$isenabled) - $name .= ' '.__('(Disabled)'); + $name .= ' '.mb_convert_encoding(__('(disabled)'), MB_CASE_TITLE); ?> <option value="<?php echo $k; ?>"<?php echo $selected; ?>><?php echo $name; ?></option> <?php @@ -244,7 +244,7 @@ if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"'; </tr> <tr> <th colspan="2"> - <em><strong><?php echo __('Admin Notes');?></strong>: <?php echo __('Internal notes about the help topic.');?></em> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __("be liberal, they're internal.");?></em> </th> </tr> <tr> diff --git a/include/staff/helptopics.inc.php b/include/staff/helptopics.inc.php index ea7bbc5013b76ae7faf4c1692dc496b41ef9fe84..5533a01d1904c2bf39deb26463243836e2025963 100644 --- a/include/staff/helptopics.inc.php +++ b/include/staff/helptopics.inc.php @@ -15,9 +15,9 @@ $page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1; $query="$sql ORDER BY $order_by"; $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=sprintf(__('Showing %d help topics'), $num); + $showing=sprintf(_N('Showing %d help topic', 'Showing %d help topics'), $num); else - $showing=__('No help topic found!'); + $showing=__('No help topics found!'); // Get the full names and filter for this page $topics = array(); diff --git a/include/staff/login.header.php b/include/staff/login.header.php index 7fecca1735d3196074a756d3cac68f2e8889ce01..a3d98f024a1def1a02e3b3f9eb77a844d41b5086 100644 --- a/include/staff/login.header.php +++ b/include/staff/login.header.php @@ -6,7 +6,7 @@ defined('OSTSCPINC') or die('Invalid path'); <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="refresh" content="7200" /> - <title>osTicket:: SCP Login</title> + <title>osTicket :: <?php echo __('Staff Panel Login'); ?></title> <link rel="stylesheet" href="css/login.css" type="text/css" /> <link type="text/css" rel="stylesheet" href="<?php echo ROOT_PATH; ?>css/font-awesome.min.css"> <meta name="robots" content="noindex" /> diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php index f3f9ace7b9e22368afcd495fa66f7f2186cdc106..d154c75153daaf2bf5878f000d51aca84c261fa1 100644 --- a/include/staff/login.tpl.php +++ b/include/staff/login.tpl.php @@ -3,7 +3,7 @@ include_once(INCLUDE_DIR.'staff/login.header.php'); $info = ($_POST && $errors)?Format::htmlchars($_POST):array(); ?> <div id="loginBox"> - <h1 id="logo"><a href="index.php"><?php echo __('osTicket Staff Control Panel');?></a></h1> + <h1 id="logo"><a href="index.php">osTicket :: <?php echo __('Staff Control Panel');?></a></h1> <h3><?php echo Format::htmlchars($msg); ?></h3> <div class="banner"><small><?php echo ($content) ? Format::display($content->getBody()) : ''; ?></small></div> <form action="login.php" method="post"> diff --git a/include/staff/org-view.inc.php b/include/staff/org-view.inc.php index b893c9f3fd495b03c241d9b3744844fa62d0a8b5..08ea2e6c19f0fddadf3b19049818b4af8e66f746 100644 --- a/include/staff/org-view.inc.php +++ b/include/staff/org-view.inc.php @@ -10,18 +10,20 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path') </td> <td width="50%" class="right_align has_bottom_border"> <span class="action-button" data-dropdown="#action-dropdown-more"> - <span ><i class="icon-cog"></i> More</span> + <span ><i class="icon-cog"></i> <?php echo __('More'); ?></span> <i class="icon-caret-down"></i> </span> <a id="org-delete" class="action-button org-action" - href="#orgs/<?php echo $org->getId(); ?>/delete"><i class="icon-trash"></i> Delete Organization</a> + href="#orgs/<?php echo $org->getId(); ?>/delete"><i class="icon-trash"></i> + <?php echo __('Delete Organization'); ?></a> <div id="action-dropdown-more" class="action-dropdown anchor-right"> <ul> <li><a href="#ajax.php/orgs/<?php echo $org->getId(); ?>/forms/manage" onclick="javascript: $.dialog($(this).attr('href').substr(1), 201); return false" - ><i class="icon-paste"></i> Manage Forms</a></li> + ><i class="icon-paste"></i> + <?php echo __('Manage >Forms'); ?></a></li> </ul> </div> </td> @@ -32,7 +34,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path') <td width="50%"> <table border="0" cellspacing="" cellpadding="4" width="100%"> <tr> - <th width="150">Name:</th> + <th width="150"><?php echo __('Name'); ?>:</th> <td><b><a href="#orgs/<?php echo $org->getId(); ?>/edit" class="org-action"><i class="icon-edit"></i> <?php echo @@ -40,7 +42,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path') ?></a></td> </tr> <tr> - <th>Account Manager:</th> + <th><?php echo __('Account Manager'); ?>:</th> <td><?php echo $org->getAccountManager(); ?> </td> </tr> </table> @@ -48,11 +50,11 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path') <td width="50%" style="vertical-align:top"> <table border="0" cellspacing="" cellpadding="4" width="100%"> <tr> - <th width="150">Created:</th> + <th width="150"><?php echo __('Created'); ?>:</th> <td><?php echo Format::db_datetime($org->getCreateDate()); ?></td> </tr> <tr> - <th>Updated:</th> + <th><?php echo __('Last Updated'); ?>:</th> <td><?php echo Format::db_datetime($org->getUpdateDate()); ?></td> </tr> </table> @@ -63,11 +65,11 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($org)) die('Invalid path') <div class="clear"></div> <ul class="tabs"> <li><a class="active" id="users_tab" href="#users"><i - class="icon-user"></i> Users</a></li> + class="icon-user"></i> <?php echo __('Users'); ?></a></li> <li><a id="tickets_tab" href="#tickets"><i - class="icon-list-alt"></i> Tickets</a></li> + class="icon-list-alt"></i> <?php echo __('Tickets'); ?></a></li> <li><a id="notes_tab" href="#notes"><i - class="icon-pushpin"></i> Notes</a></li> + class="icon-pushpin"></i> <?php echo __('Notes'); ?></a></li> </ul> <div class="tab_content" id="users"> <?php diff --git a/include/staff/orgs.inc.php b/include/staff/orgs.inc.php index 3da261f3978107a1c6df6da02e91181a589a44e1..f9662f70a3916316bea8bad95be3ce26d4d90bdb 100644 --- a/include/staff/orgs.inc.php +++ b/include/staff/orgs.inc.php @@ -70,7 +70,7 @@ $query="$select $from $where GROUP BY org.id ORDER BY $order_by LIMIT ".$pageNav $qhash = md5($query); $_SESSION['orgs_qs_'.$qhash] = $query; ?> -<h2>Organizations</h2> +<h2><?php echo __('Organizations'); ?></h2> <div style="width:700px; float:left;"> <form action="orgs.php" method="get"> <?php csrf_token(); ?> @@ -86,15 +86,16 @@ $_SESSION['orgs_qs_'.$qhash] = $query; </form> </div> <div style="float:right;text-align:right;padding-right:5px;"> - <b><a href="#orgs/add" class="Icon newDepartment add-org">Add New Organization</a></b></div> + <b><a href="#orgs/add" class="Icon newDepartment add-org"><?php + echo __('Add New Organization'); ?></a></b></div> <div class="clear"></div> <?php -$showing = $search ? 'Search Results: ' : ''; +$showing = $search ? __('Search Results').': ' : ''; $res = db_query($query); if($res && ($num=db_num_rows($res))) $showing .= $pageNav->showing(); else - $showing .= 'No organizations found!'; + $showing .= __('No organizations found!'); ?> <form action="orgs.php" method="POST" name="staff" > <?php csrf_token(); ?> @@ -104,10 +105,10 @@ else <caption><?php echo $showing; ?></caption> <thead> <tr> - <th width="400"><a <?php echo $name_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=name">Name</a></th> - <th width="100"><a <?php echo $users_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=users">Users</a></th> - <th width="150"><a <?php echo $create_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=create">Created</a></th> - <th width="145"><a <?php echo $update_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=update">Updated</a></th> + <th width="400"><a <?php echo $name_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th> + <th width="100"><a <?php echo $users_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=users"><?php echo __('Users'); ?></a></th> + <th width="150"><a <?php echo $create_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=create"><?php echo __('Created'); ?></a></th> + <th width="145"><a <?php echo $update_sort; ?> href="orgs.php?<?php echo $qstr; ?>&sort=update"><?php echo __('Last Updated'); ?></a></th> </tr> </thead> <tbody> @@ -133,10 +134,12 @@ else </table> <?php if($res && $num): //Show options.. - echo sprintf('<div> Page: %s <a class="no-pjax" - href="orgs.php?a=export&qh=%s">Export</a></div>', + echo sprintf('<div> %s: %s <a class="no-pjax" + href="orgs.php?a=export&qh=%s">%s</a></div>', + __('Page'), $pageNav->getPageLinks(), - $qhash); + $qhash, + __('Export')); endif; ?> </form> diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php index e4304c38b249c440d324d21c29fb0205790ad93e..532bfc0af8c4c9b9435b9be741ec01c433e2f3c9 100644 --- a/include/staff/page.inc.php +++ b/include/staff/page.inc.php @@ -1,26 +1,26 @@ <?php if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access Denied'); $pageTypes = array( - 'landing' => 'Landing page', - 'offline' => 'Offline page', - 'thank-you' => 'Thank you page', - 'other' => 'Other', + 'landing' => __('Landing page'), + 'offline' => __('Offline page'), + 'thank-you' => __('Thank you page'), + 'other' => __('Other'), ); $info=array(); $qstr=''; if($page && $_REQUEST['a']!='add'){ - $title='Update Page'; + $title=__('Update Page'); $action='update'; - $submit_text='Save Changes'; + $submit_text=__('Save Changes'); $info=$page->getHashtable(); $info['body'] = Format::viewableImages($page->getBody()); $info['notes'] = Format::viewableImages($info['notes']); $slug = Format::slugify($info['name']); $qstr.='&id='.$page->getId(); }else { - $title='Add New Page'; + $title=__('Add New Page'); $action='add'; - $submit_text='Add Page'; + $submit_text=__('Add Page'); $info['isactive']=isset($info['isactive'])?$info['isactive']:0; $qstr.='&a='.urlencode($_REQUEST['a']); } @@ -31,7 +31,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <input type="hidden" name="do" value="<?php echo $action; ?>"> <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>"> <input type="hidden" name="id" value="<?php echo $info['id']; ?>"> - <h2>Site Pages + <h2><?php echo __('Site Pages'); ?> <i class="help-tip icon-question-sign" href="#site_pages"></i> </h2> <table class="form_table fixed" width="940" border="0" cellspacing="0" cellpadding="2"> @@ -40,14 +40,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <h4><?php echo $title; ?></h4> - <em>Page information.</em> + <em><?php echo __('Page information'); ?></em> </th> </tr> </thead> <tbody> <tr> <td width="180" class="required"> - Name: + <?php echo __('Name'); ?>: </td> <td> <input type="text" size="40" name="name" value="<?php echo $info['name']; ?>"> @@ -56,12 +56,13 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <td width="180" class="required"> - Type: + <?php echo __('Type'); ?>: </td> <td> <span> <select name="type"> - <option value="" selected="selected">— Select Page Type —</option> + <option value="" selected="selected">— <?php + echo __('Select Page Type'); ?> —</option> <?php foreach($pageTypes as $k => $v) echo sprintf('<option value="%s" %s>%s</option>', @@ -76,7 +77,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <?php if ($info['name'] && $info['type'] == 'other') { ?> <tr> <td width="180" class="required"> - Public URL: + <?php echo __('Public URL'); ?>: </td> <td><a href="<?php echo sprintf("%s/pages/%s", $ost->getConfig()->getBaseUrl(), urlencode($slug)); @@ -86,17 +87,19 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <?php } ?> <tr> <td width="180" class="required"> - Status: + <?php echo __('Status'); ?>: </td> <td> - <input type="radio" name="isactive" value="1" <?php echo $info['isactive']?'checked="checked"':''; ?>><strong>Active</strong> - <input type="radio" name="isactive" value="0" <?php echo !$info['isactive']?'checked="checked"':''; ?>>Disabled + <input type="radio" name="isactive" value="1" <?php echo $info['isactive']?'checked="checked"':''; ?>><strong><?php echo __('Active'); ?></strong> + <input type="radio" name="isactive" value="0" <?php echo !$info['isactive']?'checked="checked"':''; ?>><?php echo __('Disabled'); ?> <span class="error">* <?php echo $errors['isactive']; ?></span> </td> </tr> <tr> <th colspan="2"> - <em><b>Page body</b>: Ticket variables are only supported in thank-you pages.<font class="error">* <?php echo $errors['body']; ?></font></em> + <em><?php echo __( + '<b>Page body</b>: Ticket variables are only supported in thank-you pages.' + ); ?><font class="error">* <?php echo $errors['body']; ?></font></em> </th> </tr> <tr> @@ -108,7 +111,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <tr> <th colspan="2"> - <em><strong>Admin Notes</strong>: Internal notes. </em> + <em><strong><?php echo __('Internal Notes'); ?></strong>: + <?php echo __("be liberal, they're internal"); ?></em> </th> </tr> <tr> @@ -121,7 +125,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </table> <p style="padding-left:225px;"> <input type="submit" name="submit" value="<?php echo $submit_text; ?>"> - <input type="reset" name="reset" value="Reset"> - <input type="button" name="cancel" value="Cancel" onclick='window.location.href="pages.php"'> + <input type="reset" name="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>" onclick='window.location.href="pages.php"'> </p> </form> diff --git a/include/staff/pages.inc.php b/include/staff/pages.inc.php index 8c2692eac9871d4836d660f98baed4c8e6ac6935..513e33deecdef89646900a9e886a36dfa53ac865 100644 --- a/include/staff/pages.inc.php +++ b/include/staff/pages.inc.php @@ -42,19 +42,19 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC'); $query="$sql $where GROUP BY page.id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit(); $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=$pageNav->showing(); + $showing=$pageNav->showing()._N('site page','site pages', $num); else - $showing='No pages found!'; + $showing=__('No pages found!'); ?> <div style="width:700px;padding-top:5px; float:left;"> - <h2>Site Pages + <h2><?php echo __('Site Pages'); ?> <i class="help-tip icon-question-sign" href="#site_pages"></i> </h2> </div> <div style="float:right;text-align:right;padding-top:5px;padding-right:5px;"> - <b><a href="pages.php?a=add" class="Icon newPage">Add New Page</a></b></div> + <b><a href="pages.php?a=add" class="Icon newPage"><?php echo __('Add New Page'); ?></a></b></div> <div class="clear"></div> <form action="pages.php" method="POST" name="tpls"> <?php csrf_token(); ?> @@ -65,11 +65,11 @@ else <thead> <tr> <th width="7"> </th> - <th width="300"><a <?php echo $name_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=name">Name</a></th> - <th width="90"><a <?php echo $type_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=type">Type</a></th> - <th width="110"><a <?php echo $status_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=status">Status</a></th> - <th width="150" nowrap><a <?php echo $created_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=created">Date Added</a></th> - <th width="150" nowrap><a <?php echo $updated_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=updated">Last Updated</a></th> + <th width="300"><a <?php echo $name_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th> + <th width="90"><a <?php echo $type_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=type"><?php echo __('Type'); ?></a></th> + <th width="110"><a <?php echo $status_sort; ?> href="pages.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th> + <th width="150" nowrap><a <?php echo $created_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=created"><?php echo __('Date Added'); ?></a></th> + <th width="150" nowrap><a <?php echo $updated_sort; ?>href="pages.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated'); ?></a></th> </tr> </thead> <tbody> @@ -92,8 +92,8 @@ else <td> <a href="pages.php?id=<?php echo $row['id']; ?>"><?php echo Format::htmlchars($row['name']); ?></a></td> <td class="faded"><?php echo $row['type']; ?></td> <td> - <?php echo $row['isactive']?'Active':'<b>Disabled</b>'; ?> - <?php echo $inuse?'<em>(in-use)</em>':''; ?> + <?php echo $row['isactive']?__('Active'):'<b>'.__('Disabled').'</b>'; ?> + <?php echo $inuse?'<em>'.__('(in-use)').'</em>':''; ?> </td> <td> <?php echo Format::db_date($row['created']); ?></td> <td> <?php echo Format::db_datetime($row['updated']); ?></td> @@ -105,12 +105,12 @@ else <tr> <td colspan="6"> <?php if($res && $num){ ?> - Select: - <a id="selectAll" href="#ckb">All</a> - <a id="selectNone" href="#ckb">None</a> - <a id="selectToggle" href="#ckb">Toggle</a> + <?php echo __('Select'); ?>: + <a id="selectAll" href="#ckb"><?php echo __('All'); ?></a> + <a id="selectNone" href="#ckb"><?php echo __('None'); ?></a> + <a id="selectToggle" href="#ckb"><?php echo __('Toggle'); ?></a> <?php }else{ - echo 'No pages found'; + echo __('No pages found!'); } ?> </td> </tr> @@ -118,12 +118,12 @@ else </table> <?php if($res && $num): //Show options.. - echo '<div> Page:'.$pageNav->getPageLinks().' </div>'; + echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <p class="centered" id="actions"> - <input class="button" type="submit" name="enable" value="Enable" > - <input class="button" type="submit" name="disable" value="Disable" > - <input class="button" type="submit" name="delete" value="Delete" > + <input class="button" type="submit" name="enable" value="<?php echo __('Enable'); ?>" > + <input class="button" type="submit" name="disable" value="<?php echo __('Disable'); ?>" > + <input class="button" type="submit" name="delete" value="<?php echo __('Delete'); ?>" > </p> <?php endif; @@ -131,20 +131,21 @@ endif; </form> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="enable-confirm"> - Are you sure want to <b>enable</b> selected pages? + <?php echo __('Are you sure want to <b>enable</b> selected pages?'); ?> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> - Are you sure want to <b>disable</b> selected pages? + <?php echo __('Are you sure want to <b>disable</b> selected pages?'); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> - <font color="red"><strong>Are you sure you want to DELETE selected pages?</strong></font> - <br><br>Deleted pages CANNOT be recovered. + <font color="red"><strong><?php echo __( + 'Are you sure you want to DELETE selected pages?'); ?></strong></font> + <br><br><?php echo __('Deleted pages CANNOT be recovered.'); ?> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> diff --git a/include/staff/plugin-add.inc.php b/include/staff/plugin-add.inc.php index 46251f66d1c2269e8c2417ed0e238613d1e1f8e6..a5aae19d0581e1dce739ef3d05096f7d49028016 100644 --- a/include/staff/plugin-add.inc.php +++ b/include/staff/plugin-add.inc.php @@ -1,9 +1,8 @@ -<h2>Install a new plugin</h2> -<p> -To add a plugin into the system, download and place the plugin into the -<code>include/plugins</code> folder. Once in the plugin is in the -<code>plugins/</code> folder, it will be shown in the list below. +<h2><?php echo __('Install a new plugin'); ?></h2> +<p><?php echo __( +'To add a plugin into the system, download and place the plugin into the <code>include/plugins</code> folder. Once in the plugin is in the <code>plugins/</code> folder, it will be shown in the list below.' +); ?> </p> <form method="post" action="?"> @@ -20,12 +19,12 @@ foreach ($ost->plugins->allInfos() as $info) { ?> <tr><td><button type="submit" name="install_path" value="<?php echo $info['install_path']; - ?>">Install</button></td> + ?>"><?php echo __('Install'); ?></button></td> <td> <div><strong><?php echo $info['name']; ?></strong><br/> <div><?php echo $info['description']; ?></div> - <div class="faded"><em>Version: <?php echo $info['version']; ?></em></div> - <div class="faded"><em>Author: <?php echo $info['author']; ?></em></div> + <div class="faded"><em><?php echo __('Version'); ?>: <?php echo $info['version']; ?></em></div> + <div class="faded"><em><?php echo __('Author'); ?>: <?php echo $info['author']; ?></em></div> </div> </td></tr> <?php diff --git a/include/staff/plugin.inc.php b/include/staff/plugin.inc.php index c1cefd5bc2fb60e1570b97e7fec9e6b838461bf9..4ec565da3565d2489878910a58053bba6b7a08ce 100644 --- a/include/staff/plugin.inc.php +++ b/include/staff/plugin.inc.php @@ -7,9 +7,9 @@ if($plugin && $_REQUEST['a']!='add') { $form = $config->getForm(); if ($_POST) $form->isValid(); - $title = 'Update Plugin'; + $title = __('Update Plugin'); $action = 'update'; - $submit_text='Save Changes'; + $submit_text = __('Save Changes'); $info = $plugin->ht; } $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); @@ -19,26 +19,26 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <?php csrf_token(); ?> <input type="hidden" name="do" value="<?php echo $action; ?>"> <input type="hidden" name="id" value="<?php echo $info['id']; ?>"> - <h2>Manage Plugin + <h2><?php echo __('Manage Plugin'); ?> <br/><small><?php echo $plugin->getName(); ?></small></h2> - <h3>Configuration</h3> + <h3><?php echo __('Configuration'); ?></h3> <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2"> <tbody> <?php if ($form) $form->render(); else { ?> - <tr><th>This plugin has no configurable settings<br> - <em>Every plugin should be so easy to use</em></th></tr> + <tr><th><?php echo __('This plugin has no configurable settings'); ?><br> + <em><?php echo __('Every plugin should be so easy to use.'); ?></em></th></tr> <?php } ?> </tbody></table> <p class="centered"> <?php if ($form) { ?> <input type="submit" name="submit" value="<?php echo $submit_text; ?>"> - <input type="reset" name="reset" value="Reset"> + <input type="reset" name="reset" value="<?php echo __('Reset'); ?>"> <?php } ?> - <input type="button" name="cancel" value="Cancel" onclick='window.location.href="?"'> + <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>" onclick='window.location.href="?"'> </p> </form> diff --git a/include/staff/plugins.inc.php b/include/staff/plugins.inc.php index a25ccc095a1c11a1544d2c24d3666d185ee0ca70..66cdba50d529a0fdd367c32e4a1f39bbc003b4dd 100644 --- a/include/staff/plugins.inc.php +++ b/include/staff/plugins.inc.php @@ -1,8 +1,9 @@ <div style="width:700;padding-top:5px; float:left;"> - <h2>Currently Installed Plugins</h2> + <h2><?php echo __('Currently Installed Plugins'); ?></h2> </div> <div style="float:right;text-align:right;padding-top:5px;padding-right:5px;"> - <b><a href="plugins.php?a=add" class="Icon form-add">Add New Plugin</a></b></div> + <b><a href="plugins.php?a=add" class="Icon form-add"><?php + echo __('Add New Plugin'); ?></a></b></div> <div class="clear"></div> <?php @@ -10,7 +11,7 @@ $page = ($_GET['p'] && is_numeric($_GET['p'])) ? $_GET['p'] : 1; $count = count($ost->plugins->allInstalled()); $pageNav = new Pagenate($count, $page, PAGE_LIMIT); $pageNav->setURL('forms.php'); -$showing=$pageNav->showing().' forms'; +$showing=$pageNav->showing().' '._N('plugin', 'plugins', $count); ?> <form action="plugins.php" method="POST" name="forms"> @@ -21,9 +22,9 @@ $showing=$pageNav->showing().' forms'; <thead> <tr> <th width="7"> </th> - <th>Plugin Name</th> - <th>Status</td> - <th>Date Installed</th> + <th><?php echo __('Plugin Name'); ?></th> + <th><?php echo __('Status'); ?></td> + <th><?php echo __('Date Installed'); ?></th> </tr> </thead> <tbody> @@ -46,12 +47,13 @@ foreach ($ost->plugins->allInstalled() as $p) { <tr> <td colspan="4"> <?php if($count){ ?> - Select: - <a id="selectAll" href="#ckb">All</a> - <a id="selectNone" href="#ckb">None</a> - <a id="selectToggle" href="#ckb">Toggle</a> + <?php echo __('Select'); ?>: + <a id="selectAll" href="#ckb"><?php echo __('All'); ?></a> + <a id="selectNone" href="#ckb"><?php echo __('None'); ?></a> + <a id="selectToggle" href="#ckb"><?php echo __('Toggle'); ?></a> <?php }else{ - echo 'No plugins installed yet — <a href="?a=add">add one</a>!'; + echo sprintf(__('No plugins installed yet — %s add one %s!'), + '<a href="?a=add">','</a>'); } ?> </td> </tr> @@ -59,37 +61,41 @@ foreach ($ost->plugins->allInstalled() as $p) { </table> <?php if ($count) //Show options.. - echo '<div> Page:'.$pageNav->getPageLinks().' </div>'; + echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <p class="centered" id="actions"> - <input class="button" type="submit" name="delete" value="Delete"> - <input class="button" type="submit" name="enable" value="Enable"> - <input class="button" type="submit" name="disable" value="Disable"> + <input class="button" type="submit" name="delete" value="<?php echo __('Delete'); ?>"> + <input class="button" type="submit" name="enable" value="<?php echo __('Enable'); ?>"> + <input class="button" type="submit" name="disable" value="<?php echo __('Disable'); ?>"> </p> </form> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href="">×</a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> - <font color="red"><strong>Are you sure you want to DELETE selected plugins?</strong></font> - <br><br>Deleted forms CANNOT be recovered. + <font color="red"><strong><?php echo __( + 'Are you sure you want to DELETE selected plugins?'); ?></strong></font> + <br><br><?php echo __( + 'Configuration for deleted plugins CANNOT be recovered.'); ?> </p> <p class="confirm-action" style="display:none;" id="enable-confirm"> - <font color="green"><strong>Are you ready to enable selected plugins?</strong></font> + <font color="green"><strong><?php echo __( + 'Are you ready to enable selected plugins?'); ?></strong></font> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> - <font color="red"><strong>Are you sure you want to disable selected plugins?</strong></font> + <font color="red"><strong><?php echo __( + 'Are you sure you want to disable selected plugins?'); ?></strong></font> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="button" value="No, Cancel" class="close"> + <input type="button" value="<?php echo __('No, Cancel'); ?>" class="close"> </span> <span class="buttons" style="float:right"> - <input type="button" value="Yes, Do it!" class="confirm"> + <input type="button" value="<?php echo __('Yes, Do it!'); ?>" class="confirm"> </span> </p> <div class="clear"></div> diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php index e359928cc0373e87f27f1a0007c88dcd21831091..2f0470935a2d4a036855c0e9900594bca13cc32a 100644 --- a/include/staff/profile.inc.php +++ b/include/staff/profile.inc.php @@ -16,7 +16,7 @@ $info['id']=$staff->getId(); <tr> <th colspan="2"> <h4><?php echo __('Account Information');?></h4> - <em><?php echo __('Contact information.');?></em> + <em><?php echo __('Contact information');?></em> </th> </tr> </thead> @@ -151,7 +151,10 @@ $info['id']=$staff->getId(); $y=1; for($i=1; $i <=30; $i+=$y) { $sel=($info['auto_refresh_rate']==$i)?'selected="selected"':''; - echo sprintf('<option value="%1$d" %2$s>'.__('Every %3$s %4$s').'</option>',$i,$sel,$i,($i>1?'mins':'min')); + echo sprintf('<option value="%1$d" %2$s>' + .sprintf( + _N('Every minute', 'Every %d %minutes', $i), $i) + .'</option>',$i,$sel); if($i>9) $y=2; } ?> @@ -165,14 +168,14 @@ $info['id']=$staff->getId(); <select name="default_signature_type"> <option value="none" selected="selected">— <?php echo __('None');?> —</option> <?php - $options=array('mine'=>__('My Signature'),'dept'=>__('Dept. Signature (if set)')); + $options=array('mine'=>__('My Signature'),'dept'=>__('Deptartment Signature (if set)')); foreach($options as $k=>$v) { echo sprintf('<option value="%s" %s>%s</option>', $k,($info['default_signature_type']==$k)?'selected="selected"':'',$v); } ?> </select> - <em><?php echo __('(You can change selection on ticket page)');?></em> + <em><?php echo __('(This can be selectected when replying to a ticket)');?></em> <span class="error"> <?php echo $errors['default_signature_type']; ?></span> </td> </tr> diff --git a/include/staff/pwreset.login.php b/include/staff/pwreset.login.php index 8a7455ad8b28d5283b0f3ee6cd3f303f3262af6a..eedc512545a5ed2530b4cc879c8107619c8ecf28 100644 --- a/include/staff/pwreset.login.php +++ b/include/staff/pwreset.login.php @@ -5,7 +5,7 @@ $info = ($_POST)?Format::htmlchars($_POST):array(); ?> <div id="loginBox"> - <h1 id="logo"><a href="index.php">osTicket Staff Password Reset</a></h1> + <h1 id="logo"><a href="index.php">osTicket <?php echo __('Staff Password Reset'); ?></a></h1> <h3><?php echo Format::htmlchars($msg); ?></h3> <form action="pwreset.php" method="post"> diff --git a/include/staff/pwreset.php b/include/staff/pwreset.php index 6aadeb2fcf10dbb308ed7ec3f548f4afd6c94ee8..dc0eb843aac1c840e0207f6347c7599128195895 100644 --- a/include/staff/pwreset.php +++ b/include/staff/pwreset.php @@ -5,7 +5,7 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array(); ?> <div id="loginBox"> - <h1 id="logo"><a href="index.php">osTicket Staff Password Reset</a></h1> + <h1 id="logo"><a href="index.php">osTicket <?php echo __('Staff Password Reset'); ?></a></h1> <h3><?php echo Format::htmlchars($msg); ?></h3> <form action="pwreset.php" method="post"> <?php csrf_token(); ?> diff --git a/include/staff/pwreset.sent.php b/include/staff/pwreset.sent.php index 832b78ef57470c4045ed615c152dc228eb414e79..e2d62178ec3be9d1270e37909b36e9d4f5adb6d0 100644 --- a/include/staff/pwreset.sent.php +++ b/include/staff/pwreset.sent.php @@ -5,11 +5,11 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array(); ?> <div id="loginBox"> - <h1 id="logo"><a href="index.php">osTicket Staff Password Reset</a></h1> - <h3>A confirmation email has been sent</h3> - <h3 style="color:black;"><em> - A password reset email was sent to the email on file for your account. - Follow the link in the email to reset your password. + <h1 id="logo"><a href="index.php">osTicket <?php echo __('Staff Password Reset'); ?></a></h1> + <h3><?php echo __('A confirmation email has been sent'); ?></h3> + <h3 style="color:black;"><em><?php echo __( + 'A password reset email was sent to the email on file for your account. Follow the link in the email to reset your password.' + ); ?> </em></h3> <form action="index.php" method="get"> diff --git a/include/staff/settings-access.inc.php b/include/staff/settings-access.inc.php index e045a45600f52fa7abbcfc77f3b9b9baaab3b319..d2e921d816b2802699fc12896722e11ac7504cf5 100644 --- a/include/staff/settings-access.inc.php +++ b/include/staff/settings-access.inc.php @@ -2,7 +2,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) die('Access Denied'); ?> -<h2>Access Control Settings</h2> +<h2><?php echo __('Access Control Settings'); ?></h2> <form action="settings.php?t=access" method="post" id="save"> <?php csrf_token(); ?> <input type="hidden" name="t" value="access" > @@ -10,24 +10,25 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <thead> <tr> <th colspan="2"> - <h4>Configure Access to this Help Desk</h4> + <h4><?php echo __('Configure Access to this Help Desk'); ?></h4> </th> </tr> </thead> <tbody> <tr> <th colspan="2"> - <em><b>Staff Authentication Settings</b></em> + <em><b><?php echo __('Staff Authentication Settings'); ?></b></em> </th> </tr> - <tr><td>Password Expiration Policy:</th> + <tr><td><?php echo __('Password Expiration Policy'); ?>:</th> <td> <select name="passwd_reset_period"> - <option value="0"> — No expiration —</option> + <option value="0"> — <?php echo __('No expiration'); ?> —</option> <?php for ($i = 1; $i <= 12; $i++) { - echo sprintf('<option value="%d" %s>%s%s</option>', - $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''), $i>1?"Every $i ":'', $i>1?' Months':'Monthly'); + echo sprintf('<option value="%d" %s>%s</option>', + $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''), + sprintf(_N('Monthly', 'Every %d months', $i), $i)); } ?> </select> @@ -35,13 +36,13 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <i class="help-tip icon-question-sign" href="#password_expiration_policy"></i> </td> </tr> - <tr><td>Allow Password Resets:</th> + <tr><td><?php echo __('Allow Password Resets'); ?>:</th> <td> <input type="checkbox" name="allow_pw_reset" <?php echo $config['allow_pw_reset']?'checked="checked"':''; ?>> <i class="help-tip icon-question-sign" href="#allow_password_resets"></i> </td> </tr> - <tr><td>Reset Token Expiration:</th> + <tr><td><?php echo __('Reset Token Expiration'); ?>:</th> <td> <input type="text" name="pw_reset_window" size="6" value="<?php echo $config['pw_reset_window']; ?>"> @@ -49,7 +50,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <font class="error"> <?php echo $errors['pw_reset_window']; ?></font> </td> </tr> - <tr><td>Staff Excessive Logins:</td> + <tr><td><?php echo __('Staff Excessive Logins'); ?>:</td> <td> <select name="staff_max_logins"> <?php @@ -57,23 +58,25 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_max_logins']==$i)?'selected="selected"':''), $i); } ?> - </select> failed login attempt(s) allowed before a + </select> <?php echo __( + 'failed login attempt(s) allowed before a lock-out is enforced'); ?> + <br/> <select name="staff_login_timeout"> <?php for ($i = 1; $i <= 10; $i++) { echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_login_timeout']==$i)?'selected="selected"':''), $i); } ?> - </select> minute lock-out is enforced. + </select><?php echo __('minutes locked out'); ?> </td> </tr> - <tr><td>Staff Session Timeout:</td> + <tr><td><?php echo __('Staff Session Timeout'); ?>:</td> <td> <input type="text" name="staff_session_timeout" size=6 value="<?php echo $config['staff_session_timeout']; ?>"> - mins <em>( 0 to disable)</em>. <i class="help-tip icon-question-sign" href="#staff_session_timeout"></i> + mins <em><?php echo __('(0 to disable)'); ?></em>. <i class="help-tip icon-question-sign" href="#staff_session_timeout"></i> </td> </tr> - <tr><td>Bind Staff Session to IP:</td> + <tr><td><?php echo __('Bind Staff Session to IP'); ?>:</td> <td> <input type="checkbox" name="staff_ip_binding" <?php echo $config['staff_ip_binding']?'checked="checked"':''; ?>> <i class="help-tip icon-question-sign" href="#bind_staff_session_to_ip"></i> @@ -81,22 +84,22 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) </tr> <tr> <th colspan="2"> - <em><b>End User Authentication Settings</b></em> + <em><b><?php echo __('End User Authentication Settings'); ?></b></em> </th> </tr> - <tr><td>Registration Required:</td> + <tr><td><?php echo __('Registration Required'); ?>:</td> <td><input type="checkbox" name="clients_only" <?php if ($config['clients_only']) - echo 'checked="checked"'; ?>/> - Require registration and login to create tickets + echo 'checked="checked"'; ?>/> <?php echo __( + 'Require registration and login to create tickets'); ?> <i class="help-tip icon-question-sign" href="#registration_method"></i> </td> - <tr><td>Registration Method:</td> + <tr><td><?php echo __('Registration Method'); ?>:</td> <td><select name="client_registration"> <?php foreach (array( - 'disabled' => 'Disabled — All users are guests', - 'public' => 'Public — Anyone can register', - 'closed' => 'Private — Only staff can register users',) + 'disabled' => __('Disabled — All users are guests'), + 'public' => __('Public — Anyone can register'), + 'closed' => __('Private — Only staff can register users'),) as $key=>$val) { ?> <option value="<?php echo $key; ?>" <?php if ($config['client_registration'] == $key) @@ -107,7 +110,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <i class="help-tip icon-question-sign" href="#registration_method"></i> </td> </tr> - <tr><td>User Excessive Logins:</td> + <tr><td><?php echo __('User Excessive Logins'); ?>:</td> <td> <select name="client_max_logins"> <?php @@ -116,27 +119,29 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) } ?> - </select> failed login attempt(s) allowed before a + </select> <?php echo __( + 'failed login attempt(s) allowed before a lock-out is enforced'); ?> + <br/> <select name="client_login_timeout"> <?php for ($i = 1; $i <= 10; $i++) { echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['client_login_timeout']==$i)?'selected="selected"':''), $i); } ?> - </select> minute lock-out is enforced. + </select> <?php echo __('minutes locked out'); ?> </td> </tr> - <tr><td>User Session Timeout:</td> + <tr><td><?php echo __('User Session Timeout'); ?>:</td> <td> <input type="text" name="client_session_timeout" size=6 value="<?php echo $config['client_session_timeout']; ?>"> <i class="help-tip icon-question-sign" href="#client_session_timeout"></i> </td> </tr> - <tr><td>Client Quick Access:</td> + <tr><td><?php echo __('Client Quick Access'); ?>:</td> <td><input type="checkbox" name="client_verify_email" <?php if ($config['client_verify_email']) - echo 'checked="checked"'; ?>/> - Require email verification on "Check Ticket Status" page + echo 'checked="checked"'; ?>/> <?php echo __( + 'Require email verification on "Check Ticket Status" page'); ?> <i class="help-tip icon-question-sign" href="#client_verify_email"></i> </td> </tr> @@ -144,7 +149,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) <thead> <tr> <th colspan="2"> - <h4>Authentication and Registration Templates</h4> + <h4><?php echo __('Authentication and Registration Templates'); ?></h4> </th> </tr> </thead> @@ -170,41 +175,43 @@ $manage_content = function($title, $content) use ($contents) { echo Format::htmlchars($title); ?></a><br/> <span class="faded" style="display:inline-block;width:90%"><?php echo Format::display($notes); ?> - <em>(Last Updated <?php echo Format::db_datetime($upd); ?>)</em></span></td></tr><?php + <em>(<?php echo sprintf(__('Last Updated %s'), Format::db_datetime($upd)); + ?>)</em></span></td></tr><?php }; ?> <tr> <th colspan="2"> - <em><b>Authentication and Registration Templates</b></em> + <em><b><?php echo __( + 'Authentication and Registration Templates'); ?></b></em> </th> </tr> - <?php $manage_content('Staff Members', 'pwreset-staff'); ?> - <?php $manage_content('Clients', 'pwreset-client'); ?> - <?php $manage_content('Guess Ticket Access', 'access-link'); ?> + <?php $manage_content(__('Staff Members'), 'pwreset-staff'); ?> + <?php $manage_content(__('Clients'), 'pwreset-client'); ?> + <?php $manage_content(__('Guess Ticket Access'), 'access-link'); ?> <tr> <th colspan="2"> - <em><b>Sign-In Pages</b></em> + <em><b><?php echo __('Sign In Pages'); ?></b></em> </th> </tr> - <?php $manage_content('Staff Login Banner', 'banner-staff'); ?> - <?php $manage_content('Client Sign-In Page', 'banner-client'); ?> + <?php $manage_content(__('Staff Login Banner'), 'banner-staff'); ?> + <?php $manage_content(__('Client Sign-In Page'), 'banner-client'); ?> <tr> <th colspan="2"> - <em><b>User Account Registration</b></em> + <em><b><?php echo __('User Account Registration'); ?></b></em> </th> </tr> - <?php $manage_content('Please Confirm Email Address Page', 'registration-confirm'); ?> - <?php $manage_content('Confirmation Email', 'registration-client'); ?> - <?php $manage_content('Account Confirmed Page', 'registration-thanks'); ?> + <?php $manage_content(__('Please Confirm Email Address Page'), 'registration-confirm'); ?> + <?php $manage_content(__('Confirmation Email'), 'registration-client'); ?> + <?php $manage_content(__('Account Confirmed Page'), 'registration-thanks'); ?> <tr> <th colspan="2"> - <em><b>Staff Account Registration</b></em> + <em><b><?php echo __('Staff Account Registration'); ?></b></em> </th> </tr> - <?php $manage_content('Staff Welcome Email', 'registration-staff'); ?> + <?php $manage_content(__('Staff Welcome Email'), 'registration-staff'); ?> </tbody> </table> <p style="text-align:center"> - <input class="button" type="submit" name="submit" value="Save Changes"> - <input class="button" type="reset" name="reset" value="Reset Changes"> + <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes'); ?>"> + <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes'); ?>"> </p> </form> diff --git a/include/staff/settings-kb.inc.php b/include/staff/settings-kb.inc.php index e2b0eb269f2ae0f2a7c4d9215aaa0e36f8cce17f..cfac97418f92f1156c0c6022911dc4aaa3bd0310 100644 --- a/include/staff/settings-kb.inc.php +++ b/include/staff/settings-kb.inc.php @@ -36,7 +36,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) </tbody> </table> <p style="padding-left:210px;"> - <input class="button" type="submit" name="submit" value="Save Changes"> - <input class="button" type="reset" name="reset" value="Reset Changes"> + <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes'); ?>"> + <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes'); ?>"> </p> </form> diff --git a/include/staff/settings-pages.inc.php b/include/staff/settings-pages.inc.php index c92f441442823cfd279a4b21909d9267b44a3f91..7487df0adabedc326f1e80070a0a64b83bd492e2 100644 --- a/include/staff/settings-pages.inc.php +++ b/include/staff/settings-pages.inc.php @@ -2,7 +2,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) die('Access Denied'); $pages = Page::getPages(); ?> -<h2>Company Profile</h2> +<h2><?php echo __('Company Profile'); ?></h2> <form action="settings.php?t=pages" method="post" id="save" enctype="multipart/form-data"> <?php csrf_token(); ?> @@ -10,7 +10,7 @@ $pages = Page::getPages(); <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead><tr> <th colspan="2"> - <h4>Basic Information</h4> + <h4><?php echo __('Basic Information'); ?></h4> </th> </tr></thead> <tbody> @@ -23,18 +23,20 @@ $pages = Page::getPages(); <thead> <tr> <th colspan="2"> - <h4>Site Pages</h4> - <em>To edit or add new pages go to <a href="pages.php">Manage > Site Pages</a></em> + <h4><?php echo __('Site Pages'); ?></h4> + <em><?php echo sprintf(__( + 'To edit or add new pages go to %s Manage > Site Pages %s'), + '<a href="pages.php">','</a>'); ?></em> </th> </tr> </thead> <tbody> <tr> - <td width="220" class="required">Landing Page:</td> + <td width="220" class="required"><?php echo __('Landing Page'); ?>:</td> <td> <span> <select name="landing_page_id"> - <option value="">— Select Landing Page —</option> + <option value="">— <?php echo __('Select Landing Page'); ?> —</option> <?php foreach($pages as $page) { if(strcasecmp($page->getType(), 'landing')) continue; @@ -49,11 +51,12 @@ $pages = Page::getPages(); </td> </tr> <tr> - <td width="220" class="required">Offline Page:</td> + <td width="220" class="required"><?php echo __('Offline Page'); ?>:</td> <td> <span> <select name="offline_page_id"> - <option value="">— Select Offline Page —</option> + <option value="">— <?php echo __('Select Offline Page'); + ?> —</option> <?php foreach($pages as $page) { if(strcasecmp($page->getType(), 'offline')) continue; @@ -68,11 +71,13 @@ $pages = Page::getPages(); </td> </tr> <tr> - <td width="220" class="required">Default Thank-You Page:</td> + <td width="220" class="required"><?php + echo __('Default Thank-You Page'); ?>:</td> <td> <span> <select name="thank-you_page_id"> - <option value="">— Select Thank-You Page —</option> + <option value="">— <?php + echo __('Select Thank-You Page'); ?> —</option> <?php foreach($pages as $page) { if(strcasecmp($page->getType(), 'thank-you')) continue; @@ -92,10 +97,10 @@ $pages = Page::getPages(); <thead> <tr> <th colspan="2"> - <h4>Logos + <h4><?php echo __('Logos'); ?> <i class="help-tip icon-question-sign" href="#logos"></i> </h4> - <em>System Default Logo</em> + <em><?php echo __('System Default Logo'); ?></em> </th> </tr> </thead> @@ -116,7 +121,7 @@ $pages = Page::getPages(); </td></tr> <tr> <th colspan="2"> - <em>Use a custom logo <i class="help-tip icon-question-sign" href="#upload_a_new_logo"></i></em> + <em><?php echo __('Use a custom logo'); ?> <i class="help-tip icon-question-sign" href="#upload_a_new_logo"></i></em> </th> </tr> <tr><td colspan="2"> @@ -139,13 +144,13 @@ $pages = Page::getPages(); <?php if ($logo->getId() != $current) { ?> <label> <input type="checkbox" name="delete-logo[]" value="<?php - echo $logo->getId(); ?>"/> Delete + echo $logo->getId(); ?>"/> <?php echo __('Delete'); ?> </label> <?php } ?> </div> <?php } ?> <br/> - <b>Upload a new logo:</b> + <b><?php echo __('Upload a new logo'); ?>:</b> <input type="file" name="logo[]" size="30" value="" /> <font class="error"><br/><?php echo $errors['logo']; ?></font> </td> @@ -153,21 +158,23 @@ $pages = Page::getPages(); </tbody> </table> <p style="padding-left:250px;"> - <input class="button" type="submit" name="submit-button" value="Save Changes"> - <input class="button" type="reset" name="reset" value="Reset Changes"> + <input class="button" type="submit" name="submit-button" value="<?php + echo __('Save Changes'); ?>"> + <input class="button" type="reset" name="reset" value="<?php + echo __('Reset Changes'); ?>"> </p> </form> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" id="delete-confirm"> - <font color="red"><strong>Are you sure you want to DELETE selected - logos?</strong></font> - <br/><br/>Deleted logos CANNOT be recovered. + <font color="red"><strong><?php echo __( + 'Are you sure you want to DELETE selected logos?'); ?></strong></font> + <br/><br/><?php echo __('Deleted logos CANNOT be recovered.'); ?> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> diff --git a/include/staff/settings-system.inc.php b/include/staff/settings-system.inc.php index 5c03e71210f1d43fe7037569ff1124bedb29e85f..542eac3de06f4b0f9bfdbdb2876dfcd7e13fc342 100644 --- a/include/staff/settings-system.inc.php +++ b/include/staff/settings-system.inc.php @@ -139,13 +139,13 @@ $gmtime = Misc::gmtime(); <em><?php echo Format::date($config['date_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em> </td> </tr> - <tr><td width="220" class="required"><?php echo __('Date & Time Format');?>:</td> + <tr><td width="220" class="required"><?php echo __('Date and Time Format');?>:</td> <td><input type="text" name="datetime_format" value="<?php echo $config['datetime_format']; ?>"> <font class="error">* <?php echo $errors['datetime_format']; ?></font> <em><?php echo Format::date($config['datetime_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em> </td> </tr> - <tr><td width="220" class="required"><?php echo __('Day, Date & Time Format');?>:</td> + <tr><td width="220" class="required"><?php echo __('Day, Date and Time Format');?>:</td> <td><input type="text" name="daydatetime_format" value="<?php echo $config['daydatetime_format']; ?>"> <font class="error">* <?php echo $errors['daydatetime_format']; ?></font> <em><?php echo Format::date($config['daydatetime_format'], $gmtime, $config['tz_offset'], $config['enable_daylight_saving']); ?></em> diff --git a/include/staff/settings-tickets.inc.php b/include/staff/settings-tickets.inc.php index 422f22a7d24bda1bf859d1c89d3650403f8a3e69..a874448aded33a8563c98f9e4158a223ccc9b98d 100644 --- a/include/staff/settings-tickets.inc.php +++ b/include/staff/settings-tickets.inc.php @@ -81,7 +81,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) <td><?php echo __('Maximum <b>Open</b> Tickets');?>:</td> <td> <input type="text" name="max_open_tickets" size=4 value="<?php echo $config['max_open_tickets']; ?>"> - <?php echo __('per email/user'); ?> <i class="help-tip icon-question-sign" href="#maximum_open_tickets"></i> + <?php echo __('per end user'); ?> <i class="help-tip icon-question-sign" href="#maximum_open_tickets"></i> </td> </tr> <tr> @@ -182,7 +182,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) </td> </tr> <tr> - <td><?php echo __('Max. User File Uploads');?>:</td> + <td><?php echo __('Maximum User File Uploads');?>:</td> <td> <select name="max_user_file_uploads"> <?php @@ -198,7 +198,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) </td> </tr> <tr> - <td><?php echo __('Max. Staff File Uploads');?>:</td> + <td><?php echo __('Maximum Staff File Uploads');?>:</td> <td> <select name="max_staff_file_uploads"> <?php diff --git a/include/staff/slaplan.inc.php b/include/staff/slaplan.inc.php index a8b9dcd2a6067995f4fa69cc7b27a70262fd5084..2e72720b8f2cd8030b70e039a321177196eb282a 100644 --- a/include/staff/slaplan.inc.php +++ b/include/staff/slaplan.inc.php @@ -3,14 +3,14 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access $info=array(); $qstr=''; if($sla && $_REQUEST['a']!='add'){ - $title=__('Update SLA Plan'); + $title=__('Update SLA Plan' /* SLA is abbreviation for Service Level Agreement */); $action='update'; $submit_text=__('Save Changes'); $info=$sla->getInfo(); $info['id']=$sla->getId(); $qstr.='&id='.$sla->getId(); }else { - $title=__('Add New SLA Plan'); + $title=__('Add New SLA Plan' /* SLA is abbreviation for Service Level Agreement */); $action='add'; $submit_text=__('Add Plan'); $info['isactive']=isset($info['isactive'])?$info['isactive']:1; diff --git a/include/staff/slaplans.inc.php b/include/staff/slaplans.inc.php index 10d2fb1a7d502f51c840bb1c0a158fa94051050f..35e8ae85ccabe90b96c8549869f2fd6f25e1bcc7 100644 --- a/include/staff/slaplans.inc.php +++ b/include/staff/slaplans.inc.php @@ -33,9 +33,11 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC'); $query="$sql ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit(); $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=$pageNav->showing().' '.__('SLA plans'); + $showing=$pageNav->showing().' '._N('SLA plan', + 'SLA plans' /* SLA is abbreviation for Service Level Agreement */, + $total); else - $showing=__('No SLA plans found!'); + $showing=__('No SLA plans found!' /* SLA is abbreviation for Service Level Agreement */); ?> @@ -101,7 +103,7 @@ else <a id="selectNone" href="#ckb"><?php echo __('None');?></a> <a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a> <?php }else{ - echo __('No SLA plans found'); + echo __('No SLA plans found' /* SLA is abbreviation for Service Level Agreement */); } ?> </td> </tr> diff --git a/include/staff/staff.inc.php b/include/staff/staff.inc.php index 9e812705092ab11706ea3f33097a8c04945dfcb7..6ddba17e9506e2e2921dbc2ddc57bde5644db486 100644 --- a/include/staff/staff.inc.php +++ b/include/staff/staff.inc.php @@ -112,7 +112,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <?php if (!$staff) { ?> <tr> - <td width="180">Welcome Email</td> + <td width="180"><?php echo __('Welcome Email'); ?></td> <td><input type="checkbox" name="welcome_email" id="welcome-email" <?php if ($info['welcome_email']) echo 'checked="checked"'; ?> onchange="javascript: @@ -122,7 +122,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); else if (sbk.val() == '' || sbk.val() == 'local') $('#password-fields').show(); " /> - Send sign in information + <?php echo __('Send sign in information'); ?> <i class="help-tip icon-question-sign" href="#welcome_email"></i> </td> </tr> @@ -349,7 +349,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); } ?> <tr> <th colspan="2"> - <em><strong><?php echo __('Admin Notes'); ?></strong></em> + <em><strong><?php echo __('Internal Notes'); ?></strong></em> </th> </tr> <tr> diff --git a/include/staff/staffmembers.inc.php b/include/staff/staffmembers.inc.php index efd2e61ffea02e4fd14ea8efa6d0da4038bbd3b7..4513462d65438e957dd79363508dc0f026d16370 100644 --- a/include/staff/staffmembers.inc.php +++ b/include/staff/staffmembers.inc.php @@ -111,9 +111,9 @@ $query="$select $from $where GROUP BY staff.staff_id ORDER BY $order_by LIMIT ". <?php $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=$pageNav->showing(); + $showing=$pageNav->showing() . ' ' . _N('agent', 'agents', $num); else - $showing=__('No staff found!'); + $showing=__('No staff members found!'); ?> <form action="staff.php" method="POST" name="staff" > <?php csrf_token(); ?> diff --git a/include/staff/system.inc.php b/include/staff/system.inc.php index 6532762fc8f77faf737f696094871f91fd04b5ea..46fcf64e821db82163eafacc7fa95fc812d1cbbf 100644 --- a/include/staff/system.inc.php +++ b/include/staff/system.inc.php @@ -5,58 +5,58 @@ $commit = GIT_VERSION != '$git' ? GIT_VERSION : ( @shell_exec('git rev-parse HEAD') ?: '?'); ?> -<h2>About this osTicket Installation</h2> +<h2><?php echo __('About this osTicket Installation'); ?></h2> <br/> <table class="list" width="100%";> <thead> - <tr><th colspan="2">Server Information</th></tr> + <tr><th colspan="2"><?php echo __('Server Information'); ?></th></tr> </thead> <tbody> - <tr><td>osTicket Version</td> + <tr><td><?php echo __('osTicket Version'); ?></td> <td><?php echo sprintf("%s (%s)", THIS_VERSION, $commit); ?></td></tr> - <tr><td>Server Software</td> + <tr><td><?php echo __('Server Software'); ?></td> <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td></tr> - <tr><td>PHP Version</td> + <tr><td><?php echo __('PHP Version'); ?></td> <td><?php echo phpversion(); ?></td></tr> - <tr><td>MySQL Version</td> + <tr><td><?php echo __('MySQL Version'); ?></td> <td><?php echo db_version(); ?></td></tr> - <tr><td>PHP Extensions</td> + <tr><td><?php echo __('PHP Extensions'); ?></td> <td><table><tbody> <tr><td><i class="icon icon-<?php echo extension_loaded('gd')?'check':'warning-sign'; ?>"></i></td> <td>gdlib</td> - <td>Used for image manipulation and PDF printing</td></tr> + <td><?php echo __('Used for image manipulation and PDF printing'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('imap')?'check':'warning-sign'; ?>"></i></td> <td>imap</td> - <td>Used for email fetching</td></tr> + <td><?php echo __('Used for email fetching'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('xml')?'check':'warning-sign'; ?>"></i></td> <td>xml</td> - <td>XML API</td></tr> + <td><?php echo __('XML API'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('dom')?'check':'warning-sign'; ?>"></i></td> <td>xml-dom</td> - <td>Used for HTML email processing</td></tr> + <td><?php echo __('Used for HTML email processing'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('json')?'check':'warning-sign'; ?>"></i></td> <td>json</td> - <td>Improves performance creating and processing JSON</td></tr> + <td><?php echo __('Improves performance creating and processing JSON'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('gettext')?'check':'warning-sign'; ?>"></i></td> <td>gettext</td> - <td>Improves performance for non US-English configurations</td></tr> + <td><?php echo __('Improves performance for non US-English configurations'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i></td> <td>mbstring</td> - <td>Highly recommended for non western european language content</td></tr> + <td><?php echo __('Highly recommended for non western european language content'); ?></td></tr> <tr><td><i class="icon icon-<?php echo extension_loaded('phar')?'check':'warning-sign'; ?>"></i></td> <td>phar</td> - <td>Highly recommended for plugins and language packs</td></tr> + <td><?php echo __('Highly recommended for plugins and language packs'); ?></td></tr> </tbody></table></td></tr> - <tr><td>PHP Settings</td> + <tr><td><?php echo __('PHP Settings'); ?></td> <td><table><tbody> <tr><td><i class="icon icon-<?php echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i> @@ -64,22 +64,22 @@ $commit = GIT_VERSION != '$git' ? GIT_VERSION : ( <code>cgi.fix_pathinfo</code> = <?php echo ini_get('cgi.fix_pathinfo'); ?> </td><td> - <span class="faded">"1" is recommended if AJAX is not working</span> + <span class="faded"><?php echo __('"1" is recommended if AJAX is not working'); ?></span> </td></tr> </tbody></table></td></tr> </tbody> <thead> - <tr><th colspan="2">Database Usage</th></tr> + <tr><th colspan="2"><?php echo __('Database Usage'); ?></th></tr> </thead> <tbody> - <tr><td>Database Space Used</td> + <tr><td><?php echo __('Database Space Used'); ?></td> <td><?php $sql = 'SELECT sum( data_length + index_length ) / 1048576 total_size FROM information_schema.TABLES WHERE table_schema = ' .db_input(DBNAME); $space = db_result(db_query($sql)); echo sprintf('%.2f MiB', $space); ?></td> - <tr><td>Database Space for Attachments</td> + <tr><td><?php echo __('Database Space for Attachments'); ?></td> <td><?php $sql = 'SELECT SUM(LENGTH(filedata)) / 1048576 FROM '.FILE_CHUNK_TABLE; $space = db_result(db_query($sql)); diff --git a/include/staff/template.inc.php b/include/staff/template.inc.php index 8a32910c1fa2b13c9867109cc60e17d3ad4b9e7f..22c790117674d9d241cb6efd36cc88bac87c5e7d 100644 --- a/include/staff/template.inc.php +++ b/include/staff/template.inc.php @@ -31,7 +31,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <tr> <th colspan="2"> <h4><?php echo $title; ?></h4> - <em><?php echo __('Template information.');?></em> + <em><?php echo __('Template information');?></em> </th> </tr> </thead> @@ -90,9 +90,9 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </tr> <?php } # end if ($current_group) if (isset($impl[$cn])) { - echo sprintf('<tr><td colspan="2"> <strong><a href="templates.php?id=%d&a=manage">%s</a></strong>, <span class="faded">Updated %s</span><br/> %s</td></tr>', + echo sprintf('<tr><td colspan="2"> <strong><a href="templates.php?id=%d&a=manage">%s</a></strong>, <span class="faded">%s</span><br/> %s</td></tr>', $impl[$cn]->getId(), Format::htmlchars($info['name']), - Format::db_datetime($impl[$cn]->getLastUpdated()), + sprintf(__('Updated %s'), Format::db_datetime($impl[$cn]->getLastUpdated())), Format::htmlchars($info['desc'])); } else { echo sprintf('<tr><td colspan=2> <strong><a @@ -153,7 +153,8 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <?php } ?> <tr> <th colspan="2"> - <em><strong><?php echo __('Admin Notes');?></strong>: <?php echo __('Internal notes.');?></em> + <em><strong><?php echo __('Internal Notes');?></strong>: <?php echo __( + "be liberal, they're internal");?></em> </th> </tr> <tr> diff --git a/include/staff/templates.inc.php b/include/staff/templates.inc.php index a55348d192fafc9b997465cff2e2a7dd6662e425..edb7e96ccfee9883f77fdbfc7b162dce43702c7d 100644 --- a/include/staff/templates.inc.php +++ b/include/staff/templates.inc.php @@ -36,7 +36,7 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC'); $query="$sql GROUP BY tpl.tpl_id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit(); $res=db_query($query); if($res && ($num=db_num_rows($res))) - $showing=$pageNav->showing().' '.__('Templates'); + $showing=$pageNav->showing().' '._N('template', 'templates', $num); else $showing=__('No templates found!'); @@ -102,7 +102,7 @@ else <a id="selectNone" href="#ckb"><?php echo __('None');?></a> <a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a> <?php }else{ - echo __('No templates found'); + echo __('No templates found!'); } ?> </td> </tr> diff --git a/include/staff/templates/collaborators-preview.tmpl.php b/include/staff/templates/collaborators-preview.tmpl.php index bd9a3b6d0d25199c94664b86566da1ca8eec6a1d..e1d7beaabad20e91bea64320412aa2aaca5e9d9b 100644 --- a/include/staff/templates/collaborators-preview.tmpl.php +++ b/include/staff/templates/collaborators-preview.tmpl.php @@ -12,7 +12,7 @@ if (($users=$ticket->getCollaborators())) {?> $user->getEmail()); } } else { - echo "<strong>Ticket doesn't have collaborators.</strong>"; + echo "<strong>".__("Ticket doesn't have any collaborators.")."</strong>"; }?> </table> <?php @@ -22,7 +22,7 @@ $options[] = sprintf( '<a class="collaborators" id="managecollab" href="#tickets/%d/collaborators">%s</a>', $ticket->getId(), $ticket->getNumCollaborators() - ? 'Manage Collaborators' : 'Add Collaborator' + ? __('Manage Collaborators') : __('Add Collaborator') ); if ($options) { diff --git a/include/staff/templates/collaborators.tmpl.php b/include/staff/templates/collaborators.tmpl.php index 2c0de2a2ed82404b4ea3f0dbf39d9f7a79321df3..c1efc8a62263d814a33e1bbd516be71eaa40d1d8 100644 --- a/include/staff/templates/collaborators.tmpl.php +++ b/include/staff/templates/collaborators.tmpl.php @@ -1,4 +1,4 @@ -<h3>Ticket Collaborators</h3> +<h3><?php echo __('Ticket Collaborators'); ?></h3> <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b> <?php if($info && $info['msg']) { @@ -36,8 +36,10 @@ if(($users=$ticket->getCollaborators())) {?> </table> <hr style="margin-top:1em"/> <div><a class="collaborator" - href="#tickets/<?php echo $ticket->getId(); ?>/add-collaborator" >Add New Collaborator</a></div> - <div id="savewarning" style="display:none; padding-top:2px;"><p id="msg_warning">You have made changes that you need to save.</p></div> + href="#tickets/<?php echo $ticket->getId(); ?>/add-collaborator" + ><?php echo __('Add New Collaborator'); ?></a></div> + <div id="savewarning" style="display:none; padding-top:2px;"><p + id="msg_warning"><?php echo __('You have made changes that you need to save.'); ?></p></div> <p class="full-width"> <span class="buttons" style="float:left"> <input type="button" value="Cancel" class="close"> @@ -52,11 +54,11 @@ if(($users=$ticket->getCollaborators())) {?> </div> <?php } else { - echo "Bro, not sure how you got here!"; + echo __("Bro, not sure how you got here!"); } if ($_POST && $ticket && $ticket->getNumCollaborators()) { - $recipients = sprintf('Recipients (%d of %d)', + $recipients = sprintf(__('Recipients (%d of %d)'), $ticket->getNumActiveCollaborators(), $ticket->getNumCollaborators()); ?> diff --git a/include/staff/templates/content-manage.tmpl.php b/include/staff/templates/content-manage.tmpl.php index d2a546cd0367b02b9c4defb3f63c8531200972c8..a570d19e47d3a28d88198606ad36c382b0cc327c 100644 --- a/include/staff/templates/content-manage.tmpl.php +++ b/include/staff/templates/content-manage.tmpl.php @@ -1,4 +1,4 @@ -<h3>Manage Content — <?php echo Format::htmlchars($content->getName()); ?></h3> +<h3><?php echo __('Manage Content'); ?> — <?php echo Format::htmlchars($content->getName()); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <form method="post" action="#content/<?php echo $content->getId(); ?>"> @@ -14,11 +14,12 @@ echo $content->getNotes(); ?></div> <hr/> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="<?php echo $user ? 'cancel' : 'close' ?>" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="<?php + echo $user ? 'cancel' : 'close'; ?>" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Save Changes"> + <input type="submit" value="<?php echo __('Save Changes'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/dynamic-field-config.tmpl.php b/include/staff/templates/dynamic-field-config.tmpl.php index a295041c4787f2427ca5d223abeb7d02c1224e00..3e7d912966238599c8aa6ea88193d72c1af7a453 100644 --- a/include/staff/templates/dynamic-field-config.tmpl.php +++ b/include/staff/templates/dynamic-field-config.tmpl.php @@ -1,4 +1,4 @@ - <h3>Field Configuration — <?php echo $field->get('label') ?></h3> + <h3><?php echo __('Field Configuration'); ?> — <?php echo $field->get('label') ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <form method="post" action="ajax.php/form/field-config/<?php @@ -62,7 +62,7 @@ echo Format::htmlchars($field->get('hint')); ?></textarea> <br /> <em style="color:gray;display:inline-block"> - Help text shown with the field</em> + <?php echo __('Help text shown with the field'); ?></em> </span> </td></tr> </table> diff --git a/include/staff/templates/form-manage.tmpl.php b/include/staff/templates/form-manage.tmpl.php index 52f670e91f42b9b3b848b3c1d0da36d763212434..5b1402e0091915c1e3bbcd96c9688799824444a8 100644 --- a/include/staff/templates/form-manage.tmpl.php +++ b/include/staff/templates/form-manage.tmpl.php @@ -1,8 +1,8 @@ <h3><i class="icon-paste"></i> Manage Forms</i></h3> <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b> -<hr/> -Sort the forms on this ticket by click and dragging on them. Use the box -below the forms list to add new forms to the ticket. +<hr/><?php echo __( +'Sort the forms on this ticket by click and dragging on them. Use the box below the forms list to add new forms to the ticket.' +); ?> <br/> <br/> <form method="post" action="<?php echo $info['action']; ?>"> @@ -34,7 +34,8 @@ foreach ($forms as $e) { ?> ) ); $sel.prop('disabled',true);"> -<option selected="selected" disabled="disabled">Add a new form to this ticket</option> +<option selected="selected" disabled="disabled"><?php + echo __('Add a new form to this ticket'); ?></option> <?php foreach (DynamicForm::objects()->filter(array( 'type'=>'G')) as $f ) { @@ -46,19 +47,20 @@ foreach ($forms as $e) { ?> </select> <div id="delete-warning" style="display:none"> <hr> - <div id="msg_warning"> - Clicking <strong>Save Changes</strong> will permanently delete data - associated with the deleted forms + <div id="msg_warning"><?php echo __( + 'Clicking <strong>Save Changes</strong> will permanently delete data associated with the deleted forms' + ); ?> </div> </div> <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="<?php echo $user ? 'cancel' : 'close' ?>" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="<?php + echo $user ? 'cancel' : 'close' ?>" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Save Changes"> + <input type="submit" value="<?php echo __('Save Changes'); ?>"> </span> </p> diff --git a/include/staff/templates/list-item-properties.tmpl.php b/include/staff/templates/list-item-properties.tmpl.php index ce4a0ca5ee64aeb1ccef1914cea444f21f1c1390..6895d6a48b87fdc9012b0e996a24f063f7c2a9dc 100644 --- a/include/staff/templates/list-item-properties.tmpl.php +++ b/include/staff/templates/list-item-properties.tmpl.php @@ -1,4 +1,4 @@ - <h3>Item Properties — <?php echo $item->get('value') ?></h3> + <h3><?php echo __('Item Properties'); ?> — <?php echo $item->get('value') ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <form method="post" action="ajax.php/list/item/<?php diff --git a/include/staff/templates/notes.tmpl.php b/include/staff/templates/notes.tmpl.php index 1991c03b7c84a94e236ba882dcd18797f08abdf9..4ae5e1a9ee45880d0071bb5b951283092e31a334 100644 --- a/include/staff/templates/notes.tmpl.php +++ b/include/staff/templates/notes.tmpl.php @@ -8,7 +8,8 @@ foreach ($notes as $note) { <div id="new-note-box"> <div class="quicknote" id="new-note" data-url="<?php echo $create_note_url; ?>"> <div class="body"> - <a href="#"><i class="icon-plus icon-large"></i> Click to create a new note</a> + <a href="#"><i class="icon-plus icon-large"></i> + <?php echo __('Click to create a new note'); ?></a> </div> </div> </div> diff --git a/include/staff/templates/org-delete.tmpl.php b/include/staff/templates/org-delete.tmpl.php index 5b00aee559e84c5189e5c9317e0fa2b3a0c0eee7..76222df053c66bf666e3d5cf1758deb60218b3f2 100644 --- a/include/staff/templates/org-delete.tmpl.php +++ b/include/staff/templates/org-delete.tmpl.php @@ -1,9 +1,9 @@ <?php if (!$info['title']) - $info['title'] = 'Delete '.Format::htmlchars($org->getName()); + $info['title'] = sprintf(__('Delete %s'), Format::htmlchars($org->getName())); -$info['warn'] = 'Deleted organization CANNOT be recovered'; +$info['warn'] = __('Deleted organization CANNOT be recovered'); ?> <h3><?php echo $info['title']; ?></h3> @@ -40,8 +40,9 @@ if ($info['error']) { <?php if (($users=$org->users->count())) { ?> <hr> - <div> <strong><?php echo sprintf('%d %s', $users, $users>1 ? 'users' : 'user'); - ?> assigned to this organization will be orphaned.</strong></div> + <div> <strong><?php echo sprintf(__( + '%s assigned to this organization will be orphaned.'), + sprintf(_N('One user', '%d users', $users), $users)); ?></strong></div> <?php } ?> <hr> @@ -50,12 +51,12 @@ if ($info['error']) { <input type="hidden" name="id" value="<?php echo $org->getId(); ?>" /> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> + <input type="reset" value="<?php echo __('Reset'); ?>"> <input type="button" name="cancel" class="close" - value="No, Cancel"> + value="<?php echo __('No, Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Yes, Delete"> + <input type="submit" value="<?php echo __('Yes, Delete'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/org-lookup.tmpl.php b/include/staff/templates/org-lookup.tmpl.php index 370310dd13e217f038927e83d55190cf687a6bbb..849eb126ba3684f05f906d0d8d8a884c901963a5 100644 --- a/include/staff/templates/org-lookup.tmpl.php +++ b/include/staff/templates/org-lookup.tmpl.php @@ -1,11 +1,11 @@ <?php if (!$info['title']) - $info['title'] = 'Organization Lookup'; + $info['title'] = __('Organization Lookup'); -$msg_info = 'Search existing organizations or add a new one.'; +$msg_info = __('Search existing organizations or add a new one.'); if ($info['search'] === false) - $msg_info = 'Complete the form below to add a new organization.'; + $msg_info = __('Complete the form below to add a new organization.'); ?> <div id="the-lookup-form"> @@ -34,7 +34,8 @@ if ($info['error']) { <input type="hidden" id="org-id" name="orgid" value="<?php echo $org ? $org->getId() : 0; ?>"/> <i class="icon-group icon-4x pull-left icon-border"></i> <a class="action-button pull-right" style="overflow:inherit" - id="unselect-org" href="#"><i class="icon-remove"></i> Add New Organization</a> + id="unselect-org" href="#"><i class="icon-remove"></i> + <?php echo __('Add New Organization'); ?></a> <div><strong id="org-name"><?php echo $org ? Format::htmlchars($org->getName()) : ''; ?></strong></div> <?php if ($org) { ?> <table style="margin-top: 1em;"> @@ -55,10 +56,10 @@ if ($info['error']) { <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="button" name="cancel" class="close" value="Cancel"> + <input type="button" name="cancel" class="close" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Continue"> + <input type="submit" value="<?php echo __('Continue'); ?>"> </span> </p> </form> @@ -68,16 +69,17 @@ if ($info['error']) { <table width="100%" class="fixed"> <?php if (!$form) $form = OrganizationForm::getInstance(); - $form->render(true, 'Create New Organization'); ?> + $form->render(true, __('Create New Organization')); ?> </table> <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="<?php echo $org ? 'cancel' : 'close' ?>" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="<?php echo $org ? 'cancel' : 'close' ?>" + value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Add Organization"> + <input type="submit" value="<?php echo __('Add Organization'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/org-profile.tmpl.php b/include/staff/templates/org-profile.tmpl.php index 3dda76484b0a7e0432957b2045eff10b83580f9f..a65c65ffb585ad26f72c14cce9bdd3d38c40192a 100644 --- a/include/staff/templates/org-profile.tmpl.php +++ b/include/staff/templates/org-profile.tmpl.php @@ -17,9 +17,10 @@ if ($info['error']) { } ?> <ul class="tabs"> <li><a href="#tab-profile" class="active" - ><i class="icon-edit"></i> Fields</a></li> + ><i class="icon-edit"></i> <?php echo __('Fields'); ?></a></li> <li><a href="#contact-settings" - ><i class="icon-fixed-width icon-cogs faded"></i> Settings</a></li> + ><i class="icon-fixed-width icon-cogs faded"></i> <?php + echo __('Settings'); ?></a></li> </ul> <form method="post" class="org" action="<?php echo $action; ?>"> @@ -44,13 +45,15 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) <tbody> <tr> <td width="180"> - Account Manager: + <?php echo __('Account Manager'); ?>: </td> <td> <select name="manager"> - <option value="0" selected="selected">— None —</option><?php + <option value="0" selected="selected">— <?php + echo __('None'); ?> —</option><?php if ($users=Staff::getAvailableStaffMembers()) { ?> - <optgroup label="Staff Members (<?php echo count($users); ?>)"> + <optgroup label="<?php + echo sprintf(__('Staff Members (%s)', count($users))); ?>"> <?php foreach($users as $id => $name) { $k = "s$id"; echo sprintf('<option value="%s" %s>%s</option>', @@ -60,7 +63,7 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) } if ($teams=Team::getActiveTeams()) { ?> - <optgroup label="Teams (<?php echo count($teams); ?>)"> + <optgroup label="<?php echo sprintf(__('Teams (%d)'), count($teams)); ?>"> <?php foreach($teams as $id => $name) { $k="t$id"; echo sprintf('<option value="%s" %s>%s</option>', @@ -74,15 +77,16 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) </tr> <tr> <td width="180"> - Auto-Assignment: + <?php echo __('Auto-Assignment'); ?>: </td> <td> <input type="checkbox" name="assign-am-flag" value="1" <?php echo $info['assign-am-flag']?'checked="checked"':''; ?>> - Assign tickets from this organization to the <em>Account Manager</em> + <?php echo __( + 'Assign tickets from this organization to the <em>Account Manager</em>'); ?> </tr> <tr> <td width="180"> - Primary Contacts: + <?php echo __('Primary Contacts'); ?>: </td> <td> <select name="contacts[]" id="primary_contacts" multiple="multiple"> @@ -96,35 +100,35 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) </td> <tr> <th colspan="2"> - Automated Collaboration: + <?php echo __('Automated Collaboration'); ?>: </th> </tr> <tr> <td width="180"> - Primary Contacts: + <?php echo __('Primary Contacts'); ?>: </td> <td> <input type="checkbox" name="collab-pc-flag" value="1" <?php echo $info['collab-pc-flag']?'checked="checked"':''; ?>> - Add to all tickets from this organization + <?php echo __('Add to all tickets from this organization'); ?> </td> </tr> <tr> <td width="180"> - Organization Members: + <?php echo __('Organization Members'); ?>: </td> <td> <input type="checkbox" name="collab-all-flag" value="1" <?php echo $info['collab-all-flag']?'checked="checked"':''; ?>> - Add to all tickets from this organization + <?php echo __('Add to all tickets from this organization'); ?> </td> </tr> <tr> <th colspan="2"> - Main Domain + <?php echo __('Main Domain'); ?> </th> </tr> <tr> <td style="width:180px"> - Auto Add Members From: + <?php echo __('Auto Add Members From'); ?>: </td> <td> <input type="text" size="40" maxlength="60" name="domain" @@ -141,12 +145,12 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> + <input type="reset" value="<?php echo __('Reset'); ?>"> <input type="button" name="cancel" class="<?php -echo $account ? 'cancel' : 'close'; ?>" value="Cancel"> +echo $account ? 'cancel' : 'close'; ?>" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Update Organization"> + <input type="submit" value="<?php echo __('Update Organization'); ?>"> </span> </p> </form> @@ -166,6 +170,6 @@ $(function() { $('div#org-profile').fadeIn(); return false; }); - $("#primary_contacts").multiselect({'noneSelectedText':'Select Contacts'}); + $("#primary_contacts").multiselect({'noneSelectedText':'<?php echo __('Select Contacts'); ?>'}); }); </script> diff --git a/include/staff/templates/org.tmpl.php b/include/staff/templates/org.tmpl.php index 4331153dec194cdcab36c0c05679ef0cfc0139dd..222db9837f6a68ec786ba90d9985f7ca42443b94 100644 --- a/include/staff/templates/org.tmpl.php +++ b/include/staff/templates/org.tmpl.php @@ -16,8 +16,10 @@ if ($info['error']) { <?php if ($user) { ?> <a class="action-button pull-right user-action" style="overflow:inherit" - href="#users/<?php echo $user->getId(); ?>/org/<?php echo $org->getId(); ?>" ><i class="icon-user"></i> Change</a> - <a class="action-button pull-right" href="orgs.php?id=<?php echo $org->getId(); ?>"><i class="icon-share"></i> Manage</a> + href="#users/<?php echo $user->getId(); ?>/org/<?php echo $org->getId(); ?>" ><i class="icon-user"></i> + <?php echo __('Change'); ?></a> + <a class="action-button pull-right" href="orgs.php?id=<?php echo $org->getId(); ?>"><i class="icon-share"></i> + <?php echo __('Manage'); ?></a> <?php } ?> <div><b><a href="#" id="editorg"><i class="icon-edit"></i> <?php @@ -41,7 +43,8 @@ if ($info['error']) { <div class="faded">Last updated <b><?php echo Format::db_datetime($org->getUpdateDate()); ?> </b></div> </div> <div id="org-form" style="display:<?php echo $forms ? 'block' : 'none'; ?>;"> -<div><p id="msg_info"><i class="icon-info-sign"></i> Please note that updates will be reflected system-wide.</p></div> +<div><p id="msg_info"><i class="icon-info-sign"></i> <?php echo __( +'Please note that updates will be reflected system-wide.'); ?></p></div> <?php $action = $info['action'] ? $info['action'] : ('#orgs/'.$org->getId()); if ($ticket && $ticket->getOwnerId() == $user->getId()) @@ -59,12 +62,12 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> + <input type="reset" value="<?php echo __('Reset'); ?>"> <input type="button" name="cancel" class="<?php - echo $account ? 'cancel' : 'close'; ?>" value="Cancel"> + echo $account ? 'cancel' : 'close'; ?>" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Update Organization"> + <input type="submit" value="<?php echo __('Update Organization'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/ticket-preview.tmpl.php b/include/staff/templates/ticket-preview.tmpl.php index 8e0fc32b68647b851e8bf798f388a74d2e7c0b17..92d120563de7baa0d55412223407b5d9d773e55d 100644 --- a/include/staff/templates/ticket-preview.tmpl.php +++ b/include/staff/templates/ticket-preview.tmpl.php @@ -9,13 +9,14 @@ $lock=$ticket->getLock(); $error=$msg=$warn=null; if($lock && $lock->getStaffId()==$thisstaff->getId()) - $warn.=' <span class="Icon lockedTicket">Ticket is locked by '.$lock->getStaffName().'</span>'; + $warn.=' <span class="Icon lockedTicket">' + .sprintf(__('Ticket is locked by %s'), $lock->getStaffName()).'</span>'; elseif($ticket->isOverdue()) - $warn.=' <span class="Icon overdueTicket">Marked overdue!</span>'; + $warn.=' <span class="Icon overdueTicket">'.__('Marked overdue!').'</span>'; echo sprintf( '<div style="width:600px; padding: 2px 2px 0 5px;" id="t%s"> - <h2>Ticket #%s: %s</h2><br>', + <h2>'.__('Ticket #%s').': %s</h2><br>', $ticket->getNumber(), $ticket->getNumber(), Format::htmlchars($ticket->getSubject())); @@ -31,12 +32,12 @@ echo '<ul class="tabs">'; echo ' <li><a id="preview_tab" href="#preview" class="active" - ><i class="icon-list-alt"></i> Ticket Summary</a></li>'; + ><i class="icon-list-alt"></i> '.__('Ticket Summary').'</a></li>'; if ($ticket->getNumCollaborators()) { echo sprintf(' <li><a id="collab_tab" href="#collab" ><i class="icon-fixed-width icon-group - faded"></i> Collaborators (%d)</a></li>', + faded"></i> '.__('Collaborators (%d)').'</a></li>', $ticket->getNumCollaborators()); } echo '</ul>'; @@ -47,25 +48,25 @@ echo '<table border="0" cellspacing="" cellpadding="1" width="100%" class="ticke $ticket_state=sprintf('<span>%s</span>',ucfirst($ticket->getStatus())); if($ticket->isOpen()) { if($ticket->isOverdue()) - $ticket_state.=' — <span>Overdue</span>'; + $ticket_state.=' — <span>'.__('Overdue').'</span>'; else $ticket_state.=sprintf(' — <span>%s</span>',$ticket->getPriority()); } echo sprintf(' <tr> - <th width="100">Ticket State:</th> + <th width="100">'.__('Ticket State').':</th> <td>%s</td> </tr> <tr> - <th>Create Date:</th> + <th>'.__('Created').':</th> <td>%s</td> </tr>',$ticket_state, Format::db_datetime($ticket->getCreateDate())); if($ticket->isClosed()) { echo sprintf(' <tr> - <th>Close Date:</th> + <th>'.__('Closed').':</th> <td>%s <span class="faded">by %s</span></td> </tr>', Format::db_datetime($ticket->getCloseDate()), @@ -74,7 +75,7 @@ if($ticket->isClosed()) { } elseif($ticket->getEstDueDate()) { echo sprintf(' <tr> - <th>Due Date:</th> + <th>'.__('Due Date').':</th> <td>%s</td> </tr>', Format::db_datetime($ticket->getEstDueDate())); @@ -87,22 +88,22 @@ echo '<hr> if($ticket->isOpen()) { echo sprintf(' <tr> - <th width="100">Assigned To:</th> + <th width="100">'.__('Assigned To').':</th> <td>%s</td> - </tr>',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' <span class="faded">— Unassigned —</span>'); + </tr>',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' <span class="faded">— '.__('Unassigned').' —</span>'); } echo sprintf( ' <tr> - <th>From:</th> + <th>'.__('From').':</th> <td><a href="users.php?id=%d" class="no-pjax">%s</a> <span class="faded">%s</span></td> </tr> <tr> - <th width="100">Department:</th> + <th width="100">'.__('Department').':</th> <td>%s</td> </tr> <tr> - <th>Help Topic:</th> + <th>'.__('Help Topic').':</th> <td>%s</td> </tr>', $ticket->getUserId(), @@ -131,7 +132,7 @@ echo '</div>'; // ticket preview content. $collab->getEmail()); } } else { - echo "Ticket doesn't have collaborators."; + echo __("Ticket doesn't have any collaborators."); }?> </table> <br> @@ -140,21 +141,21 @@ echo '</div>'; // ticket preview content. href="#tickets/%d/collaborators">%s</a></span>', $ticket->getId(), $ticket->getNumCollaborators() - ? 'Manage Collaborators' : 'Add Collaborator' + ? __('Manage Collaborators') : __('Add Collaborator') ); ?> </div> <?php $options = array(); -$options[]=array('action'=>'Thread ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid"); +$options[]=array('action'=>sprintf(__('Thread (%d)'),$ticket->getThreadCount()),'url'=>"tickets.php?id=$tid"); if($ticket->getNumNotes()) - $options[]=array('action'=>'Notes ('.$ticket->getNumNotes().')','url'=>"tickets.php?id=$tid#notes"); + $options[]=array('action'=>sprintf(__('Notes (%d)'),$ticket->getNumNotes()),'url'=>"tickets.php?id=$tid#notes"); if($ticket->isOpen()) - $options[]=array('action'=>'Reply','url'=>"tickets.php?id=$tid#reply"); + $options[]=array('action'=>__('Reply'),'url'=>"tickets.php?id=$tid#reply"); if($thisstaff->canAssignTickets()) - $options[]=array('action'=>($ticket->isAssigned()?'Reassign':'Assign'),'url'=>"tickets.php?id=$tid#assign"); + $options[]=array('action'=>($ticket->isAssigned()?__('Reassign'):__('Assign')),'url'=>"tickets.php?id=$tid#assign"); if($thisstaff->canTransferTickets()) $options[]=array('action'=>'Transfer','url'=>"tickets.php?id=$tid#transfer"); diff --git a/include/staff/templates/tickets.tmpl.php b/include/staff/templates/tickets.tmpl.php index abf3314ef753f97742d97d7a2398a8f9ef73d919..b84305c0390362146b070bd937d19c05e6f03b11 100644 --- a/include/staff/templates/tickets.tmpl.php +++ b/include/staff/templates/tickets.tmpl.php @@ -57,16 +57,18 @@ if ($results) { <div style="width:700px; float:left;"> <?php if ($results) { - echo sprintf('<strong>Showing 1 - %d of %s</strong>', count($results), count($results)); + echo '<strong>'.sprintf(_N('Showing %d ticket', 'Showing %d tickets', + count($results)), count($results)).'</strong>'; } else { - echo sprintf('%s does not have any tickets', $user? 'User' : 'Organization'); + echo sprintf(__('%s does not have any tickets'), $user? 'User' : 'Organization'); } ?> </div> <div style="float:right;text-align:right;padding-right:5px;"> <?php if ($user) { ?> - <b><a class="Icon newTicket" href="tickets.php?a=open&uid=<?php echo $user->getId(); ?>"> Create New Ticket</a></b> + <b><a class="Icon newTicket" href="tickets.php?a=open&uid=<?php echo $user->getId(); ?>"> + <?php print __('Create New Ticket'); ?></a></b> <?php } ?> </div> @@ -86,17 +88,17 @@ if ($results) { ?> <th width="8px"> </th> <?php } ?> - <th width="70">Ticket</th> - <th width="100">Date</th> - <th width="100">Status</th> - <th width="300">Subject</th> + <th width="70"><?php echo __('Ticket'); ?></th> + <th width="100"><?php echo __('Date'); ?></th> + <th width="100"><?php echo __('Status'); ?></th> + <th width="300"><?php echo __('Subject'); ?></th> <?php if ($user) { ?> - <th width="200">Department</th> - <th width="200">Assignee</th> + <th width="200"><?php echo __('Department'); ?></th> + <th width="200"><?php echo __('Assignee'); ?></th> <?php } else { ?> - <th width="400">User</th> + <th width="400"><?php echo __('User'); ?></th> <?php } ?> </tr> @@ -136,7 +138,8 @@ if ($results) { ?> <?php } ?> <td align="center" nowrap> - <a class="Icon <?php echo strtolower($row['source']); ?>Ticket ticketPreview" title="Preview Ticket" + <a class="Icon <?php echo strtolower($row['source']); ?>Ticket ticketPreview" + title="<?php echo __('Preview Ticket'); ?>" href="tickets.php?id=<?php echo $row['ticket_id']; ?>"><?php echo $tid; ?></a></td> <td align="center" nowrap><?php echo Format::db_datetime($row['effective_date']); ?></td> <td><?php echo $status; ?></td> diff --git a/include/staff/templates/user-account.tmpl.php b/include/staff/templates/user-account.tmpl.php index 8304d8afa975f9d08c48ff1e0717f6e0308eb907..fcea3bd4de9881ec0c241fe706eff44f33961fbd 100644 --- a/include/staff/templates/user-account.tmpl.php +++ b/include/staff/templates/user-account.tmpl.php @@ -17,9 +17,9 @@ if ($info['error']) { } ?> <ul class="tabs"> <li><a href="#user-account" <?php echo !$access? 'class="active"' : ''; ?> - ><i class="icon-user"></i> User Information</a></li> + ><i class="icon-user"></i> <?php echo __('User Information'); ?></a></li> <li><a href="#user-access" <?php echo $access? 'class="active"' : ''; ?> - ><i class="icon-fixed-width icon-lock faded"></i> Manage Access</a></li> + ><i class="icon-fixed-width icon-lock faded"></i> <?php echo __('Manage Access'); ?></a></li> </ul> @@ -32,24 +32,24 @@ if ($info['error']) { <tbody> <tr> <th colspan="2"> - <em><strong>User Information</strong></em> + <em><strong><?php echo __('User Information'); ?></strong></em> </th> </tr> <tr> <td width="180"> - Name: + <?php echo __('Name'); ?>: </td> <td> <?php echo $user->getName(); ?> </td> </tr> <tr> <td width="180"> - Email: + <?php echo __('Email'); ?>: </td> <td> <?php echo $user->getEmail(); ?> </td> </tr> <tr> <td width="180"> - Organization: + <?php echo __('Organization'); ?>: </td> <td> <input type="text" size="35" name="org" value="<?php echo $info['org']; ?>"> @@ -59,9 +59,9 @@ if ($info['error']) { </tbody> <tbody> <tr> - <th colspan="2"><em><strong>User Preferences</strong></em></th> + <th colspan="2"><em><strong><?php echo __('User Preferences'); ?></strong></em></th> </tr> - <td>Time Zone:</td> + <td><?php echo __('Time Zone'); ?>:</td> <td> <select name="timezone_id" id="timezone_id"> <?php @@ -79,11 +79,11 @@ if ($info['error']) { </tr> <tr> <td width="180"> - Daylight Saving: + <?php echo __('Daylight Saving'); ?>: </td> <td> <input type="checkbox" name="dst" value="1" <?php echo $info['dst']?'checked="checked"':''; ?>> - Observe daylight saving + <?php echo __('Observe daylight saving'); ?> </td> </tr> </tbody> @@ -93,15 +93,15 @@ if ($info['error']) { <table width="100%"> <tbody> <tr> - <th colspan="2"><em><strong>Account Access</strong></em></th> + <th colspan="2"><em><strong><?php echo __('Account Access'); ?></strong></em></th> </tr> <tr> - <td width="180"> Status: </td> + <td width="180"><?php echo __('Status'); ?>:</td> <td> <?php echo $user->getAccountStatus(); ?> </td> </tr> <tr> <td width="180"> - Username: + <?php echo __('Username'); ?>: </td> <td> <input type="text" size="35" name="username" value="<?php echo $info['username'] ?: $user->getEmail(); ?>"> @@ -110,7 +110,7 @@ if ($info['error']) { </tr> <tr> <td width="180"> - New Password: + <?php echo __('New Password'); ?>: </td> <td> <input type="password" size="35" name="passwd1" value="<?php echo $info['passwd1']; ?>"> @@ -120,7 +120,7 @@ if ($info['error']) { </tr> <tr> <td width="180"> - Confirm Password: + <?php echo __('Confirm Password'); ?>: </td> <td> <input type="password" size="35" name="passwd2" value="<?php echo $info['passwd2']; ?>"> @@ -130,22 +130,23 @@ if ($info['error']) { </tbody> <tbody> <tr> - <th colspan="2"><em><strong>Account Flags</strong></em></th> + <th colspan="2"><em><strong><?php echo __('Account Flags'); ?></strong></em></th> </tr> <tr> <td colspan="2"> <?php echo sprintf('<div><input type="checkbox" name="locked-flag" %s - value="1"> Administratively Locked</div>', - $account->isLocked() ? 'checked="checked"' : '' + value="1"> %s</div>', + $account->isLocked() ? 'checked="checked"' : '', + __('Administratively Locked') ); ?> <div><input type="checkbox" name="pwreset-flag" value="1" <?php echo $account->isPasswdResetForced() ? - 'checked="checked"' : ''; ?>> Password Reset Required</div> + 'checked="checked"' : ''; ?>> <?php echo __('Password Reset Required'); ?></div> <div><input type="checkbox" name="forbid-pwchange-flag" value="1" <?php echo !$account->isPasswdResetEnabled() ? - 'checked="checked"' : ''; ?>> User Cannot Change Password</div> + 'checked="checked"' : ''; ?>> <?php echo __('User Cannot Change Password'); ?></div> </td> </tr> </tbody> @@ -154,12 +155,12 @@ if ($info['error']) { <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="close" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="close" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> <input type="submit" - value="Save Changes"> + value="<?php echo __('Save Changes'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/user-delete.tmpl.php b/include/staff/templates/user-delete.tmpl.php index ae9b5ca1ceab456598eb8d4dfe3f47ef763751b3..876b5d14ee278b3505b7291ca2fa53710246c15d 100644 --- a/include/staff/templates/user-delete.tmpl.php +++ b/include/staff/templates/user-delete.tmpl.php @@ -1,9 +1,9 @@ <?php if (!$info['title']) - $info['title'] = 'Delete User: '.Format::htmlchars($user->getName()); + $info['title'] = sprintf(__('Delete User: %s'), Format::htmlchars($user->getName())); -$info['warn'] = 'Deleted users and tickets CANNOT be recovered'; +$info['warn'] = __('Deleted users and tickets CANNOT be recovered'); ?> <h3><?php echo $info['title']; ?></h3> @@ -26,7 +26,7 @@ if ($info['error']) { if (0 && $user->getNumTickets()) { ?> <a class="action-button pull-right change-user" style="overflow:inherit" href="#users/<?php echo $user->getId(); ?>/replace" ><i - class="icon-user"></i> Change Tickets Ownership</a> + class="icon-user"></i> <?php echo __('Change Tickets Ownership'); ?></a> <?php } ?> <div><b> <?php echo Format::htmlchars($user->getName()->getOriginal()); ?></b></div> @@ -53,23 +53,24 @@ if ($info['error']) { <?php if (($num=$user->tickets->count())) { - echo sprintf('<div><input type="checkbox" name="deletetickets" value="1" > - <strong>Delete <a href="tickets.php?a=search&uid=%d" target="_blank">%d - %s</a> and any associated attachments and data.</strong></div><hr>', - $user->getId(), - $num, - ($num >1) ? 'tickets' : 'ticket' - ); + echo '<div><input type="checkbox" name="deletetickets" value="1" > <strong>' + .sprintf(__('Delete %1$s %2$s %3$s and any associated attachments and data.'), + sprintf('<a href="tickets.php?a=search&uid=%d" target="_blank">', + $user->getId()), + sprintf(_N('one ticket', '%d tickets', $num), $num), + '</a>' + ) + .'</strong></div><hr>'; } ?> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> + <input type="reset" value="<?php echo __('Reset'); ?>"> <input type="button" name="cancel" class="close" - value="No, Cancel"> + value="<?php echo __('No, Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Yes, Delete User"> + <input type="submit" value="<?php echo __('Yes, Delete User'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/user-import.tmpl.php b/include/staff/templates/user-import.tmpl.php index 581f1cb48b3c6e191d14c99df80b7995deb16b95..25a261e39c1bf03dcd39dbdca6720a67442a6805 100644 --- a/include/staff/templates/user-import.tmpl.php +++ b/include/staff/templates/user-import.tmpl.php @@ -12,9 +12,9 @@ if ($info['error']) { } ?> <ul class="tabs"> <li><a href="#copy-paste" class="active" - ><i class="icon-edit"></i> Copy Paste</a></li> + ><i class="icon-edit"></i> <?php echo __('Copy Paste'); ?></a></li> <li><a href="#upload" - ><i class="icon-fixed-width icon-cloud-upload"></i> Upload</a></li> + ><i class="icon-fixed-width icon-cloud-upload"></i> <?php echo __('Upload'); ?></a></li> </ul> <form action="<?php echo $info['action']; ?>" method="post" enctype="multipart/form-data" onsubmit="javascript: @@ -28,30 +28,30 @@ if ($org_id) { ?> <?php } ?> <div class="tab_content" id="copy-paste" style="margin:5px;"> -<h2 style="margin-bottom:10px">Name and Email</h2> -<p> -Enter one name and email address per line.<br/> -<em>To import more other fields, use the Upload tab.</em> +<h2 style="margin-bottom:10px"><?php echo __('Name and Email'); ?></h2> +<p><?php echo __( +'Enter one name and email address per line.'); ?><br/><em><?php echo __( +'To import more other fields, use the Upload tab.'); ?></em> </p> <textarea name="pasted" style="display:block;width:100%;height:8em" - placeholder="e.g. John Doe, john.doe@osticket.com"> + placeholder="<?php echo __('e.g. John Doe, john.doe@osticket.com'); ?>"> <?php echo $info['pasted']; ?> </textarea> </div> <div class="tab_content" id="upload" style="display:none;margin:5px;"> -<h2 style="margin-bottom:10px">Import a CSV File</h2> +<h2 style="margin-bottom:10px"><?php echo __('Import a CSV File'); ?></h2> <p> -<em>Use the columns shown in the table below. To add more fields, visit the -Admin Panel -> Manage -> Forms -> <?php echo -UserForm::getUserForm()->get('title'); ?> page to edit the available fields. -Only fields with `variable` defined can be imported.</em> +<em><?php echo sprintf(__( +'Use the columns shown in the table below. To add more fields, visit the Admin Panel -> Manage -> Forms -> %s page to edit the available fields. Only fields with `variable` defined can be imported.'), + UserForm::getUserForm()->get('title') +); ?> </p> <table class="list"><tr> <?php $fields = array(); $data = array( - array('name' => 'John Doe', 'email' => 'john.doe@osticket.com') + array('name' => __('John Doe'), 'email' => __('john.doe@osticket.com')) ); foreach (UserForm::getUserForm()->getFields() as $f) if ($f->get('name')) @@ -75,11 +75,12 @@ Only fields with `variable` defined can be imported.</em> <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="close" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="close" value="<?php + echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Import Users"> + <input type="submit" value="<?php echo __('Import Users'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/user-lookup.tmpl.php b/include/staff/templates/user-lookup.tmpl.php index d21d457d2d1c6fe1bb7d6236bfdad276998111a8..d6f1aa225135a596e550c8e1191641642293b601 100644 --- a/include/staff/templates/user-lookup.tmpl.php +++ b/include/staff/templates/user-lookup.tmpl.php @@ -4,7 +4,9 @@ <hr/> <?php if (!isset($info['lookup']) || $info['lookup'] !== false) { ?> -<div><p id="msg_info"><i class="icon-info-sign"></i> Search existing users or add a new user.</p></div> +<div><p id="msg_info"><i class="icon-info-sign"></i> <?php echo __( +'Search existing users or add a new user.' +); ?></p></div> <div style="margin-bottom:10px;"> <input type="text" class="search-input" style="width:100%;" placeholder="Search by email, phone or name" id="user-search" @@ -25,7 +27,8 @@ if ($info['error']) { <input type="hidden" id="user-id" name="id" value="<?php echo $user ? $user->getId() : 0; ?>"/> <i class="icon-user icon-4x pull-left icon-border"></i> <a class="action-button pull-right" style="overflow:inherit" - id="unselect-user" href="#"><i class="icon-remove"></i> Add New User</a> + id="unselect-user" href="#"><i class="icon-remove"></i> + <?php echo __('Add New User'); ?></a> <?php if ($user) { ?> <div><strong id="user-name"><?php echo Format::htmlchars($user->getName()->getOriginal()); ?></strong></div> <div><<span id="user-email"><?php echo $user->getEmail(); ?></span>></div> @@ -52,10 +55,11 @@ if ($info['error']) { <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="button" name="cancel" class="close" value="Cancel"> + <input type="button" name="cancel" class="close" value="<?php + echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Continue"> + <input type="submit" value="<?php echo __('Continue'); ?>"> </span> </p> </form> @@ -65,16 +69,16 @@ if ($info['error']) { <table width="100%" class="fixed"> <?php if(!$form) $form = UserForm::getInstance(); - $form->render(true, 'Create New User'); ?> + $form->render(true, __('Create New User')); ?> </table> <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="<?php echo $user ? 'cancel' : 'close' ?>" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="<?php echo $user ? 'cancel' : 'close' ?>" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Add User"> + <input type="submit" value="<?php echo __('Add User'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/user-register.tmpl.php b/include/staff/templates/user-register.tmpl.php index 99fbc3f348259f3cab5b7e21fc97b2c76ed5cc71..1af7e4af89c8cb686894367b4274847f66c31475 100644 --- a/include/staff/templates/user-register.tmpl.php +++ b/include/staff/templates/user-register.tmpl.php @@ -2,7 +2,7 @@ global $cfg; if (!$info['title']) - $info['title'] = 'Register: '.Format::htmlchars($user->getName()); + $info['title'] = sprintf(__('Register: %s'), Format::htmlchars($user->getName())); if (!$_POST) { @@ -26,9 +26,12 @@ if ($info['error']) { } elseif ($info['msg']) { echo sprintf('<p id="msg_notice">%s</p>', $info['msg']); } ?> -<div><p id="msg_info"><i class="icon-info-sign"></i> Complete the form -below to create a user account for <b><?php echo -$user->getName()->getOriginal(); ?></b>.</p></div> +<div><p id="msg_info"><i class="icon-info-sign"></i> <?php +echo sprintf(__( +'Complete the form below to create a user account for <b>%s</b>.' +), $user->getName()->getOriginal() +); ?> +</p></div> <div id="user-registration" style="display:block; margin:5px;"> <form method="post" class="user" action="#users/<?php echo $user->getId(); ?>/register"> @@ -37,11 +40,11 @@ $user->getName()->getOriginal(); ?></b>.</p></div> <tbody> <tr> <th colspan="2"> - <em><strong>User Account Login</strong></em> + <em><strong><?php echo __('User Account Login'); ?></strong></em> </th> </tr> <tr> - <td>Authentication Sources:</td> + <td><?php echo __('Authentication Sources'); ?>:</td> <td> <select name="backend" id="backend-selection" onchange="javascript: if (this.value != '' && this.value != 'client') { @@ -56,7 +59,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div> $('#password').show(); } "> - <option value="">— Use any available backend —</option> + <option value="">— <?php echo __('Use any available backend'); ?> —</option> <?php foreach (UserAuthenticationBackend::allRegistered() as $ab) { if (!$ab->supportsInteractiveAuthentication()) continue; ?> <option value="<?php echo $ab::$id; ?>" <?php @@ -69,7 +72,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div> </tr> <tr> <td width="180"> - Username: + <?php echo __('Username'); ?>: </td> <td> <input type="text" size="35" name="username" value="<?php echo $info['username'] ?: $user->getEmail(); ?>"> @@ -80,12 +83,13 @@ $user->getName()->getOriginal(); ?></b>.</p></div> <tbody id="activation"> <tr> <td width="180"> - Status: + <?php echo __('Status'); ?>: </td> <td> <input type="checkbox" id="sendemail" name="sendemail" value="1" - <?php echo $info['sendemail'] ? 'checked="checked"' : ''; ?> > - Send account activation email to <?php echo $user->getEmail(); ?>. + <?php echo $info['sendemail'] ? 'checked="checked"' : + ''; ?> ><?php echo sprintf(__( + 'Send account activation email to %s.'), $user->getEmail()); ?> </td> </tr> </tbody> @@ -94,7 +98,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div> > <tr> <td width="180"> - Temp. Password: + <?php echo __('Temporary Password'); ?>: </td> <td> <input type="password" size="35" name="passwd1" value="<?php echo $info['passwd1']; ?>"> @@ -104,7 +108,7 @@ $user->getName()->getOriginal(); ?></b>.</p></div> </tr> <tr> <td width="180"> - Confirm Password: + <?php echo __('Confirm Password'); ?>: </td> <td> <input type="password" size="35" name="passwd2" value="<?php echo $info['passwd2']; ?>"> @@ -113,22 +117,25 @@ $user->getName()->getOriginal(); ?></b>.</p></div> </tr> <tr> <td> - Password Change: + <?php echo __('Password Change'); ?>: </td> <td colspan=2> <input type="checkbox" name="pwreset-flag" value="1" <?php - echo $info['pwreset-flag'] ? 'checked="checked"' : ''; ?>> Require password change on login + echo $info['pwreset-flag'] ? 'checked="checked"' : ''; ?>> + <?php echo __('Require password change on login'); ?> <br/> <input type="checkbox" name="forbid-pwreset-flag" value="1" <?php - echo $info['forbid-pwreset-flag'] ? 'checked="checked"' : ''; ?>> User cannot change password + echo $info['forbid-pwreset-flag'] ? 'checked="checked"' : ''; ?>> + <?php echo __('User cannot change password'); ?> </td> </tr> </tbody> <tbody> <tr> - <th colspan="2"><em><strong>User Preferences</strong></em></th> + <th colspan="2"><em><strong><?php echo + __('User Preferences'); ?></strong></em></th> </tr> - <td>Time Zone:</td> + <td><?php echo __('Time Zone'); ?>:</td> <td> <select name="timezone_id" id="timezone_id"> <?php @@ -147,11 +154,11 @@ $user->getName()->getOriginal(); ?></b>.</p></div> </tr> <tr> <td width="180"> - Daylight Saving: + <?php echo __('Daylight Saving'); ?>: </td> <td> <input type="checkbox" name="dst" value="1" <?php echo $info['dst'] ? 'checked="checked"' : ''; ?>> - Observe daylight saving + <?php echo __('Observe daylight saving'); ?> </td> </tr> </tbody> @@ -159,11 +166,11 @@ $user->getName()->getOriginal(); ?></b>.</p></div> <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> - <input type="button" name="cancel" class="close" value="Cancel"> + <input type="reset" value="<?php echo __('Reset'); ?>"> + <input type="button" name="cancel" class="close" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Create Account"> + <input type="submit" value="<?php echo __('Create Account'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/user.tmpl.php b/include/staff/templates/user.tmpl.php index 52f5f9fc7fc44b455649cd35bdccf7354b4406ea..68d551a05a0b6cb2b8b851dccf46640405f66cdd 100644 --- a/include/staff/templates/user.tmpl.php +++ b/include/staff/templates/user.tmpl.php @@ -20,7 +20,8 @@ if ($info['error']) { <?php if ($ticket) { ?> <a class="action-button pull-right change-user" style="overflow:inherit" - href="#tickets/<?php echo $ticket->getId(); ?>/change-user" ><i class="icon-user"></i> Change User</a> + href="#tickets/<?php echo $ticket->getId(); ?>/change-user" ><i class="icon-user"></i> + <?php echo __('Change User'); ?></a> <?php } ?> <div><b><?php @@ -35,22 +36,22 @@ if ($info['error']) { <div class="clear"></div> <ul class="tabs" style="margin-top:5px"> <li><a href="#info-tab" class="active" - ><i class="icon-info-sign"></i> User</a></li> + ><i class="icon-info-sign"></i> <?php echo __('User'); ?></a></li> <?php if ($org) { ?> <li><a href="#organization-tab" - ><i class="icon-fixed-width icon-building"></i> Organization</a></li> + ><i class="icon-fixed-width icon-building"></i> <?php echo __('Organization'); ?></a></li> <?php } $ext_id = "U".$user->getId(); $notes = QuickNote::forUser($user, $org)->all(); ?> <li><a href="#notes-tab" - ><i class="icon-fixed-width icon-pushpin"></i> Notes</a></li> + ><i class="icon-fixed-width icon-pushpin"></i> <?php echo __('Notes'); ?></a></li> </ul> <div class="tab_content" id="info-tab"> <div class="floating-options"> <a href="<?php echo $info['useredit'] ?: '#'; ?>" id="edituser" class="action" title="Edit"><i class="icon-edit"></i></a> - <a href="users.php?id=<?php echo $user->getId(); ?>" title="Manage User" - class="action"><i class="icon-share"></i></a> + <a href="users.php?id=<?php echo $user->getId(); ?>" title="<?php + echo __('Manage User'); ?>" class="action"><i class="icon-share"></i></a> </div> <table class="custom-info" width="100%"> <?php foreach ($user->getDynamicData() as $entry) { @@ -71,8 +72,8 @@ if ($info['error']) { <?php if ($org) { ?> <div class="tab_content" id="organization-tab" style="display:none"> <div class="floating-options"> - <a href="orgs.php?id=<?php echo $org->getId(); ?>" title="Manage Organization" - class="action"><i class="icon-share"></i></a> + <a href="orgs.php?id=<?php echo $org->getId(); ?>" title="<?php + echo __('Manage Organization'); ?>" class="action"><i class="icon-share"></i></a> </div> <table class="custom-info" width="100%"> <?php foreach ($org->getDynamicData() as $entry) { @@ -100,7 +101,8 @@ foreach ($notes as $note) <div class="quicknote no-options" id="new-note" data-url="users/<?php echo $user->getId(); ?>/note"> <div class="body"> - <a href="#"><i class="icon-plus icon-large"></i> Click to create a new note</a> + <a href="#"><i class="icon-plus icon-large"></i> + <?php echo __('Click to create a new note'); ?></a> </div> </div> </div> @@ -108,7 +110,9 @@ foreach ($notes as $note) </div> <div id="user-form" style="display:<?php echo $forms ? 'block' : 'none'; ?>;"> -<div><p id="msg_info"><i class="icon-info-sign"></i> Please note that updates will be reflected system-wide.</p></div> +<div><p id="msg_info"><i class="icon-info-sign"></i> <?php echo __( +'Please note that updates will be reflected system-wide.' +); ?></p></div> <?php $action = $info['action'] ? $info['action'] : ('#users/'.$user->getId()); if ($ticket && $ticket->getOwnerId() == $user->getId()) @@ -126,12 +130,12 @@ if ($ticket && $ticket->getOwnerId() == $user->getId()) <hr> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="reset" value="Reset"> + <input type="reset" value="<?php echo __('Reset'); ?>"> <input type="button" name="cancel" class="<?php - echo ($ticket && $user) ? 'cancel' : 'close' ?>" value="Cancel"> + echo ($ticket && $user) ? 'cancel' : 'close' ?>" value="<?php echo __('Cancel'); ?>"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="Update User"> + <input type="submit" value="<?php echo __('Update User'); ?>"> </span> </p> </form> diff --git a/include/staff/templates/users.tmpl.php b/include/staff/templates/users.tmpl.php index 42ad7e6f1d1317df697f492cb7a9bb5a0949cfee..092b8bb04fa554d99892dba8e1403daeb948cb9f 100644 --- a/include/staff/templates/users.tmpl.php +++ b/include/staff/templates/users.tmpl.php @@ -45,20 +45,22 @@ $from .= ' LEFT JOIN '.TICKET_TABLE.' ticket ON (ticket.user_id = user.id) '; $query="$select $from $where GROUP BY user.id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit(); //echo $query; -$showing = $search ? 'Search Results: ' : ''; +$showing = $search ? __('Search Results').': ' : ''; $res = db_query($query); if($res && ($num=db_num_rows($res))) $showing .= $pageNav->showing(); else - $showing .= "This organization doesn't have any users yet"; + $showing .= __("This organization doesn't have any users yet"); ?> <div style="width:700px; float:left;"><b><?php echo $showing; ?></b></div> <div style="float:right;text-align:right;padding-right:5px;"> - <b><a href="#orgs/<?php echo $org->getId(); ?>/add-user" class="Icon newstaff add-user">Add User</a></b> + <b><a href="#orgs/<?php echo $org->getId(); ?>/add-user" class="Icon newstaff add-user" + ><?php echo __('Add User'); ?></a></b> | <b><a href="#orgs/<?php echo $org->getId(); ?>/import-users" class="add-user"> - <i class="icon-cloud-upload icon-large"></i> Import</a></b> + <i class="icon-cloud-upload icon-large"></i> + <?php echo __('Import'); ?></a></b> </div> <div class="clear"></div> <br/> @@ -73,10 +75,10 @@ if ($num) { ?> <thead> <tr> <th width="7px"> </th> - <th width="350"> Name</th> - <th width="300"> Email</th> - <th width="100"> Status</th> - <th width="100"> Created</th> + <th width="350"><?php echo __('Name'); ?></th> + <th width="300"><?php echo __('Email'); ?></th> + <th width="100"><?php echo __('Status'); ?></th> + <th width="100"><?php echo __('Created'); ?></th> </tr> </thead> <tbody> @@ -119,13 +121,13 @@ if ($num) { ?> <?php if ($res && $num) { ?> - Select: - <a id="selectAll" href="#ckb">All</a> - <a id="selectNone" href="#ckb">None</a> - <a id="selectToggle" href="#ckb">Toggle</a> + <?php echo __('Select'); ?>: + <a id="selectAll" href="#ckb"><?php echo __('All'); ?></a> + <a id="selectNone" href="#ckb"><?php echo __('None'); ?></a> + <a id="selectToggle" href="#ckb"><?php echo __('Toggle'); ?></a> <?php } else { - echo 'No users found'; + echo __('No users found!'); } ?> </td> @@ -134,11 +136,11 @@ if ($num) { ?> </table> <?php if ($res && $num) { //Show options.. - echo '<div> Page:'.$pageNav->getPageLinks().' </div>'; + echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <p class="centered" id="actions"> - <input class="button" type="submit" name="remove-users" value="Remove" > + <input class="button" type="submit" name="remove-users" value="<?php echo __('Remove'); ?>" > </p> <?php } @@ -148,21 +150,22 @@ if ($res && $num) { //Show options.. } ?> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="remove-users-confirm"> - Are you sure want to <b>REMOVE</b> selected user from <strong><?php - echo $org->getName(); ?></strong> organization? + <?php echo sprintf(__( + 'Are you sure want to <b>REMOVE</b> selected user from <strong>%s</strong> organization?'), + $org->getName()); ?> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="button" value="No, Cancel" class="close"> + <input type="button" value="<?php echo __('No, Cancel'); ?>" class="close"> </span> <span class="buttons" style="float:right"> - <input type="button" value="Yes, Do it!" class="confirm"> + <input type="button" value="<?php echo __('Yes, Do it!'); ?>" class="confirm"> </span> </p> <div class="clear"></div> diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index 84c0b2a241946041bf38418490fec8cb8868eab4..72a29371b612c41eb9941545bb8facde1b05d82b 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -106,7 +106,7 @@ if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) { <tbody> <tr> <th colspan="2"> - <em><strong><?php echo __('Ticket Information & Options');?></strong>:</em> + <em><strong><?php echo __('Ticket Information and Options');?></strong>:</em> </th> </tr> <tr> diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 2fd946ef92078b97a75e0e0f9842dd5e933c61b9..e2231b88037af78b744d8fda45689d0267861ffd 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -98,7 +98,9 @@ if($ticket->isOverdue()) <ul> <?php if($thisstaff->canEditTickets()) { ?> - <li><a class="change-user" href="#tickets/<?php echo $ticket->getId(); ?>/change-user"><i class="icon-user"></i> Change Ticket Owner</a></li> + <li><a class="change-user" href="#tickets/<?php + echo $ticket->getId(); ?>/change-user"><i class="icon-user"></i> <?php + echo __('Change Ticket Owner'); ?></a></li> <?php } if($ticket->isOpen() && ($dept && $dept->isManager($thisstaff))) { @@ -280,7 +282,7 @@ if($ticket->isOverdue()) } ?> <tr> <th><?php echo __('SLA Plan');?>:</th> - <td><?php echo $sla?Format::htmlchars($sla->getName()):'<span class="faded">— '.__('none').' —</span>'; ?></td> + <td><?php echo $sla?Format::htmlchars($sla->getName()):'<span class="faded">— '.__('None').' —</span>'; ?></td> </tr> <?php if($ticket->isOpen()){ ?> @@ -480,7 +482,7 @@ $tcount+= $ticket->getNumNotes(); style="display:<?php echo $emailReply? 'table-row-group':'none'; ?>;"> <tr> <td width="120"> - <label><strong>Collaborators:</strong></label> + <label><strong><?php echo __('Collaborators'); ?>:</strong></label> </td> <td> <input type='checkbox' value='1' name="emailcollab" id="emailcollab" @@ -488,9 +490,9 @@ $tcount+= $ticket->getNumNotes(); style="display:<?php echo $ticket->getNumCollaborators() ? 'inline-block': 'none'; ?>;" > <?php - $recipients = 'Add Recipients'; + $recipients = __('Add Recipients'); if ($ticket->getNumCollaborators()) - $recipients = sprintf('Recipients (%d of %d)', + $recipients = sprintf(__('Recipients (%d of %d)'), $ticket->getNumActiveCollaborators(), $ticket->getNumCollaborators()); @@ -546,7 +548,9 @@ $tcount+= $ticket->getNumNotes(); data-signature-field="signature" data-dept-id="<?php echo $dept->getId(); ?>" data-signature="<?php echo Format::htmlchars(Format::viewableImages($signature)); ?>" - placeholder="Start writing your response here. Use canned responses from the drop-down above" + placeholder="<?php echo __( + 'Start writing your response here. Use canned responses from the drop-down above' + ); ?>" data-draft-object-id="<?php echo $ticket->getId(); ?>" rows="9" wrap="soft" class="richtext ifhtml draft draft-delete"><?php @@ -783,7 +787,7 @@ $tcount+= $ticket->getNumNotes(); </td> <td> <textarea name="transfer_comments" id="transfer_comments" - placeholder="<?php echo _('Enter reasons for the transfer'); ?>" + placeholder="<?php echo __('Enter reasons for the transfer'); ?>" class="richtext ifhtml no-bar" cols="80" rows="7" wrap="soft"><?php echo $info['transfer_comments']; ?></textarea> <span class="error"><?php echo $errors['transfer_comments']; ?></span> @@ -850,7 +854,7 @@ $tcount+= $ticket->getNumNotes(); } if(($teams=Team::getActiveTeams())) { - echo '<OPTGROUP label="'.__('Teams').' ('.count($teams).')">'; + echo '<OPTGROUP label="'.sprintf(__('Teams (%d)'), count($teams)).'">'; $teamId=(!$sid && $ticket->isAssigned())?$ticket->getTeamId():0; foreach($teams as $id => $name) { if($teamId && $teamId==$id) @@ -866,10 +870,10 @@ $tcount+= $ticket->getNumNotes(); </select> <span class='error'>* <?php echo $errors['assignId']; ?></span> <?php if ($ticket->isAssigned() && $ticket->isOpen()) { ?> - <div class="faded"><?php echo sprintf(_('Ticket is currently assigned to %s'), + <div class="faded"><?php echo sprintf(__('Ticket is currently assigned to %s'), sprintf('<b>%s</b>', $ticket->getAssignee())); ?></div> <?php } elseif ($ticket->isClosed()) { ?> - <div class="faded"><?php echo _('Assigning a closed ticket will <b>reopen</b> it!'); ?></div> + <div class="faded"><?php echo __('Assigning a closed ticket will <b>reopen</b> it!'); ?></div> <?php } ?> </td> </tr> diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 57d51b9eaeb0256aef2851a77352128ba480b846..1be913b4c6e057a63149f07da09d27540f0e7e33 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -257,7 +257,8 @@ $_SESSION['search_'.$hash] = $query; $res = db_query($query); $showing=db_num_rows($res)?$pageNav->showing():""; if(!$results_type) - $results_type = ucfirst($status).' Tickets'; + $results_type = sprintf(__('%s Tickets' /* %s will be a status such as 'open' */), + mb_convert_case($status, MB_CASE_TITLE)); if($search) $results_type.= ' ('.__('Search Results').')'; diff --git a/include/staff/user-view.inc.php b/include/staff/user-view.inc.php index 6a29a3a0ef740093dd1b62c5bc2cb9a2a6141c95..5962bbf8583cf9eadefb48703e9abbf7b1797e03 100644 --- a/include/staff/user-view.inc.php +++ b/include/staff/user-view.inc.php @@ -18,15 +18,18 @@ $org = $user->getOrganization(); <i class="icon-caret-down"></i> </span> <a id="user-delete" class="action-button user-action" - href="#users/<?php echo $user->getId(); ?>/delete"><i class="icon-trash"></i> Delete User</a> + href="#users/<?php echo $user->getId(); ?>/delete"><i class="icon-trash"></i> + <?php echo __('Delete User'); ?></a> <?php if ($account) { ?> <a id="user-manage" class="action-button user-action" - href="#users/<?php echo $user->getId(); ?>/manage"><i class="icon-edit"></i> Manage Account</a> + href="#users/<?php echo $user->getId(); ?>/manage"><i class="icon-edit"></i> + <?php echo __('Manage Account'); ?></a> <?php } else { ?> <a id="user-register" class="action-button user-action" - href="#users/<?php echo $user->getId(); ?>/register"><i class="icon-edit"></i> Register</a> + href="#users/<?php echo $user->getId(); ?>/register"><i class="icon-edit"></i> + <?php echo __('Register'); ?></a> <?php } ?> <div id="action-dropdown-more" class="action-dropdown anchor-right"> @@ -36,16 +39,19 @@ $org = $user->getOrganization(); if (!$account->isConfirmed()) { ?> <li><a class="confirm-action" href="#confirmlink"><i - class="icon-envelope"></i> Send Activation Email</a></li> + class="icon-envelope"></i> + <?php echo __('Send Activation Email'); ?></a></li> <?php } else { ?> <li><a class="confirm-action" href="#pwreset"><i - class="icon-envelope"></i> Send Password Reset Email</a></li> + class="icon-envelope"></i> + <?php echo __('Send Password Reset Email'); ?></a></li> <?php } ?> <li><a class="user-action" href="#users/<?php echo $user->getId(); ?>/manage/access"><i - class="icon-lock"></i> Manage Account Access</a></li> + class="icon-lock"></i> + <?php echo __('Manage Account Access'); ?></a></li> <?php } ?> @@ -53,7 +59,8 @@ $org = $user->getOrganization(); ?>/forms/manage" onclick="javascript: $.dialog($(this).attr('href').substr(1), 201); return false" - ><i class="icon-paste"></i> Manage Forms</a></li> + ><i class="icon-paste"></i> + <?php echo __('Manage Forms'); ?></a></li> </ul> </div> @@ -65,7 +72,7 @@ $org = $user->getOrganization(); <td width="50%"> <table border="0" cellspacing="" cellpadding="4" width="100%"> <tr> - <th width="150">Name:</th> + <th width="150"><?php echo __('Name'); ?>:</th> <td><b><a href="#users/<?php echo $user->getId(); ?>/edit" class="user-action"><i class="icon-edit"></i> <?php echo @@ -73,13 +80,13 @@ $org = $user->getOrganization(); ?></a></td> </tr> <tr> - <th>Email:</th> + <th><?php echo __('Email'); ?>:</th> <td> <span id="user-<?php echo $user->getId(); ?>-email"><?php echo $user->getEmail(); ?></span> </td> </tr> <tr> - <th>Organization:</th> + <th><?php echo __('Organization'); ?>:</th> <td> <span id="user-<?php echo $user->getId(); ?>-org"> <?php @@ -99,16 +106,16 @@ $org = $user->getOrganization(); <td width="50%" style="vertical-align:top"> <table border="0" cellspacing="" cellpadding="4" width="100%"> <tr> - <th width="150">Status:</th> + <th width="150"><?php echo __('Status'); ?>:</th> <td> <span id="user-<?php echo $user->getId(); ?>-status"><?php echo $user->getAccountStatus(); ?></span></td> </tr> <tr> - <th>Created:</th> + <th><?php echo __('Created'); ?>:</th> <td><?php echo Format::db_datetime($user->getCreateDate()); ?></td> </tr> <tr> - <th>Updated:</th> + <th><?php echo __('Updated'); ?>:</th> <td><?php echo Format::db_datetime($user->getUpdateDate()); ?></td> </tr> </table> @@ -119,9 +126,9 @@ $org = $user->getOrganization(); <div class="clear"></div> <ul class="tabs"> <li><a class="active" id="tickets_tab" href="#tickets"><i - class="icon-list-alt"></i> User Tickets</a></li> + class="icon-list-alt"></i> <?php echo __('User Tickets'); ?></a></li> <li><a id="notes_tab" href="#notes"><i - class="icon-pushpin"></i> Notes</a></li> + class="icon-pushpin"></i> <?php echo __('Notes'); ?></a></li> </ul> <div id="tickets" class="tab_content"> <?php @@ -138,20 +145,25 @@ include STAFFINC_DIR . 'templates/notes.tmpl.php'; </div> <div style="display:none;" class="dialog" id="confirm-action"> - <h3>Please Confirm</h3> + <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="banemail-confirm"> - Are you sure want to <b>ban</b> <?php echo $user->getEmail(); ?>? <br><br> - New tickets from the email address will be auto-rejected. + <?php echo sprintf(__('Are you sure want to <b>ban</b> %s?'), $user->getEmail()); ?> + <br><br> + <?php echo __('New tickets from the email address will be auto-rejected.'); ?> </p> <p class="confirm-action" style="display:none;" id="confirmlink-confirm"> - Are you sure want to send <b>Account Activation Link</b> to <em><?php echo $user->getEmail()?></em>? + <?php echo sprintf(__( + 'Are you sure want to send an <b>Account Activation Link</b> to <em> %s </em>?'), + $user->getEmail()); ?> </p> <p class="confirm-action" style="display:none;" id="pwreset-confirm"> - Are you sure want to send <b>Password Reset Link</b> to <em><?php echo $user->getEmail()?></em>? + <?php echo sprintf(__( + 'Are you sure want to send a <b>Password Reset Link</b> to <em> %s </em>?'), + $user->getEmail()); ?> </p> - <div>Please confirm to continue.</div> + <div><?php echo __('Please confirm to continue.'); ?></div> <form action="users.php?id=<?php echo $user->getId(); ?>" method="post" id="confirm-form" name="confirm-form"> <?php csrf_token(); ?> <input type="hidden" name="id" value="<?php echo $user->getId(); ?>"> @@ -160,10 +172,10 @@ include STAFFINC_DIR . 'templates/notes.tmpl.php'; <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons" style="float:left"> - <input type="button" value="Cancel" class="close"> + <input type="button" value="<?php echo __('Cancel'); ?>" class="close"> </span> <span class="buttons" style="float:right"> - <input type="submit" value="OK"> + <input type="submit" value="<?php echo __('OK'); ?>"> </span> </p> </form> diff --git a/include/staff/users.inc.php b/include/staff/users.inc.php index 91362ae32c8b0bc0afb9d0af276587717ed6afd8..002546ac0e841dde75685b7c76251dccc9811e19 100644 --- a/include/staff/users.inc.php +++ b/include/staff/users.inc.php @@ -73,7 +73,7 @@ $qhash = md5($query); $_SESSION['users_qs_'.$qhash] = $query; ?> -<h2>User Directory</h2> +<h2><?php echo __('User Directory'); ?></h2> <div style="width:700px; float:left;"> <form action="users.php" method="get"> <?php csrf_token(); ?> @@ -89,18 +89,19 @@ $_SESSION['users_qs_'.$qhash] = $query; </form> </div> <div style="float:right;text-align:right;padding-right:5px;"> - <b><a href="#users/add" class="Icon newstaff popup-dialog">Add User</a></b> + <b><a href="#users/add" class="Icon newstaff popup-dialog"><?php echo __('Add User'); ?></a></b> | - <b><a href="#users/import" class="popup-dialog"><i class="icon-cloud-upload icon-large"></i> Import</a></b> + <b><a href="#users/import" class="popup-dialog"><i class="icon-cloud-upload icon-large"></i> + <?php echo __('Import'); ?></a></b> </div> <div class="clear"></div> <?php -$showing = $search ? 'Search Results: ' : ''; +$showing = $search ? __('Search Results').': ' : ''; $res = db_query($query); if($res && ($num=db_num_rows($res))) $showing .= $pageNav->showing(); else - $showing .= 'No users found!'; + $showing .= __('No users found!'); ?> <form action="users.php" method="POST" name="staff" > <?php csrf_token(); ?> @@ -110,10 +111,14 @@ else <caption><?php echo $showing; ?></caption> <thead> <tr> - <th width="350"><a <?php echo $name_sort; ?> href="users.php?<?php echo $qstr; ?>&sort=name">Name</a></th> - <th width="250"><a <?php echo $status_sort; ?> href="users.php?<?php echo $qstr; ?>&sort=status">Status</a></th> - <th width="100"><a <?php echo $create_sort; ?> href="users.php?<?php echo $qstr; ?>&sort=create">Created</a></th> - <th width="145"><a <?php echo $update_sort; ?> href="users.php?<?php echo $qstr; ?>&sort=update">Updated</a></th> + <th width="350"><a <?php echo $name_sort; ?> href="users.php?<?php + echo $qstr; ?>&sort=name"><?php echo __('Name'); ?></a></th> + <th width="250"><a <?php echo $status_sort; ?> href="users.php?<?php + echo $qstr; ?>&sort=status"><?php echo __('Status'); ?></a></th> + <th width="100"><a <?php echo $create_sort; ?> href="users.php?<?php + echo $qstr; ?>&sort=create"><?php echo __('Created'); ?></a></th> + <th width="145"><a <?php echo $update_sort; ?> href="users.php?<?php + echo $qstr; ?>&sort=update"><?php echo __('Updated'); ?></a></th> </tr> </thead> <tbody> @@ -131,7 +136,7 @@ else if ($row['account_id']) $status = new UserAccountStatus($row['account_status']); else - $status = 'Guest'; + $status = __('Guest'); $sel=false; if($ids && in_array($row['id'], $ids)) @@ -158,8 +163,8 @@ else </table> <?php if($res && $num): //Show options.. - echo sprintf('<div> Page: %s <a class="no-pjax" - href="users.php?a=export&qh=%s">Export</a></div>', + echo sprintf('<div> '.__('Page').': %s <a class="no-pjax" + href="users.php?a=export&qh=%s">'.__('Export').'</a></div>', $pageNav->getPageLinks(), $qhash); endif;