Skip to content

Translatable strings #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions classes/class-sendpress-emails-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ function column_default($item, $column_name){

case 'actions':
$a = '<div class="inline-buttons">';
$a .= '<a class="btn view-btn" title="'. get_post_meta($item->ID, "_sendpress_subject", true) . '" href="'. get_permalink( $item->ID ). '"><i class="icon-eye-open "></i> View</a> ';
$a .= '<a class="btn " href="?page='.$_REQUEST['page'].'&view=style&emailID='. $item->ID .'"><i class="icon-edit"></i> Edit</a> ';
$a .= '<a class="btn view-btn" title="'. get_post_meta($item->ID, "_sendpress_subject", true) . '" href="'. get_permalink( $item->ID ). '"><i class="icon-eye-open "></i> ' . __('View', 'sendpress') . '</a> ';
$a .= '<a class="btn " href="?page='.$_REQUEST['page'].'&view=style&emailID='. $item->ID .'"><i class="icon-edit"></i> ' . __('Edit', 'sendpress') . '</a> ';
$a = apply_filters('sendpress_email_table', $a, $item);
if( SendPress_Admin::access('Emails_Send') ) {
$a .= '<a class="btn btn-primary " href="'. SendPress_Admin::link('Emails_Send').'&emailID='. $item->ID .'"><i class="icon-envelope icon-white"></i> Send</a>';
$a .= '<a class="btn btn-primary " href="'. SendPress_Admin::link('Emails_Send').'&emailID='. $item->ID .'"><i class="icon-envelope icon-white"></i> ' . __('Send', 'sendpress') . '</a>';
}

