Skip to content
Snippets Groups Projects
Commit 87d64707 authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Translate sequence management

parent a618c1d3
Branches
Tags
No related merge requests found
......@@ -141,7 +141,7 @@ class SLA {
/* Tokens are <name> (<#> hours - <Active|Disabled>) */),
$row['name'],
$row['grace_period'],
$row['isactive']?'Active':'Disabled');
$row['isactive']?__('Active'):__('Disabled'));
}
return $slas;
......
......@@ -274,15 +274,15 @@ if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"';
</tr>
<tr>
<td>
Ticket Number Format:
<?php echo __('Ticket Number Format'); ?>:
</td>
<td>
<label>
<input type="radio" name="custom-numbers" value="0" <?php echo !$info['custom-numbers']?'checked="checked"':''; ?>
onchange="javascript:$('#custom-numbers').hide();"> System Default
onchange="javascript:$('#custom-numbers').hide();"> <?php echo __('System Default'); ?>
</label>&nbsp;<label>
<input type="radio" name="custom-numbers" value="1" <?php echo $info['custom-numbers']?'checked="checked"':''; ?>
onchange="javascript:$('#custom-numbers').show(200);"> Custom
onchange="javascript:$('#custom-numbers').show(200);"> <?php echo __('Custom'); ?>
</label>&nbsp; <i class="help-tip icon-question-sign" href="#custom_numbers"></i>
</td>
</tr>
......@@ -290,11 +290,11 @@ if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"';
<tbody id="custom-numbers" style="<?php if (!$info['custom-numbers']) echo 'display:none'; ?>">
<tr>
<td style="padding-left:20px">
Format:
<?php echo __('Format'); ?>:
</td>
<td>
<input type="text" name="number_format" value="<?php echo $info['number_format']; ?>"/>
<span class="faded">e.g. <span id="format-example"><?php
<span class="faded"><?php echo __('e.g.'); ?> <span id="format-example"><?php
if ($info['custom-numbers']) {
if ($info['sequence_id'])
$seq = Sequence::lookup($info['sequence_id']);
......@@ -308,12 +308,12 @@ if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"';
<tr>
<?php $selected = 'selected="selected"'; ?>
<td style="padding-left:20px">
Sequence:
<?php echo __('Sequence'); ?>:
</td>
<td>
<select name="sequence_id">
<option value="0" <?php if ($info['sequence_id'] == 0) echo $selected;
?>>&mdash; Random &mdash;</option>
?>>&mdash; <?php echo __('Random'); ?> &mdash;</option>
<?php foreach (Sequence::objects() as $s) { ?>
<option value="<?php echo $s->id; ?>" <?php
if ($info['sequence_id'] == $s->id) echo $selected;
......@@ -323,7 +323,7 @@ if ($info['form_id'] == Topic::FORM_USE_PARENT) echo 'selected="selected"';
<button class="action-button" onclick="javascript:
$.dialog('ajax.php/sequence/manage', 205);
return false;
"><i class="icon-gear"></i> Manage</button>
"><i class="icon-gear"></i> <?php echo __('Manage'); ?></button>
</td>
</tr>
</tbody>
......
<h3><i class="icon-wrench"></i> Manage Sequences</i></h3>
<h3><i class="icon-wrench"></i> <?php echo __('Manage Sequences'); ?></i></h3>
<b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
<hr/>
Sequences are used to generate sequential numbers. Various sequences can be
used to generate sequences for different purposes.
<hr/><?php echo __(
'Sequences are used to generate sequential numbers. Various sequences can be
used to generate sequences for different purposes.'); ?>
<br/>
<br/>
<form method="post" action="<?php echo $info['action']; ?>">
......@@ -30,10 +30,10 @@ foreach ($sequences as $e) {
</div>
<div class="management hidden" data-id="<?php echo $e->id; ?>">
<table width="100%"><tbody>
<tr><td><label style="padding:0">Increment:
<tr><td><label style="padding:0"><?php echo __('Increment'); ?>:
<input class="-increment" type="text" size="4" value="<?php echo Format::htmlchars($e->increment); ?>"/>
</label></td>
<td><label style="padding:0">Padding Character:
<td><label style="padding:0"><?php echo __('Padding Character'); ?>:
<input class="-padding" maxlength="1" type="text" size="4" value="<?php echo Format::htmlchars($e->padding); ?>"/>
</label></td></tr>
</tbody></table>
......@@ -44,7 +44,7 @@ foreach ($sequences as $e) {
<div class="row-item hidden" id="template">
<i class="icon-sort-by-order"></i>
<div style="display:inline-block" class="name"> New Sequence </div>
<div style="display:inline-block" class="name"> <?php echo __('New Sequence'); ?> </div>
<div style="display:inline-block;margin-right:60px" class="pull-right">
<span class="faded">next</span>
<span class="next">1</span>
......@@ -55,10 +55,10 @@ foreach ($sequences as $e) {
</div>
<div class="management hidden" data-id="<?php echo $e->id; ?>">
<table width="100%"><tbody>
<tr><td><label style="padding:0">Increment:
<tr><td><label style="padding:0"><?php echo __('Increment'); ?>:
<input class="-increment" type="text" size="4" value="1"/>
</label></td>
<td><label style="padding:0">Padding:
<td><label style="padding:0"><?php echo __('Padding Character'); ?>:
<input class="-padding" maxlength="1" type="text" size="4" value="0"/>
</label></td></tr>
</tbody></table>
......@@ -71,24 +71,24 @@ foreach ($sequences as $e) {
var clone = $('.row-item#template').clone()
.appendTo($('#sequences'))
.removeClass('hidden')
.append($('<input>').attr({type:'hidden',class:'fname',name:base+'[name]',value:'New Sequence'}))
.append($('<input>').attr({type:'hidden',class:'fname',name:base+'[name]',value:'<?php echo __('New Sequence'); ?>'}))
.append($('<input>').attr({type:'hidden',class:'fcurrent',name:base+'[current]',value:'1'}))
.append($('<input>').attr({type:'hidden',class:'fincrement',name:base+'[increment]',value:'1'}))
.append($('<input>').attr({type:'hidden',class:'fpadding',name:base+'[padding]',value:'0'})) ;
clone.find('.manage a').trigger('click');
return false;
"><i class="icon-plus"></i> Add New Sequence</button>
"><i class="icon-plus"></i> <?php echo __('Add New Sequence'); ?></button>
<div id="delete-warning" style="display:none">
<hr>
<div id="msg_warning">
Clicking <strong>Save Changes</strong> will permanently remove the
deleted sequences.
<div id="msg_warning"><?php echo __(
'Clicking <strong>Save Changes</strong> will permanently remove the
deleted sequences.'); ?>
</div>
</div>
<hr>
<div>
<span class="buttons pull-right">
<input type="submit" value="Save Changes" onclick="javascript:
<input type="submit" value="<?php echo __('Save Changes'); ?>" onclick="javascript:
$('#sequences .save a').each(function() { $(this).trigger('click'); });
">
</span>
......@@ -137,11 +137,6 @@ $(function() {
$(document).on('click.seq', '#sequences .delete a', remove);
$('.close, input:submit').click(function() {
$(document).die('click.seq');
/*
$('#sequences .manage a').die();
$('#sequences .save a').die();
$('#sequences .delete a').die();
*/
});
});
</script>
......@@ -211,7 +211,7 @@ class Installer extends SetupWizard {
'helpdesk_title'=>$vars['name']);
$config = new Config('core');
if (!$config->updateAll($defaults))
$this->errors['err']='Unable to create config settings (#7)';
$this->errors['err']=__('Unable to create config settings').' (#7)';
// Set company name
require_once(INCLUDE_DIR.'class.company.php');
......@@ -223,7 +223,7 @@ class Installer extends SetupWizard {
if ($stream != 'core') {
$config = new Config($stream);
if (!$config->update('schema_signature', $signature))
$this->errors['err']=__('Unable to create config settings (#8)');
$this->errors['err']=__('Unable to create config settings').' (#8)';
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment