Plugin Directory

Changeset 450960


Ignore:
Timestamp:
10/14/2011 08:53:17 AM (14 years ago)
Author:
karrikas
Message:

Localized

Location:
banner-manager/trunk
Files:
3 added
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • banner-manager/trunk/banner-manager.php

    r371341 r450960  
    99License: GPL3
    1010*/
    11 
    1211
    1312define('BM_PLUGIN_DIR', dirname(__FILE__));
     
    2322
    2423// textgdomain
    25 load_plugin_textdomain( 'banner-manager', null, BM_PLUGIN_DIR .'/lang/' );
     24load_plugin_textdomain('banner-manager', false, basename(dirname(__FILE__)) .'/languages');
    2625
    2726// Install plugin
  • banner-manager/trunk/pages.php

    r317177 r450960  
    2424    public function set_menu()
    2525    {
    26         add_menu_page(__('Banner manager'), __('Banners'), 'level_5', 'bm-index', array($this, 'page_load'));
     26        add_menu_page(__('Banner manager', 'banner-manager'),   __('Banners', 'banner-manager'), 'level_5', 'bm-index', array($this, 'page_load'));
    2727    }
    2828
     
    3232    public function set_submenu()
    3333    {
    34         add_submenu_page('bm-index', __('Categories'), __('Categories'), 'level_5', 'bm-categories', array($this, 'page_load'));
     34        add_submenu_page('bm-index', __('Categories', 'banner-manager'), __('Categories', 'banner-manager'), 'level_5', 'bm-categories', array($this, 'page_load'));
    3535    }
    3636
     
    9595                        {
    9696                            data::new_banner( $category, $title, $src, $link, $blank, $active, $groupkey );
    97                             $params['message'] =  __('Banner saved.');
     97                            $params['message'] =  __('Banner saved.', 'banner-manager');
    9898                        }
    9999                        else
    100100                        {
    101101                            data::update_banner( $id, $category, $title, $src, $link, $blank, $active, $groupkey );
    102                             $params['message'] =  __('Banner edited.');
     102                            $params['message'] =  __('Banner edited.', 'banner-manager');
    103103                        }
    104104                        break;
    105105                    case 'delete':
    106106                        data::del_banner($id);
    107                         $params['message'] =  __('Banner deleted.');
     107                        $params['message'] =  __('Banner deleted.', 'banner-manager');
    108108                        break;
    109109                    case 'edit':
     
    128128                        {
    129129                            data::new_category($category, $width, $height);
    130                             $params['message'] =  __('Category saved.');
     130                            $params['message'] =  __('Category saved.', 'banner-manager');
    131131                        }
    132132                        else
    133133                        {
    134134                            data::update_category($id, $category, $width, $height);
    135                             $params['message'] =  __('Category edited.');
     135                            $params['message'] =  __('Category edited.', 'banner-manager');
    136136                        }
    137137                        break;
    138138                    case 'delete':
    139139                        data::del_category($id);
    140                         $params['message'] =  __('Banner deleted.');
     140                        $params['message'] =  __('Banner deleted.', 'banner-manager');
    141141                        break;
    142142                    case 'edit':
  • banner-manager/trunk/templates/banners.php

    r317177 r450960  
    33<?php $this->start('title') ?>
    44<h2>
    5     <?php _e('Banners')?>
    6     <a class="button add-new-h2" href="?page=bm-index"><?php _e('Add New')?></a>
     5    <?php _e('Banners', 'banner-manager')?>
     6    <a class="button add-new-h2" href="?page=bm-index"><?php _e('Add New', 'banner-manager')?></a>
    77</h2>
    88<?php $this->stop() ?>
     
    2828<?php if(isset($categories)): ?>
    2929<select name="filter_category">
    30 <option value=""><?php _e('View all categories')?></option>
     30<option value=""><?php _e('View all categories', 'banner-manager')?></option>
    3131<?php foreach($categories as $category): ?>
    3232<option value="<?php echo $category->id;?>"<?php echo ($category->id==$filter_category)? ' selected=""':'';?>><?php echo $category->groups; ?></option>
     
    3636   
    3737<select class="postform" id="cat" name="filter_active">
    38     <option value=""><?php _e('View all actives')?></option>
    39     <option value="1"<?php echo ($filter_active=='1')? ' selected=""':'';?>><?php _e('Yes')?></option>
    40     <option value="0"<?php echo ($filter_active=='0')? ' selected=""':'';?>><?php _e('No')?></option>
     38    <option value=""><?php _e('View all actives', 'banner-manager')?></option>
     39    <option value="1"<?php echo ($filter_active=='1')? ' selected=""':'';?>><?php _e('Yes', 'banner-manager')?></option>
     40    <option value="0"<?php echo ($filter_active=='0')? ' selected=""':'';?>><?php _e('No', 'banner-manager')?></option>
    4141</select>
    42 <input type="submit" class="button-secondary" value="<?php _e('Filter');?>" id="post-query-submit">
     42<input type="submit" class="button-secondary" value="<?php _e('Filter', 'banner-manager');?>" id="post-query-submit">
    4343</div>
    4444</form>
     
    5050    <thead>
    5151    <tr>
    52     <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Banner')?></th>
    53     <th style="" class="manage-column column-name" scope="col"><?php _e('Category')?></th>
    54     <th style="" class="manage-column column-name" scope="col"><?php _e('Group')?></th>
    55     <th style="" class="manage-column column-name" scope="col"><?php _e('Views')?></th>
    56     <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks')?></th>
    57     <th style="" class="manage-column column-name" scope="col"><?php _e('Active')?></th>
     52    <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Banner', 'banner-manager')?></th>
     53    <th style="" class="manage-column column-name" scope="col"><?php _e('Category', 'banner-manager')?></th>
     54    <th style="" class="manage-column column-name" scope="col"><?php _e('Group', 'banner-manager')?></th>
     55    <th style="" class="manage-column column-name" scope="col"><?php _e('Views', 'banner-manager')?></th>
     56    <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks', 'banner-manager')?></th>
     57    <th style="" class="manage-column column-name" scope="col"><?php _e('Active', 'banner-manager')?></th>
    5858    </tr>
    5959    </thead>
     
    6161    <tfoot>
    6262    <tr>
    63     <th style="" class="manage-column column-name" scope="col"><?php _e('Banner')?></th>
    64     <th style="" class="manage-column column-name" scope="col"><?php _e('Category')?></th>
    65     <th style="" class="manage-column column-name" scope="col"><?php _e('Group')?></th>
    66     <th style="" class="manage-column column-name" scope="col"><?php _e('Views')?></th>
    67     <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks')?></th>
    68     <th style="" class="manage-column column-name" scope="col"><?php _e('Active')?></th>
     63    <th style="" class="manage-column column-name" scope="col"><?php _e('Banner', 'banner-manager')?></th>
     64    <th style="" class="manage-column column-name" scope="col"><?php _e('Category', 'banner-manager')?></th>
     65    <th style="" class="manage-column column-name" scope="col"><?php _e('Group', 'banner-manager')?></th>
     66    <th style="" class="manage-column column-name" scope="col"><?php _e('Views', 'banner-manager')?></th>
     67    <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks', 'banner-manager')?></th>
     68    <th style="" class="manage-column column-name" scope="col"><?php _e('Active', 'banner-manager')?></th>
    6969    </tr>
    7070    </tfoot>
     
    7575    <tr class="alternate" id="tag-1">
    7676        <td class="name column-name">
    77         <a href="?page=bm-index&amp;status=edit&amp;id=<?php echo $i_banner->id?>" class="row-title"><?php echo empty($i_banner->title)? '['.__('Empty').']' : $i_banner->title;?></a>
     77        <a href="?page=bm-index&amp;status=edit&amp;id=<?php echo $i_banner->id?>" class="row-title"><?php echo empty($i_banner->title)? '['.__('Empty', 'banner-manager').']' : $i_banner->title;?></a>
    7878        <div class="row-actions">
    79             <span class="edit"><a title="<?php _e('Edit this item')?>" href="?page=bm-index&amp;status=edit&amp;id=<?php echo $i_banner->id?>&amp;<?php echo $url_query; ?>"><?php _e('Edit')?></a> | </span>
    80             <span class="trash"><a href="?page=bm-index&amp;status=delete&amp;id=<?php echo $i_banner->id?>&amp;<?php echo $url_query; ?>" class="delete" title="<?php _e('Move this item to the Trash')?>" class="submitdelete"><?php _e('Trash')?></a> | </span>
    81             <span class="view"><a rel="permalink" title="<?php _e('View')?>" target="_blank" href="<?php echo $i_banner->src;?>&amp;<?php echo $url_query; ?>"><?php _e('View')?></a></span>
     79            <span class="edit"><a title="<?php _e('Edit this item', 'banner-manager')?>" href="?page=bm-index&amp;status=edit&amp;id=<?php echo $i_banner->id?>&amp;<?php echo $url_query; ?>"><?php _e('Edit', 'banner-manager')?></a> | </span>
     80            <span class="trash"><a href="?page=bm-index&amp;status=delete&amp;id=<?php echo $i_banner->id?>&amp;<?php echo $url_query; ?>" class="delete" title="<?php _e('Move this item to the Trash', 'banner-manager')?>" class="submitdelete"><?php _e('Trash', 'banner-manager')?></a> | </span>
     81            <span class="view"><a rel="permalink" title="<?php _e('View', 'banner-manager')?>" target="_blank" href="<?php echo $i_banner->src;?>&amp;<?php echo $url_query; ?>"><?php _e('View', 'banner-manager')?></a></span>
    8282        </div>
    8383        </td>
     
    8686        <td class="column-name"><?php echo $i_banner->views;?></td>
    8787        <td class="column-name"><?php echo $i_banner->clicks;?></td>
    88         <td class="column-name"><?php echo ($i_banner->active)? __('Yes') : __('No') ;?></td>
     88        <td class="column-name"><?php echo ($i_banner->active)? __('Yes', 'banner-manager') : __('No', 'banner-manager') ;?></td>
    8989    </tr>
    9090    <?php endforeach;?>
    9191    <?php else: ?>
    9292    <tr class="alternate" id="tag-1">
    93         <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty');?></a></td>
    94         <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty');?></a></td>
     93        <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty', 'banner-manager');?></a></td>
     94        <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty', 'banner-manager');?></a></td>
    9595    </tr>
    9696    <?php endif; ?>
     
    110110<div class="form-wrap">
    111111<?php if(!isset($banner->id)): ?>
    112 <h3><?php _e('Add New Banner')?></h3>
     112<h3><?php _e('Add New Banner', 'banner-manager')?></h3>
    113113<?php else: ?>
    114 <h3><?php _e('Edit Banner')?></h3>
     114<h3><?php _e('Edit Banner', 'banner-manager')?></h3>
    115115<?php endif; ?>
    116116<form class="validate" action="?page=bm-index&status=new" method="post" enctype="multipart/form-data">
    117117<div class="form-field form-required">
    118     <label for="tag-name"><?php _e('Category')?></label>
     118    <label for="tag-name"><?php _e('Category', 'banner-manager')?></label>
    119119    <?php if(isset($categories)): ?>
    120120    <select name="category">
     
    125125    <?php endif; ?>
    126126   
    127     <label for="tag-name"><?php _e('Title')?></label>
     127    <label for="tag-name"><?php _e('Title', 'banner-manager')?></label>
    128128    <input type="text" size="40" value="<?php echo isset($banner->title)? $banner->title : '';?>" name="title">
    129129   
    130     <label for="tag-name"><?php _e('Src')?></label>
     130    <label for="tag-name"><?php _e('Src', 'banner-manager')?></label>
    131131    <input type="file" size="40" value="" name="src">
    132132   
     
    136136    <?php endif; ?>
    137137   
    138     <label for="tag-name"><?php _e('Link')?></label>
     138    <label for="tag-name"><?php _e('Link', 'banner-manager')?></label>
    139139    <input type="text" size="40" value="<?php echo isset($banner->link)? $banner->link : '';?>" name="link">
    140140   
    141     <label for="tag-name"><?php _e('Blank')?></label>
     141    <label for="tag-name"><?php _e('Blank', 'banner-manager')?></label>
    142142    <input type="checkbox" size="40" value="1" name="blank" <?php echo empty($banner->blank)? '' : 'checked="checked"';?>>
    143143
    144     <label for="tag-name"><?php _e('Active')?></label>
     144    <label for="tag-name"><?php _e('Active', 'banner-manager')?></label>
    145145    <input type="checkbox" size="40" value="1" name="active" <?php echo empty($banner->active)? '' : 'checked="checked"';?>>
    146146
    147     <label for="tag-name"><?php _e('Group')?> (<?php _e('Only one banner of group in same page') ?>)</label>
     147    <label for="tag-name"><?php _e('Group', 'banner-manager')?> (<?php _e('Only one banner of group in same page', 'banner-manager') ?>)</label>
    148148    <input type="text" size="40" value="<?php echo isset($banner->groupkey)? $banner->groupkey : '';?>" name="groupkey">
    149149
     
    155155<p class="submit">
    156156    <?php if(!isset($banner->id)): ?>
    157     <input type="submit" value="<?php _e('Add New Banner')?>" name="submit" class="button">
     157    <input type="submit" value="<?php _e('Add New Banner', 'banner-manager')?>" name="submit" class="button">
    158158    <?php else: ?>
    159     <input type="submit" value="<?php _e('Edit Banner')?>" name="submit" class="button">
     159    <input type="submit" value="<?php _e('Edit Banner', 'banner-manager')?>" name="submit" class="button">
    160160    <?php endif; ?>
    161161</p>
  • banner-manager/trunk/templates/categories.php

    r315555 r450960  
    22
    33<?php $this->start('title') ?>
    4 <h2><?php _e('Categories')?></h2>
     4<h2><?php _e('Categories', 'banner-manager')?></h2>
    55<?php $this->stop();?>
    66
     
    2222    <thead>
    2323    <tr>
    24     <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Category')?></th>
    25     <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag')?></th>
     24    <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Category', 'banner-manager')?></th>
     25    <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag', 'banner-manager')?></th>
    2626   
    2727    </tr>
     
    3030    <tfoot>
    3131    <tr>
    32     <th style="" class="manage-column column-name" scope="col"><?php _e('Category')?></th>
    33     <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag')?></th>
     32    <th style="" class="manage-column column-name" scope="col"><?php _e('Category', 'banner-manager')?></th>
     33    <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag', 'banner-manager')?></th>
    3434    </tr>
    3535    </tfoot>
     
    4242        <strong><a href="?page=bm-categories&amp;status=edit&amp;id=<?php echo $i_category->id; ?>" class="row-title"><?php echo $i_category->groups?></a></strong>
    4343        <div class="row-actions">
    44             <span class="edit"><a title="<?php _e('Edit this item')?>" href="?page=bm-categories&amp;status=edit&amp;id=<?php echo $i_category->id; ?>"><?php _e('Edit')?></a> | </span>
    45             <span class="trash"><a class="delete" href="?page=bm-categories&amp;status=delete&amp;id=<?php echo $i_category->id; ?>" title="<?php _e('Move this item to the Trash')?>" class="submitdelete"><?php _e('Trash')?></a></span>
     44            <span class="edit"><a title="<?php _e('Edit this item', 'banner-manager')?>" href="?page=bm-categories&amp;status=edit&amp;id=<?php echo $i_category->id; ?>"><?php _e('Edit', 'banner-manager')?></a> | </span>
     45            <span class="trash"><a class="delete" href="?page=bm-categories&amp;status=delete&amp;id=<?php echo $i_category->id; ?>" title="<?php _e('Move this item to the Trash', 'banner-manager')?>" class="submitdelete"><?php _e('Trash', 'banner-manager')?></a></span>
    4646        </div>
    4747        </td>
     
    5252    <tr class="alternate" id="tag-1">
    5353        <td class="name column-name">
    54         <strong><a href="#" class="row-title"><?php _e('Without category');?></a></strong>
     54        <strong><a href="#" class="row-title"><?php _e('Without category', 'banner-manager');?></a></strong>
    5555        </td>
    5656    </tr>
     
    7272<div class="form-wrap">
    7373<?php if(!isset($category->id)): ?>
    74 <h3><?php _e('Add New Category')?></h3>
     74<h3><?php _e('Add New Category', 'banner-manager')?></h3>
    7575<?php else: ?>
    76 <h3><?php _e('Edit Category')?></h3>
     76<h3><?php _e('Edit Category', 'banner-manager')?></h3>
    7777<?php endif; ?>
    7878<form class="validate" action="?page=bm-categories&status=new" method="post">
    7979<div class="form-field form-required">
    8080
    81     <label for="tag-name"><?php _e('Name')?></label>
     81    <label for="tag-name"><?php _e('Name', 'banner-manager')?></label>
    8282    <input type="text" size="40" value="<?php echo isset($category->groups)? $category->groups : '';?>" name="category">
    8383   
    84     <label for="tag-name"><?php _e('Width')?> (px)</label>
     84    <label for="tag-name"><?php _e('Width', 'banner-manager')?> (px)</label>
    8585    <input type="text" size="5" value="<?php echo isset($category->width)? $category->width : '';?>" name="width">
    8686   
    87     <label for="tag-name"><?php _e('Height')?> (px)</label>
     87    <label for="tag-name"><?php _e('Height', 'banner-manager')?> (px)</label>
    8888    <input type="text" size="5" value="<?php echo isset($category->height)? $category->height : '';?>" name="height">
    8989   
     
    9595<p class="submit">
    9696    <?php if(!isset($category->id)): ?>
    97     <input type="submit" value="<?php _e('Add New Category')?>" name="submit" class="button">
     97    <input type="submit" value="<?php _e('Add New Category', 'banner-manager')?>" name="submit" class="button">
    9898    <?php else: ?>
    99     <input type="submit" value="<?php _e('Edit Category')?>" name="submit" class="button">
     99    <input type="submit" value="<?php _e('Edit Category', 'banner-manager')?>" name="submit" class="button">
    100100    <?php endif; ?>
    101101</p>
  • banner-manager/trunk/templates/layout.php

    r291811 r450960  
    1919    jQuery(".delete").click(function(){
    2020        var href = jQuery(this).attr('href');
    21         var answer = confirm("<?php _e('Do you like delete this?');?>")
     21        var answer = confirm("<?php _e('Do you like delete this?', 'banner-manager');?>")
    2222        if(answer)
    2323        {
  • banner-manager/trunk/widget.php

    r327531 r450960  
    55    public function banner_widget()
    66    {
    7         $widget_ops = array('description' => __( "Your banners" ) );
     7        $widget_ops = array('description' => __( "Your banners", 'banner-manager' ) );
    88        parent::WP_Widget(false, $name = 'Banners', $widget_ops);
    99    }
Note: See TracChangeset for help on using the changeset viewer.