$a .= '</div>';
Expand Down Expand Up @@ -379,4 +379,4 @@ function prepare_items() {



}
}
24 changes: 12 additions & 12 deletions classes/class-sendpress-lists-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ function column_default($item, $column_name){
return date('Y-m-d');
case 'actions':
return '<div class="inline-buttons">
<a class="btn btn-info" href="?page='.$_REQUEST['page'].'&view=subscribers&listID='.$item->ID.'"><i class="icon-user icon-white "></i> View/Edit</a>
<a class="btn" href="?page='.$_REQUEST['page'].'&view=add&listID='. $item->ID .'"><i class="icon-user"></i> Import</a>
<a class="btn" href="?page='.$_REQUEST['page'].'&action=export-list&listID='. $item->ID .'"><i class="icon-download"></i> Export</a>
<a class="btn " href="?page='.$_REQUEST['page'].'&view=listedit&listID='. $item->ID .'"><i class="icon-wrench"></i> Settings</a>
<a class="btn " href="'. SendPress_Admin::link('Subscribers_Listform', array('listID' => $item->ID)) .'"><i class="icon-list"></i> Form</a>
<a class="btn btn-info" href="?page='.$_REQUEST['page'].'&view=subscribers&listID='.$item->ID.'"><i class="icon-user icon-white "></i> ' . __('View/Edit', 'sendpress') . '</a>
<a class="btn" href="?page='.$_REQUEST['page'].'&view=add&listID='. $item->ID .'"><i class="icon-user"></i> ' . __('Import', 'sendpress') . '</a>
<a class="btn" href="?page='.$_REQUEST['page'].'&action=export-list&listID='. $item->ID .'"><i class="icon-download"></i> ' . __('Export', 'sendpress') . '</a>
<a class="btn " href="?page='.$_REQUEST['page'].'&view=listedit&listID='. $item->ID .'"><i class="icon-wrench"></i> ' . __('Settings', 'sendpress') . '</a>
<a class="btn " href="'. SendPress_Admin::link('Subscribers_Listform', array('listID' => $item->ID)) .'"><i class="icon-list"></i> ' . __('Form', 'sendpress') . '</a>
</div>';
default:
return print_r($item,true); //Show the whole array for troubleshooting purposes
Expand Down Expand Up @@ -117,7 +117,7 @@ function column_title($item){

//Build row actions
$actions = array(
'edit' => sprintf('<a href="?page=%s&view=%s&listID=%s">Edit</a>',
'edit' => sprintf('<a href="?page=%s&view=%s&listID=%s">' . __('Edit', 'sendpress') . '</a>',
/*$1%s*/ 'sp-subscribers',
/*$2%s*/ 'listedit',
/*$3%s*/ $item->ID
Expand Down Expand Up @@ -183,11 +183,11 @@ function get_columns(){

$columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
'title' => 'Name',
'count_subscribers' => 'Active',
'last_send_date' => 'Last Send',
//'count_bounced' => 'Bounced',
'actions'=> 'Subscribers'
'title' => __('Name', 'sendpress'),
'count_subscribers' => __('Active', 'sendpress'),
'last_send_date' => __('Last Send', 'sendpress'),
//'count_bounced' => __('Bounced', 'sendpress'),
'actions'=> __('Subscribers', 'sendpress'),


);
Expand Down Expand Up @@ -377,4 +377,4 @@ function prepare_items() {



}
}
13 changes: 6 additions & 7 deletions classes/class-sendpress-notifications-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ function daily_notification_check(){
if( $options['notifications-subscribed-monthly'] ){
//get subscribers for for the last month
$count = SendPress_Data::get_subscriber_event_count_month(date('j', strtotime(date('j')." -1 month")),'subscribed');
$subscribe_body = 'You had '.$count.' new subscribers last month.<br><br>';

$subscribe_body = sprintf( _n('You had %d new subscriber last month.', 'You had %d new subscribers last month.', $count, 'sendpress'), $count) . '<br><br>';
}
if( $options['notifications-unsubscribed-monthly'] ){
$count = SendPress_Data::get_subscriber_event_count_month(date('j', strtotime(date('j')." -1 month")),'unsubscribed');
$unsubscribe_body = 'You had '.$count.' people unsubscribe last month.<br><br>';
$unsubscribe_body = sprintf( __('You had %d people unsubscribe last month.', 'sendpress'), $count) . '<br><br>';
}

if( isset($subscribe_body) || isset($unsubscribe_body) ){
Expand All @@ -100,11 +99,11 @@ function daily_notification_check(){
$unsubscribe_body = '';
if( $options['notifications-subscribed-weekly'] ){
$count = SendPress_Data::get_subscriber_event_count_week(date('Y-m-d', strtotime(date('Y-m-d')." -1 week -1 day")),date('Y-m-d', strtotime(date('Y-m-d')." +1 day")),'subscribed');
$subscribe_body = 'You had '.$count.' new subscribers last week.';
$subscribe_body = sprintf( _n('You had %d new subscriber last week.', 'You had %d new subscribers last week.', $count, 'sendpress'), $count);
}
if( $options['notifications-unsubscribed-weekly'] ){
$count = SendPress_Data::get_subscriber_event_count_week(date('Y-m-d', strtotime(date('Y-m-d')." -1 week")),date('Y-m-d'),'unsubscribed');
$unsubscribe_body = 'You had '.$count.' people unsubscribe last week.';
$unsubscribe_body = sprintf( __('You had %d people unsubscribe last week.', 'sendpress'), $count);
}

if( isset($subscribe_body) || isset($unsubscribe_body) ){
Expand All @@ -121,11 +120,11 @@ function daily_notification_check(){
$unsubscribe_body = '';
if( $options['notifications-subscribed-daily'] ){
$count = SendPress_Data::get_subscriber_event_count_day(date('Y-m-d'),'subscribed');
$subscribe_body = 'You had '.$count.' new subscribers today.';
$subscribe_body = sprintf( _n('You had %d new subscriber today.', 'You had %d new subscribers today.', $count, 'sendpress'), $count);
}
if( $options['notifications-unsubscribed-daily'] ){
$count = SendPress_Data::get_subscriber_event_count_day(date('Y-m-d'),'unsubscribed');
$subscribe_body = 'You had '.$count.' users unsubscribe today.';
$subscribe_body = sprintf( _n( 'You had %d user unsubscribe today.', 'You had %d users unsubscribe today.', $count, 'sendpress' ), $count );
}

if( isset($subscribe_body) || isset($unsubscribe_body) ){
Expand Down
20 changes: 10 additions & 10 deletions classes/class-sendpress-queue-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ function column_default($item, $column_name){
case 'actions':
$buttons ='';
if($item->attempts >= $item->max_attempts){
$buttons .='<a class="btn resend-btn btn-success" href="?page='.$_REQUEST['page'].'&action=requeue&emailID='. $item->id .'"><i class="icon-repeat icon-white"></i> Requeue</a> ';
$buttons .='<a class="btn resend-btn btn-success" href="?page='.$_REQUEST['page'].'&action=requeue&emailID='. $item->id .'"><i class="icon-repeat icon-white"></i> ' . __('Requeue', 'sendpres') . '</a> ';
}
$buttons .='<a class="btn resend-btn" href="?page='.$_REQUEST['page'].'&action=queue-delete&emailID='. $item->id .'"><i class="icon-trash "></i> Delete</a> ';
$buttons .='<a class="btn resend-btn" href="?page='.$_REQUEST['page'].'&action=queue-delete&emailID='. $item->id .'"><i class="icon-trash "></i> ' . __('Delete', 'sendpres') . '</a> ';
return '<div class="inline-buttons">'.$buttons.'</div>';

default:
Expand Down Expand Up @@ -161,7 +161,7 @@ function column_title($item){
);

//Return the title contents
return sprintf('%1$s <span style="color:silver">(subscriber id:%2$s)</span>%3$s',
return sprintf('%1$s <span style="color:silver">(' . __('subscriber' ,'sendpress') . ' id:%2$s)</span>%3$s',
/*$1%s*/ $item->to_email,
/*$2%s*/ $item->subscriberID,
/*$3%s*/ $this->row_actions($actions)
Expand Down Expand Up @@ -204,14 +204,14 @@ function get_columns(){
$columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
'gravatar' => ' ',
'title' => 'Email',
'listid' => 'List',
'title' => __('Email', 'sendpress'),
'listid' => __('List', 'sendpress'),


'max_attempts' => 'Max Attempts',
'attempts' => 'Attempted',
'last_attemp' => 'Last Attempt',
'actions' => 'Actions'
'max_attempts' => __('Max Attempts', 'sendpress'),
'attempts' => __('Attempted', 'sendpress'),
'last_attemp' => __('Last Attempt', 'sendpress'),
'actions' => __('Actions', 'sendpress')


);
Expand Down Expand Up @@ -277,7 +277,7 @@ function list_select(){
if(!isset($_GET['listid']) ){
$cls = " selected='selected' ";
}
echo "<option cls value='-1' >All Lists</option>";
echo "<option cls value='-1' >" . __('All Lists', 'sendpress') . "</option>";
foreach ($info as $list) {
$cls = '';
if(isset($_GET['listid']) && $_GET['listid'] == $list['id']){
Expand Down
32 changes: 16 additions & 16 deletions classes/class-sendpress-reports-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ function column_default($item, $column_name){
$rec = get_post_meta($item->ID, '_send_count', true) + get_post_meta($item->ID, '_send_last_count', true) . '';
$sent = get_post_meta($item->ID, '_sent_total', true) . '';
$queue = SendPress_Data::emails_in_queue($item->ID);
$string = "Recipients: ". $rec ."<br>";
$string .= "Sent: ". $sent ."<br>";
$string .= "In Queue: ". $queue ."<br>";
$string = __('Recipients:', 'sendpress') . ' ' . $rec ."<br>";
$string .= __('Sent:', 'sendpress') . ' ' . $sent ."<br>";
$string .= __('In Queue:', 'sendpress') . ' ' . $queue ."<br>";

return $string;

Expand Down Expand Up @@ -159,7 +159,7 @@ function column_default($item, $column_name){
return date_i18n(get_option('date_format') , strtotime( $item->post_date ) );

case 'actions':
return '<div class="inline-buttons"><a class="spbutton left" href="'. get_permalink( $item->ID ). '">View</a><a class="spbutton right" href="?page='.$_REQUEST['page'].'&view=edit-email&emailID='. $item->ID .'">Edit</a><a class="spbutton bluebtn" href="?page='.$_REQUEST['page'].'&view=send-email&emailID='. $item->ID .'">Send</a></div>';
return '<div class="inline-buttons"><a class="spbutton left" href="'. get_permalink( $item->ID ). '">' . __('View', 'sendpress') . '</a><a class="spbutton right" href="?page='.$_REQUEST['page'].'&view=edit-email&emailID='. $item->ID .'">' . __('Edit', 'sendpress') . '</a><a class="spbutton bluebtn" href="?page='.$_REQUEST['page'].'&view=send-email&emailID='. $item->ID .'">' . __('Send', 'sendpress') . '</a></div>';
default:
return apply_filters('sendpress_reports_column_'.$column_name, $item); //Show the whole array for troubleshooting purposes
}
Expand Down Expand Up @@ -188,8 +188,8 @@ function column_title($item){

$actions = array(
// 'edit' => sprintf('<a href="?page=%s&view=%s&report=%s">Edit</a>',$_REQUEST['page'],'edit-email',$item->ID),
'view' => sprintf('<a href="%s">View Email</a>',get_permalink( $item->ID )),
'delete' => sprintf('<a href="?page=%s&action=%s&reportID=%s">Delete</a>',$_REQUEST['page'],'delete-report',$item->ID),
'view' => sprintf('<a href="%s">' . __('View Email', 'sendpress') . '</a>',get_permalink( $item->ID )),
'delete' => sprintf('<a href="?page=%s&action=%s&reportID=%s">' . __('Delete', 'sendpress') . '</a>',$_REQUEST['page'],'delete-report',$item->ID),
);

//Return the title contents
Expand Down Expand Up @@ -236,16 +236,16 @@ function get_columns(){

$columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
'title' => 'Subject',
'created' => 'Date Sent',
'count' => 'Info',
'title' => __('Subject', 'sendpress'),
'created' => __('Date Sent', 'sendpress'),
'count' => __('Info', 'sendpress'),

'sentto' => 'Lists',
'opens' => 'Opens ',
'clicks'=> 'Clicks',
'unsubscribe'=> 'Unsubscribes',
//'bounces' => 'Bounces'
//'count_subscribers' => 'Subscribers'
'sentto' => __('Lists', 'sendpress'),
'opens' => __('Opens ', 'sendpress'),
'clicks'=> __('Clicks', 'sendpress'),
'unsubscribe'=> __('Unsubscribes', 'sendpress')
//'bounces' => 'Bounces', 'sendpress')
//'count_subscribers' => 'Subscribers', 'sendpress')


);
Expand Down Expand Up @@ -449,4 +449,4 @@ function prepare_items() {



}
}
14 changes: 6 additions & 8 deletions classes/class-sendpress-sender-website.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@ function save(){

}

function settings(){ ?>
This option uses your host's local mail server to send emails.

<?php

$hosting = SendPress_Option::get('website-hosting-provider');
function settings(){

_e("This option uses your host's local mail server to send emails." ,"sendpress");


$hosting = SendPress_Option::get('website-hosting-provider');

?>
<br><br>
<input type="checkbox" value="godaddy" name="hosting-provider" <?php if($hosting=="godaddy"){ echo "checked='checked'"; } ?> /> GoDaddy Hosting<br>
This sets the smtp host to <b>relay-hosting.secureserver.net</b> for GoDaddy users.<br>GoDaddy limits emails to 1000 per day.
<?php _e('This sets the smtp host to <b>relay-hosting.secureserver.net</b> for GoDaddy users.<br>GoDaddy limits emails to 1000 per day.', 'sendpress'); ?>
<!--Send a max of <input type="text" name="emails-per-day" value="" class="sptext" > Emails per day.-->


Expand Down Expand Up @@ -193,4 +191,4 @@ function send_email($to, $subject, $html, $text, $istest = false ){
}


}
}
14 changes: 7 additions & 7 deletions classes/class-sendpress-signup-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ function load_form( $attr, $content = null ) {
}

extract(shortcode_atts(array(
'firstname_label' => 'First Name',
'lastname_label' => 'Last Name',
'email_label' => 'EMail',
'list_label' => 'List Selection',
'firstname_label' => __('First Name', 'sendpress'),
'lastname_label' => __('Last Name', 'sendpress'),
'email_label' => __('Email', 'sendpress'),
'list_label' => __('List Selection', 'sendpress'),
'listids' => '',
'display_firstname' => false,
'display_lastname' => false,
'label_display' => false,
'desc' => '',
'label_width' => 100,
'thank_you'=>'Thank you for subscribing!',
'button_text' => 'Submit',
'no_list_error' => '<div><b>-- NO LIST HAS BEEN SET! --</b></div>'
'thank_you'=> __('Thank you for subscribing!', 'sendpress'),
'button_text' => __('Submit', 'sendpress'),
'no_list_error' => '<div><b>' . __('-- NO LIST HAS BEEN SET! --', 'sendpress') . '</b></div>'
), $attr));

$label = filter_var($label_display, FILTER_VALIDATE_BOOLEAN);
Expand Down
20 changes: 10 additions & 10 deletions classes/class-sendpress-subscribers-all-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function column_default($item, $column_name){
return date_i18n(get_option('date_format') , strtotime( $item->join_date ) );
case 'actions':
$a = '<div class="inline-buttons">';
$a .= '<a class="btn" href="'. SendPress_Admin::link('Subscribers_Subscriber', array('subscriberID'=>$item->subscriberID )) .'"><i class="icon-edit "></i> Edit</a> ';
$a .= '<a class="btn" href="'. SendPress_Admin::link('Subscribers_Subscriber', array('subscriberID'=>$item->subscriberID )) .'"><i class="icon-edit "></i> ' . __('Edit', 'sendpress') . '</a> ';

$a .= '</div>';
return $a;
Expand Down Expand Up @@ -166,13 +166,13 @@ function get_columns(){
$columns = array(
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
'gravatar' => '',
'title' => 'Email',
'firstname' => 'First Name',
'lastname' => 'Last Name',
//'status' => 'Status',
'joindate' => 'Date Joined',
'actions' => 'Actions'
//'count_subscribers' => 'Subscribers'
'title' => __('Email', 'sendpress'),
'firstname' => __('First Name', 'sendpress'),
'lastname' => __('Last Name', 'sendpress'),
//'status' => __('Status', 'sendpress'),
'joindate' => __('Date Joined', 'sendpress'),
'actions' => __('Actions', 'sendpress')
//'count_subscribers' => 'Subscribers', 'sendpress')


);
Expand Down Expand Up @@ -257,7 +257,7 @@ function status_select(){
if(!isset($_GET['statusid']) ){
$cls = " selected='selected' ";
}
echo "<option cls value='-1' >Any Status</option>";
echo "<option cls value='-1' >" . __('Any Status', 'sendpress') . "</option>";
foreach ($info as $list) {
$cls = '';
if(isset($_GET['statusid']) && $_GET['statusid'] == $list->statusid){
Expand Down Expand Up @@ -401,4 +401,4 @@ function prepare_items() {



}
}
Loading