CC-5334 : Localize Ryerson History Feature

This commit is contained in:
Naomi Aro 2013-09-23 14:42:35 +02:00
parent 69eb6ba060
commit ee45f10aeb
4 changed files with 37 additions and 32 deletions

View File

@ -391,7 +391,12 @@ class LocaleController extends Zend_Controller_Action
"File: %f, size: %s, max file size: %m" => _("File: %f, size: %s, max file size: %m"), "File: %f, size: %s, max file size: %m" => _("File: %f, size: %s, max file size: %m"),
"Upload URL might be wrong or doesn't exist" => _("Upload URL might be wrong or doesn't exist"), "Upload URL might be wrong or doesn't exist" => _("Upload URL might be wrong or doesn't exist"),
"Error: File too large: " => _("Error: File too large: "), "Error: File too large: " => _("Error: File too large: "),
"Error: Invalid file extension: " => _("Error: Invalid file extension: ") "Error: Invalid file extension: " => _("Error: Invalid file extension: "),
//history translations
"Set Default" => _("Set Default"),
"Create Entry" => _("Create Entry"),
"Edit History Record" => _("Edit History Record"),
"No Show" => _("No Show")
); );
$this->view->layout()->disableLayout(); $this->view->layout()->disableLayout();

View File

@ -1,15 +1,12 @@
<div id="history_template" class="ui-widget ui-widget-content block-shadow alpha-block padded-strong"> <div id="history_template" class="ui-widget ui-widget-content block-shadow alpha-block padded-strong">
<div> <div>
<div><h4>Log Sheet Templates</h4></div> <div><h4><?php echo _("Log Sheet Templates") ?></h4></div>
<ul id="template_list"> <ul id="template_list">
<?php if (count($this->template_list) == 0): ?> <?php if (count($this->template_list) == 0): ?>
<li>No Log Sheet Templates</li> <li><?php echo _("No Log Sheet Templates") ?></li>
<?php endif; ?> <?php endif; ?>
<?php foreach ($this->template_list as $id=>$name): ?> <?php foreach ($this->template_list as $id=>$name): ?>
<?php if (count($this->template_list) == 0): ?>
<li>No Log Sheet Templates</li>
<?php endif; ?>
<?php if (in_array($id, $this->configured)): ?> <?php if (in_array($id, $this->configured)): ?>
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>" class="template_configured"> <li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>" class="template_configured">
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>"> <a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
@ -25,7 +22,7 @@
<i class="icon icon-trash"></i> <i class="icon icon-trash"></i>
</a> </a>
<a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>"> <a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>">
Set Default <?php echo _("Set Default") ?>
</a> </a>
<?php endif; ?> <?php endif; ?>
</li> </li>
@ -35,10 +32,10 @@
</div> </div>
<br><br> <br><br>
<div> <div>
<div><h4>File Summary Templates</h4></div> <div><h4><?php echo _("File Summary Templates") ?></h4></div>
<ul id="template_file"> <ul id="template_file">
<?php if (count($this->template_file) == 0): ?> <?php if (count($this->template_file) == 0): ?>
<li>No File Summary Templates</li> <li><?php echo _("No File Summary Templates") ?></li>
<?php endif; ?> <?php endif; ?>
<?php foreach ($this->template_file as $id=>$name): ?> <?php foreach ($this->template_file as $id=>$name): ?>
<?php if (in_array($id, $this->configured)): ?> <?php if (in_array($id, $this->configured)): ?>
@ -56,12 +53,12 @@
<i class="icon icon-trash"></i> <i class="icon icon-trash"></i>
</a> </a>
<a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>"> <a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>">
Set Default <?php echo _("Set Default") ?>
</a> </a>
<?php endif; ?> <?php endif; ?>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<button id="new_file_template" class="btn">New File Summary Template</button> <button id="new_file_template" class="btn"><?php echo _("New File Summary Template") ?></button>
</div> </div>
</div> </div>

View File

@ -1,12 +1,12 @@
<?php if ($this->template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> <?php if ($this->template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
<h4>Creating File Summary Template</h4> <h4><?php echo _("Creating File Summary Template") ?></h4>
<?php else: ?> <?php else: ?>
<h4>Creating Log Sheet Template</h4> <h4><?php echo _("Creating Log Sheet Template") ?></h4>
<?php endif; ?> <?php endif; ?>
<div class="template_name_wrap"> <div class="template_name_wrap">
<label> <label>
Name <?php echo _("Name") ?>
<input id="template_name" type="text" value="<?php echo $this->template_name; ?>"> <input id="template_name" type="text" value="<?php echo $this->template_name; ?>">
</label> </label>
@ -43,7 +43,7 @@
</div> </div>
<div class="add_more"> <div class="add_more">
<p>Add more elements:</p> <p><?php echo _("Add more elements") ?>:</p>
<ul class="template_file_md"> <ul class="template_file_md">
<?php foreach ($this->fileMD as $md): ?> <?php foreach ($this->fileMD as $md): ?>
@ -64,20 +64,23 @@
<?php if ($this->template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?> <?php if ($this->template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
<div class="template_item_add"> <div class="template_item_add">
<input type="text" placeholder="Add New Field"> <input type="text" placeholder="<?php echo _("Add New Field") ?>">
<select> <select>
<?php foreach ($this->fields as $field): ?> <?php foreach ($this->fields as $field): ?>
<option value="<?php echo $field; ?>"><?php echo $field; ?></option> <option value="<?php echo $field; ?>"><?php echo _($field); ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<button class="btn"><i class="icon-white icon-plus"></i> Add</button> <button class="btn">
<i class="icon-white icon-plus"></i>
<?php echo _("Add") ?>
</button>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div> <div>
<?php if (!in_array($this->template_id, $this->configured)): ?> <?php if (!in_array($this->template_id, $this->configured)): ?>
<button id="template_set_default" data-template="<?php echo $this->template_id; ?>" class="btn">Set Default Template</button> <button id="template_set_default" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Set Default Template") ?></button>
<?php endif; ?> <?php endif; ?>
<button id="template_item_save" data-template="<?php echo $this->template_id; ?>" class="btn">Save</button> <button id="template_item_save" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Save") ?></button>
</div> </div>

View File

@ -23,7 +23,7 @@ var AIRTIME = (function(AIRTIME) {
"<li data-template='<%= id %>' data-name='<%= name %>'>" + "<li data-template='<%= id %>' data-name='<%= name %>'>" +
"<a href='<%= editUrl %>' class='template_name'><%= name %></a>" + "<a href='<%= editUrl %>' class='template_name'><%= name %></a>" +
"<a href='<%= removeUrl %>' class='template_remove'><i class='icon icon-trash'></i></a>" + "<a href='<%= removeUrl %>' class='template_remove'><i class='icon icon-trash'></i></a>" +
"<a href='<%= defaultUrl %>' class='template_default'>Set Default</a>" + "<a href='<%= defaultUrl %>' class='template_default'>" + $.i18n._('Set Default') + "</a>" +
"</li>"; "</li>";
var template = (configured) === true ? itemConfigured : item; var template = (configured) === true ? itemConfigured : item;