Skip to content

Commit c0e4110

Browse files
author
Jared Hancock
committed
Complete translations for new content
1 parent e1f0633 commit c0e4110

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+760
-710
lines changed

account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
$user_form->getField('email')->addError(
7373
sprintf(__('Email already registered. Would you like to %1$s sign in %2$s?'),
7474
'<a href="login.php?e='.urlencode($addr).'" style="color:inherit"><strong>',
75-
'</strong></a>');
75+
'</strong></a>'));
7676
$errors['err'] = __('Unable to register account. See messages below');
7777
}
7878
// Users created from ClientCreateRequest

client.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
$nav=null;
4747
//Make sure the user is valid..before doing anything else.
4848
$thisclient = UserAuthenticationBackend::getUser();
49+
50+
// Bootstrap gettext translations as early as possible, but after attempting
51+
// to sign on the agent
52+
TextDomain::configureForUser($thisclient);
53+
4954
//is the user logged in?
5055
if($thisclient && $thisclient->getId() && $thisclient->isValid()){
5156
$thisclient->refreshSession();

include/ajax.tickets.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ function search() {
251251
$uid = md5($_SERVER['QUERY_STRING']);
252252
$_SESSION["adv_$uid"] = $tickets;
253253
$result['success'] = sprintf(__("Search criteria matched %s"),
254-
_N('%d ticket', '%d tickets', count($tickets)))
254+
sprintf(_N('%d ticket', '%d tickets', count($tickets),
255+
$tickets)))
255256
. " - <a href='tickets.php?advsid=$uid'>".__('view')."</a>";
256257
} else {
257258
$result['fail']=__('No tickets found matching your search criteria.');

include/class.forms.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ function parse($id) {
919919
return $this->to_php(null, $id);
920920
}
921921

922-
function to_php($value, $id) {
922+
function to_php($value, $id=false) {
923923
return Priority::lookup($id);
924924
}
925925

@@ -1252,7 +1252,8 @@ function showAttachments($errors=array()) {
12521252
&& ($thisclient && $thisclient->isValid()))) { ?>
12531253
<div class="clear"></div>
12541254
<hr/>
1255-
<div><strong style="padding-right:1em;vertical-align:top">Attachments: </strong>
1255+
<div><strong style="padding-right:1em;vertical-align:top"><?php
1256+
echo __('Attachments'); ?>: </strong>
12561257
<div style="display:inline-block">
12571258
<div class="uploads" style="display:block"></div>
12581259
<input type="file" class="multifile" name="attachments[]" id="attachments" size="30" value="" />

include/staff/apikeys.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<tr>
5656
<th width="7">&nbsp;</th>
5757
<th width="320"><a <?php echo $key_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=key"><?php echo __('API Key');?></a></th>
58-
<th width="120"><a <?php echo $ip_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Addr.');?></a></th>
58+
<th width="120"><a <?php echo $ip_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=ip"><?php echo __('IP Address');?></a></th>
5959
<th width="100"><a <?php echo $status_sort; ?> href="apikeys.php?<?php echo $qstr; ?>&sort=status"><?php echo __('Status');?></a></th>
6060
<th width="150" nowrap><a <?php echo $date_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=date"><?php echo __('Date Added');?></a></th>
6161
<th width="150" nowrap><a <?php echo $updated_sort; ?>href="apikeys.php?<?php echo $qstr; ?>&sort=updated"><?php echo __('Last Updated');?></a></th>

include/staff/attachment.inc.php

Lines changed: 0 additions & 82 deletions
This file was deleted.

include/staff/cannedresponses.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
$query="$sql GROUP BY canned.canned_id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
4343
$res=db_query($query);
4444
if($res && ($num=db_num_rows($res)))
45-
$showing=$pageNav->showing().' '.__('premade responses');
45+
$showing=$pageNav->showing().' '._N('premade response', 'premade responses',
46+
$total);
4647
else
4748
$showing=__('No premade responses found!');
4849

include/staff/department.inc.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,21 @@
224224
</tr>
225225
<tr>
226226
<th colspan="2">
227-
<em><strong><?php echo _('Alerts and Notices'); ?>:</strong>
227+
<em><strong><?php echo __('Alerts and Notices'); ?>:</strong>
228228
<i class="help-tip icon-question-sign" href="#group_membership"></i></em>
229229
</th>
230230
</tr>
231231
<tr>
232232
<td width="180">
233-
<?php echo _('Recipients'); ?>:
233+
<?php echo __('Recipients'); ?>:
234234
</td>
235235
<td>
236236
<span>
237237
<select name="group_membership">
238238
<?php foreach (array(
239-
Dept::ALERTS_DISABLED => _("No one (disable Alerts and Notices)"),
240-
Dept::ALERTS_DEPT_ONLY => _("Department members only"),
241-
Dept::ALERTS_DEPT_AND_GROUPS => _("Department and Group members"),
239+
Dept::ALERTS_DISABLED => __("No one (disable Alerts and Notices)"),
240+
Dept::ALERTS_DEPT_ONLY => __("Department members only"),
241+
Dept::ALERTS_DEPT_AND_GROUPS => __("Department and Group members"),
242242
) as $mode=>$desc) { ?>
243243
<option value="<?php echo $mode; ?>" <?php
244244
if ($info['group_membership'] == $mode) echo 'selected="selected"';

include/staff/departments.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
$query="$sql GROUP BY dept.dept_id ORDER BY $order_by";
3636
$res=db_query($query);
3737
if($res && ($num=db_num_rows($res)))
38-
$showing=sprintf(__('Showing 1-%1$d of %2$d departments'),$num,$num);
38+
$showing=sprintf(_N('Showing %d department', 'Showing %d departments',
39+
$num),$num);
3940
else
4041
$showing=__('No departments found!');
4142

include/staff/dynamic-form.inc.php

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
$info=array();
44
if($form && $_REQUEST['a']!='add') {
5-
$title = 'Update custom form section';
5+
$title = __('Update custom form section');
66
$action = 'update';
77
$url = "?id=".urlencode($_REQUEST['id']);
8-
$submit_text='Save Changes';
8+
$submit_text=__('Save Changes');
99
$info = $form->ht;
1010
$newcount=2;
1111
} else {
12-
$title = 'Add new custom form section';
12+
$title = __('Add new custom form section');
1313
$action = 'add';
1414
$url = '?a=add';
15-
$submit_text='Add Form';
15+
$submit_text=__('Add Form');
1616
$newcount=4;
1717
}
1818
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
@@ -23,20 +23,21 @@
2323
<input type="hidden" name="do" value="<?php echo $action; ?>">
2424
<input type="hidden" name="a" value="<?php echo $action; ?>">
2525
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
26-
<h2>Custom Form</h2>
26+
<h2><?php echo __('Custom Form'); ?></h2>
2727
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
2828
<thead>
2929
<tr>
3030
<th colspan="2">
3131
<h4><?php echo $title; ?></h4>
32-
<em>Custom forms are used to allow custom data to be
33-
associated with tickets</em>
32+
<em><?php echo __(
33+
'Custom forms are used to allow custom data to be associated with tickets'
34+
); ?></em>
3435
</th>
3536
</tr>
3637
</thead>
3738
<tbody style="vertical-align:top">
3839
<tr>
39-
<td width="180" class="required">Title:</td>
40+
<td width="180" class="required"><?php echo __('Title'); ?>:</td>
4041
<td><input type="text" name="title" size="40" value="<?php
4142
echo $info['title']; ?>"/>
4243
<i class="help-tip icon-question-sign" href="#form_title"></i>
@@ -45,7 +46,7 @@
4546
</td>
4647
</tr>
4748
<tr>
48-
<td width="180">Instructions:</td>
49+
<td width="180"><?php echo __('Instructions'); ?>:</td>
4950
<td><textarea name="instructions" rows="3" cols="40"><?php
5051
echo $info['instructions']; ?></textarea>
5152
<i class="help-tip icon-question-sign" href="#form_instructions"></i>
@@ -58,17 +59,20 @@
5859
<thead>
5960
<tr>
6061
<th colspan="7">
61-
<em><strong>User Information Fields</strong> more information here</em>
62+
<em><strong><?php echo __('User Information Fields'); ?></strong>
63+
<?php echo sprintf(__('(These fields are requested for new tickets
64+
via the %s form)',
65+
UserForm::objects()->one()->get('title'))); ?></em>
6266
</th>
6367
</tr>
6468
<tr>
6569
<th></th>
66-
<th>Label</th>
67-
<th>Type</th>
68-
<th>Internal</th>
69-
<th>Required</th>
70-
<th>Variable</th>
71-
<th>Delete</th>
70+
<th><?php echo __('Label'); ?></th>
71+
<th><?php echo __('Type'); ?></th>
72+
<th><?php echo __('Internal'); ?></th>
73+
<th><?php echo __('Required'); ?></th>
74+
<th><?php echo __('Variable'); ?></th>
75+
<th><?php echo __('Delete'); ?></th>
7276
</tr>
7377
</thead>
7478
<tbody>
@@ -94,23 +98,24 @@
9498
<thead>
9599
<tr>
96100
<th colspan="7">
97-
<em><strong>Form Fields</strong> fields available for ticket information</em>
101+
<em><strong><?php echo __('Form Fields'); ?></strong>
102+
<?php echo __('fields available where this form is used'); ?></em>
98103
</th>
99104
</tr>
100105
<tr>
101-
<th nowrap>Sort
106+
<th nowrap><?php echo __('Sort'); ?>
102107
<i class="help-tip icon-question-sign" href="#field_sort"></i></th>
103-
<th nowrap>Label
108+
<th nowrap><?php echo __('Label'); ?>
104109
<i class="help-tip icon-question-sign" href="#field_label"></i></th>
105-
<th nowrap>Type
110+
<th nowrap><?php echo __('Type'); ?>
106111
<i class="help-tip icon-question-sign" href="#field_type"></i></th>
107-
<th nowrap>Internal
112+
<th nowrap><?php echo __('Internal'); ?>
108113
<i class="help-tip icon-question-sign" href="#field_internal"></i></th>
109-
<th nowrap>Required
114+
<th nowrap><?php echo __('Required'); ?>
110115
<i class="help-tip icon-question-sign" href="#field_required"></i></th>
111-
<th nowrap>Variable
116+
<th nowrap><?php echo __('Variable'); ?>
112117
<i class="help-tip icon-question-sign" href="#field_variable"></i></th>
113-
<th nowrap>Delete
118+
<th nowrap><?php echo __('Delete'); ?>
114119
<i class="help-tip icon-question-sign" href="#field_delete"></i></th>
115120
</tr>
116121
</thead>
@@ -153,7 +158,7 @@
153158
$('#field-config .body').load($(this).attr('href').substr(1));
154159
$('#field-config').show();
155160
return false;
156-
"><i class="icon-edit"></i> Config</a>
161+
"><i class="icon-edit"></i> <?php echo __('Config'); ?></a>
157162
<?php } ?>
158163
<div class="error" style="white-space:normal"><?php
159164
if ($ferrors['type']) echo $ferrors['type'];
@@ -221,7 +226,8 @@
221226
<tbody>
222227
<tr>
223228
<th colspan="7">
224-
<em><strong>Internal Notes:</strong> be liberal, they're internal</em>
229+
<em><strong><?php echo __('Internal Notes'); ?>:</strong>
230+
<?php echo __("be liberal, they're internal"); ?></em>
225231
</th>
226232
</tr>
227233
<tr>
@@ -239,16 +245,14 @@
239245
</p>
240246

241247
<div style="display:none;" class="draggable dialog" id="delete-confirm">
242-
<h3><i class="icon-trash"></i> Remove Existing Data?</h3>
248+
<h3><i class="icon-trash"></i> <?php echo __('Remove Existing Data?'); ?></h3>
243249
<a class="close" href=""><i class="icon-remove-circle"></i></a>
244250
<hr/>
245251
<p>
246252
<strong>You are about to delete <span id="deleted-count"></span> fields.</strong>
247-
Would you also like to remove data currently entered for this field?
248-
<em>If you opt not to remove the data now, you will have the option
249-
to delete the the data when editing it</em>
253+
<?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>'); ?>
250254
</p><p style="color:red">
251-
Deleted data CANNOT be recovered.
255+
<?php echo __('Deleted data CANNOT be recovered.'); ?>
252256
</p>
253257
<hr>
254258
<div id="deleted-fields"></div>
@@ -281,7 +285,8 @@
281285
.append($('<input/>').attr({type:'checkbox',name:'delete-data-'
282286
+ $(e).data('fieldId')})
283287
).append($('<strong>').html(
284-
'Remove all data entered for <u>' + $(e).data('fieldLabel') + '</u>'
288+
'<?php echo __('Remove all data entered for <u> %s </u>?');
289+
?>'.replace('%s', $(e).data('fieldLabel'))
285290
))
286291
);
287292
});

0 commit comments

Comments
 (0)