diff options
Diffstat (limited to 'site/app/views/elements/developers')
5 files changed, 130 insertions, 30 deletions
diff --git a/site/app/views/elements/developers/editbox.thtml b/site/app/views/elements/developers/editbox.thtml index 889e1e2..530bab1 100644 --- a/site/app/views/elements/developers/editbox.thtml +++ b/site/app/views/elements/developers/editbox.thtml @@ -39,24 +39,24 @@ <div class="pitch"> <h4><?=$html->link($addon_name, '/developers/dashboard#addon-'.$addon_id)?></h4> <ul class="actionbar"> - <li class="displaypage"><?=$html->link('View Listing', "/addon/{$addon_id}/")?></li> - <li class="edit<?=($action == 'edit' ? ' selected' : '')?>"><?=$html->link('Edit Add-on', "/developers/addon/edit/{$addon_id}/")?></li> + <li class="displaypage"><?=$html->link(___('devcp_editbox_view_listing'), "/addon/{$addon_id}/")?></li> + <li class="edit<?=($action == 'edit' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_edit_addon'), "/developers/addon/edit/{$addon_id}/")?></li> <?php if ($action == 'edit'): ?> <li class="container"><ul> - <li class="edit-authors<?=($subaction == 'authors' ? ' selected' : '')?>"><?=$html->link('Authors', "/developers/addon/edit/{$addon_id}/authors")?></li> - <li class="edit-categories<?=($subaction == 'categories' ? ' selected' : '')?>"><?=$html->link('Categories', "/developers/addon/edit/{$addon_id}/categories")?></li> - <li class="edit-descriptions<?=($subaction == 'descriptions' ? ' selected' : '')?>"><?=$html->link('Descriptions', "/developers/addon/edit/{$addon_id}/descriptions")?></li> - <li class="edit-properties<?=($subaction == 'properties' ? ' selected' : '')?>"><?=$html->link('Properties', "/developers/addon/edit/{$addon_id}/properties")?></li> + <li class="edit-authors<?=($subaction == 'authors' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_authors'), "/developers/addon/edit/{$addon_id}/authors")?></li> + <li class="edit-categories<?=($subaction == 'categories' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_categories'), "/developers/addon/edit/{$addon_id}/categories")?></li> + <li class="edit-descriptions<?=($subaction == 'descriptions' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_descriptions'), "/developers/addon/edit/{$addon_id}/descriptions")?></li> + <li class="edit-properties<?=($subaction == 'properties' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_properties'), "/developers/addon/edit/{$addon_id}/properties")?></li> </ul></li> <?php endif; ?> - <li class="status<?=($action == 'status' ? ' selected' : '')?>"><?=$html->link('Change Status', "/developers/addon/status/{$addon_id}/")?></li> - <li class="statistics"><?=$html->link('Statistics Dashboard', "/statistics/addon/{$addon_id}/")?></li> - <li class="versions<?=($action == 'versions' ? ' selected' : '')?>"><?=$html->link('Versions and Files', "/developers/versions/{$addon_id}/")?></li> + <li class="status<?=($action == 'status' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_change_status'), "/developers/addon/status/{$addon_id}/")?></li> + <li class="statistics"><?=$html->link(___('devcp_editbox_statistics_dashboard'), "/statistics/addon/{$addon_id}/")?></li> + <li class="versions<?=($action == 'versions' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_versions'), "/developers/versions/{$addon_id}/")?></li> <?php if ($action == 'versions'): ?> <li class="container"><ul> - <li class="versions-add<?=($subaction == 'add' ? ' selected' : '')?>"><?=$html->link('New Version', "/developers/versions/add/{$addon_id}")?></li> + <li class="versions-add<?=($subaction == 'add' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_new_version'), "/developers/versions/add/{$addon_id}")?></li> </ul></li> <?php endif; ?> - <li class="previews<?=($action == 'previews' ? ' selected' : '')?>"><?=$html->link('Preview Screenshots', "/developers/previews/{$addon_id}/")?></li> + <li class="previews<?=($action == 'previews' ? ' selected' : '')?>"><?=$html->link(___('devcp_editbox_screenshots'), "/developers/previews/{$addon_id}/")?></li> </ul> </div>
\ No newline at end of file diff --git a/site/app/views/elements/developers/editors_review_history_item.thtml b/site/app/views/elements/developers/editors_review_history_item.thtml new file mode 100644 index 0000000..349ab62 --- /dev/null +++ b/site/app/views/elements/developers/editors_review_history_item.thtml @@ -0,0 +1,101 @@ +<?php +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is addons.mozilla.org site. + * + * The Initial Developer of the Original Code is + * Frederic Wenzel <fwenzel@mozilla.com>. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/** + * This element uses the following local variables: + * - $hist -- review history item + */ +if (!empty($hist['Approval']['reply_to'])) + $trclass="class=\"hidden reply_to_{$hist['Approval']['reply_to']}\""; +else + $trclass=""; +?> + +<tr <?=$trclass?>> + <td><?php if (!empty($hist['Version'])) echo "{$hist['Version']['version']} ({$platforms[$hist['File']['platform_id']]})"?></td> + <td><?=$hist['Approval']['created']?></td> + <td><?=$html->linkEmail($hist['User']['firstname'].' '.$hist['User']['lastname'], $hist['User']['email'])?></td> + <td> + <?php + if ($hist['Approval']['reviewtype'] == 'nominated') { + if ($hist['Approval']['action'] == STATUS_PUBLIC) { + echo _('editors_review_history_nominated_approved'); + } + elseif ($hist['Approval']['action'] == STATUS_SANDBOX) { + echo _('editors_review_history_nominated_denied'); + } + elseif ($hist['Approval']['action'] == STATUS_NOMINATED) { + echo _('editors_review_history_nominated_adminreview'); + } + } + elseif ($hist['Approval']['reviewtype'] == 'pending') { + if ($hist['Approval']['action'] == STATUS_PUBLIC) { + echo _('editors_review_history_pending_approved'); + } + elseif ($hist['Approval']['action'] == STATUS_SANDBOX) { + echo _('editors_review_history_pending_denied'); + } + elseif ($hist['Approval']['action'] == STATUS_PENDING) { + echo _('editors_review_history_pending_adminreview'); + } + } + elseif ($hist['Approval']['reviewtype'] == 'info') { + if (empty($hist['Approval']['reply_to'])) + echo ___('editors_review_history_info_request', 'Information Request'); + else + echo ___('editors_review_history_info_reply', 'Reply'); + } + ?> + </td> + <td><?=nl2br($hist['Approval']['comments'])?></td> +</tr> +<?php if ($hist['Approval']['reviewtype'] == 'info' && empty($hist['Approval']['reply_to']) + && !empty($hist['replies'])):?> +<tr> + <td colspan="5"> + <?=$html->link(sprintf(n___('editors_review_history_show_hide_replies', + 'editors_review_history_show_hide_replies', count($hist['replies']), + 'Show/Hide Replies (%1$s)'), count($hist['replies'])), "#", + array('onclick'=>"$('tr.reply_to_{$hist['Approval']['id']}').toggle();return false;"))?></td> +</tr> +<?php +// show all replies +foreach ($hist['replies'] as &$reply) { + echo $this->renderElement('developers/editors_review_history_item', array('hist'=>$reply)); +} +?> +<?php endif; ?> diff --git a/site/app/views/elements/developers/rolecheck.thtml b/site/app/views/elements/developers/rolecheck.thtml index 862a463..93d46f7 100644 --- a/site/app/views/elements/developers/rolecheck.thtml +++ b/site/app/views/elements/developers/rolecheck.thtml @@ -39,7 +39,7 @@ if (empty($required_role) || (!empty($required_role) && $author_role < $required_role)): ?> <div class="notice no-privs-box rounded"> - <span>You do not have sufficient privileges to make changes on this page.</span><br />Contact the Add-on Owner if you need to make changes. + <?=___('devcp_rolecheck_no_privs')?> </div> <?php endif; diff --git a/site/app/views/elements/developers/sidebar.thtml b/site/app/views/elements/developers/sidebar.thtml index c5c33ab..2f4bc15 100644 --- a/site/app/views/elements/developers/sidebar.thtml +++ b/site/app/views/elements/developers/sidebar.thtml @@ -49,7 +49,7 @@ <ul id="cat-list"> <?php if ($this->controller->Session->check('User')): ?> - <li><?=$html->link(_('Dashboard'), '/developers/dashboard')?></li> + <li><?=$html->link(___('devcp_sidebar_a_dashboard'), '/developers/dashboard')?></li> <?php if (!empty($addons)) { foreach ($addons as $addon_id => $addon_name) { diff --git a/site/app/views/elements/developers/translationbox.thtml b/site/app/views/elements/developers/translationbox.thtml index 6fdc479..ff8e4c0 100644 --- a/site/app/views/elements/developers/translationbox.thtml +++ b/site/app/views/elements/developers/translationbox.thtml @@ -61,7 +61,7 @@ if (!isset($graybox) || $graybox === true) { echo '<div class="translation-box graybox rounded spaced" style="width: '.(!empty($width) ? $width : '600px').';">'; } - echo (!empty($displayName) ? '<h4><a href="#" title="Help (does not leave page)" onclick="translation_box.showHelp(this); return false;">'.$html->image('developers/help.png', array('alt' => 'Help')).'</a>'.$displayName.' </h4>' : ''); + echo (!empty($displayName) ? '<h4><a href="#" title="'.___('devcp_transbox_a_title_help').'" onclick="translation_box.showHelp(this); return false;">'.$html->image('developers/help.png', array('alt' => ___('devcp_transbox_alt_help'))).'</a>'.$displayName.' </h4>' : ''); echo (!empty($description) ? "<p>{$description}</p>" : ''); ?> <div class="translation-row"> @@ -78,8 +78,8 @@ if (!isset($graybox) || $graybox === true) { } ?> </div> - <div class="translation-button"><?=$html->image('developers/tab_add.png', array('onclick' => 'translation_box.addTab(this);', 'alt' => 'Add Translation', 'title' => 'Add Translation'))?></div> - <div class="translation-button remove" style="display: none;"><?=$html->image('developers/tab_delete.png', array('onclick' => 'translation_box.confirmRemove(this);', 'alt' => 'Remove Translation', 'title' => 'Remove Translation'))?></div> + <div class="translation-button"><?=$html->image('developers/tab_add.png', array('onclick' => 'translation_box.addTab(this);', 'alt' => ___('devcp_transbox_img_add_trans'), 'title' => ___('devcp_transbox_img_add_trans')))?></div> + <div class="translation-button remove" style="display: none;"><?=$html->image('developers/tab_delete.png', array('onclick' => 'translation_box.confirmRemove(this);', 'alt' => ___('devcp_transbox_img_remove_trans'), 'title' => ___('devcp_transbox_img_remove_trans')))?></div> </div> <div class="translation-area" table="<?=$this->translationBox['table']?>" field="<?=$field?>" defaultLocale="<?=$this->translationBox['defaultLocale']?>"<?=(!empty($id) ? ' itemID="'.$id.'"' : '')?>> <?php @@ -94,7 +94,7 @@ if (!isset($graybox) || $graybox === true) { } if (!empty($maxLength)) { - echo '<div class="translation-maxlength '.$locale.($this->translationBox['defaultLocale'] == $locale ? ' selected' : '').'">'.$html->image('developers/exclamation.png', array('alt' => '')).' Characters used: <span>'.strlen($translation).'</span> / '.$maxLength.'</div>'; + echo '<div class="translation-maxlength '.$locale.($this->translationBox['defaultLocale'] == $locale ? ' selected' : '').'">'.$html->image('developers/exclamation.png', array('alt' => '')).sprintf(___('devcp_transbox_chars_used'), '<span>'.strlen($translation).'</span>', $maxLength).'</div>'; } } ?> @@ -110,7 +110,7 @@ if (!isset($graybox) || $graybox === true) { <div class="translation-newlocale-container"> <div class="translation-newlocale new selected"> <div class="padded"> - Select the locale of the translation to add: + <?=___('devcp_transbox_select_locale')?> <select> <?php foreach ($this->translationBox['languages'] as $code => $name) { @@ -119,9 +119,9 @@ if (!isset($graybox) || $graybox === true) { ?> </select> <div class="buttons"> - <input type="button" value="Add Locale" onclick="translation_box.addLocale(this, false);" /> - <input type="button" value="Add Locale to All" onclick="translation_box.addLocale(this, true);" /> - <input type="button" value="Cancel" onclick="translation_box.cancelAdd(this);" /> + <input type="button" value="<?=___('devcp_transbox_input_add_locale')?>" onclick="translation_box.addLocale(this, false);" /> + <input type="button" value="<?=___('devcp_transbox_input_add_all')?>" onclick="translation_box.addLocale(this, true);" /> + <input type="button" value="<?=___('devcp_transbox_input_cancel')?>" onclick="translation_box.cancelAdd(this);" /> </div> </div> </div> @@ -129,10 +129,10 @@ if (!isset($graybox) || $graybox === true) { <div class="translation-deletelocale-container"> <div class="translation-deletelocale"> <div class="padded"> - Are you sure you wish to delete this translation? + <?=___('devcp_transbox_delete_sure')?> <div class="buttons"> - <input type="button" value="Delete It" onclick="translation_box.removeLocale(this);" /> - <input type="button" value="Cancel" onclick="translation_box.cancelRemove(this);" /> + <input type="button" value="<?=___('devcp_transbox_input_delete')?>" onclick="translation_box.removeLocale(this);" /> + <input type="button" value="<?=___('devcp_transbox_input_cancel')?>" onclick="translation_box.cancelRemove(this);" /> </div> </div> </div> @@ -140,12 +140,11 @@ if (!isset($graybox) || $graybox === true) { <div class="translation-help-container"> <div class="translation-help bluebox-tr"><div class="bluebox-tl"> <div class="padded"> - <h4>What are these "<?=$this->translationBox['defaultLocale']?>" tabs?</h4> - <p>This is a <i>Translation Box</i>. It allows you to localize a specific field into any other languages for which you might have a translation. You can add, edit, and remove translations using the locale tabs.</p> - - <h4>What if I don't have any translations?</h4> - <p>If a user browses the site and a translation isn't available in their own language, it will fall back to your add-on's Default Locale, specified in the Edit Add-on Properties area. If you don't have any translations, just enter what you can into your Default Locale, which should be a language you speak.</p> - <div style="text-align: right;"><a href="#" onclick="translation_box.hideHelp(this); return false;">Hide Help</a></div> + <h4><?=sprintf(___('devcp_transbox_help_header_tabs'), $this->translationBox['defaultLocale'])?></h4> + <p><?=___('devcp_transbox_help_transbox')?></p> + <h4><?=___('devcp_transbox_help_header_what')?></h4> + <p><?=___('devcp_transbox_help_if')?> + <div style="text-align: right;"><a href="#" onclick="translation_box.hideHelp(this); return false;"><?=___('devcp_transbox_help_hide')?></a></div> </div> <div class="bluebox-br"><div class="bluebox-bl"></div></div> </div></div> |