Skip to content

Commit

Permalink
fixed trnalsation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
christiespeich committed Aug 16, 2016
1 parent 4496933 commit 0e02fd1
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 124 deletions.
30 changes: 15 additions & 15 deletions includes/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ function mbds_get_most_recent_post( $storyID) {

function mbds_get_post_names() {
return apply_filters('mbds_post_names', array(
'chapters' => array('single' => __('Chapter', 'mbd-blog-post-series'),
'plural' => __('Chapters', 'mbd-blog-post-series')),
'episodes' => array('single' => __('Episode', 'mbd-blog-post-series'),
'plural' => __('Episodes', 'mbd-blog-post-series')),
'parts' => array('single' => __('Part', 'mbd-blog-post-series'),
'plural' => __('Parts', 'mbd-blog-post-series')),
'chapters' => array('single' => __('Chapter', 'mooberry-story'),
'plural' => __('Chapters', 'mooberry-story')),
'episodes' => array('single' => __('Episode', 'mooberry-story'),
'plural' => __('Episodes', 'mooberry-story')),
'parts' => array('single' => __('Part', 'mooberry-story'),
'plural' => __('Parts', 'mooberry-story')),
));
}

Expand All @@ -230,7 +230,7 @@ function mbds_get_post_names_options() {
foreach ($post_names as $key => $post_name) {
$options[$key] = $post_names[$key]['plural'];
}
$options['custom'] = __('Custom', 'mbd-blog-post-series');
$options['custom'] = __('Custom', 'mooberry-story');
return apply_filters('mbds_posts_names_options', $options);
}

Expand Down Expand Up @@ -275,12 +275,12 @@ function mbds_output_dropdown( $options, $selected) {

function mbds_get_story_widget_dropdown( $selected ) {
$options = array(
'all' => __('All Stories', 'mbd-blog-post-series'),
'complete' => __('Completed Stories', 'mbd-blog-post-series'),
'incomplete' => __('Unfinished Stories', 'mbd-blog-post-series'),
'recent' => __('Last Updated Story', 'mbd-blog-post-series'),
'series' => __('Stories in a Series', 'mbd-blog-post-series'),
'genre' => __('Stories in a Genre', 'mbd-blog-post-series'),
'all' => __('All Stories', 'mooberry-story'),
'complete' => __('Completed Stories', 'mooberry-story'),
'incomplete' => __('Unfinished Stories', 'mooberry-story'),
'recent' => __('Last Updated Story', 'mooberry-story'),
'series' => __('Stories in a Series', 'mooberry-story'),
'genre' => __('Stories in a Genre', 'mooberry-story'),
);

return apply_filters('mbds_story_widget_dropdown', mbds_output_dropdown($options, $selected));
Expand All @@ -307,7 +307,7 @@ function mbds_get_stories_dropdown( $selected ) {
}

function mbds_get_post_widget_dropdown( $selected ){
$options = array( 'all' => __('All', 'mbd-blog-post-series'),
'latest' => __('Most Recent', 'mbd-blog-post-series'));
$options = array( 'all' => __('All', 'mooberry-story'),
'latest' => __('Most Recent', 'mooberry-story'));
return apply_filters('mbds_post_widget_dropdown', mbds_output_dropdown( $options, $selected ));
}
Binary file modified languages/mooberry-story-pt_BR.mo
Binary file not shown.
18 changes: 10 additions & 8 deletions languages/mooberry-story-pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@
msgid ""
msgstr ""
"Project-Id-Version: Mooberry Story v0.1\n"
"Report-Msgid-Bugs-To: Mooberry Dreams <[email protected]>\n"
"Report-Msgid-Bugs-To: Mooberry Dreams <mooberrystory@mooberrydreams."
"com>\n"
"POT-Creation-Date: 2015-08-02 22:08-0500\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: Mooberry Dreams <[email protected]>\n"
"Language: en_US\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;"
"esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
"X-Poedit-Basepath: ../\n"
"X-Generator: Poedit 1.5.7\n"
"X-Poedit-SearchPathExcluded-0: includes/cmb2\n"
"esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;"
"_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;"
"__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
"X-Poedit-Basepath: ..\n"
"X-Generator: Poedit 1.8.8\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: includes/cmb2\n"

#: includes/helper-functions.php:210
msgid "Chapter"
Expand Down
126 changes: 65 additions & 61 deletions mooberry-story.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Plugin Name: Mooberry Story
Plugin URI: http://www.mooberrydreams.com/products/mooberry-story
Description: Organizes multiple blog posts into a series. Make it easy for readers to find your stories, including older ones.
Version: 1.2.2
Version: 1.2.3
Author: Mooberry Dreams
Author URI: https://profiles.wordpress.org/mooberrydreams/
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Domain Path: /languages
Text Domain: mbd-blog-post-series
Domain Path: languages
Text Domain: mooberry-story
Mooberry Story is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -29,7 +29,7 @@
define('MBDS_PLUGIN_DIR', plugin_dir_path( __FILE__ ));

define('MBDS_PLUGIN_VERSION_KEY', 'mbds_version');
define('MBDS_PLUGIN_VERSION', '1.2.2');
define('MBDS_PLUGIN_VERSION', '1.2.3');


//update checker
Expand Down Expand Up @@ -62,7 +62,11 @@ function mbds_activate() {
$wp_rewrite->flush_rules();
}


add_action('plugins_loaded', 'mbds_plugins_loaded');
function mbds_plugins_loaded() {

load_plugin_textdomain( 'mooberry-story', FALSE, basename( MBDS_PLUGIN_DIR ) . '/languages/' );
}

add_action( 'admin_head', 'mbds_register_admin_styles' );
function mbds_register_admin_styles() {
Expand Down Expand Up @@ -96,7 +100,7 @@ function mbds_register_styles() {
function mbds_init() {
register_post_type('mbds_story',
apply_filters('mbds_story_cpt', array(
'label' => __('Stories', 'mbd-blog-post-series' ),
'label' => __('Stories', 'mooberry-story' ),
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
Expand All @@ -110,24 +114,24 @@ function mbds_init() {
'supports' => array( 'title', 'comments' ),
'taxonomies' => array( 'mbds_genre', 'mbds_series' ),
'labels' => array (
'name' => __('Stories', 'mbd-blog-post-series'),
'singular_name' => __('Story', 'mbd-blog-post-series'),
'menu_name' => __('Stories', 'noun', 'mbd-blog-post-series'),
'all_items' => __('All Stories', 'mbd-blog-post-series'),
'add_new' => __('Add New', 'mbd-blog-post-series'),
'add_new_item' => __('Add New Story', 'mbd-blog-post-series'),
'edit' => __('Edit', 'mbd-blog-post-series'),
'edit_item' => __('Edit Story', 'mbd-blog-post-series'),
'new_item' => __('New Story', 'mbd-blog-post-series'),
'view' => __('View Story', 'mbd-blog-post-series'),
'view_item' => __('View Story', 'mbd-blog-post-series'),
'search_items' => __('Search Stories', 'mbd-blog-post-series'),
'not_found' => __('No Stories Found', 'mbd-blog-post-series'),
'not_found_in_trash' => __('No Stories Found in Trash', 'mbd-blog-post-series'),
'parent' => __('Parent Story', 'mbd-blog-post-series'),
'filter_items_list' => __( 'Filter Story List', 'mbd-blog-post-series' ),
'items_list_navigation' => __( 'Story List Navigation', 'mbd-blog-post-series' ),
'items_list' => __( 'Story List', 'mbd-blog-post-series' ),
'name' => __('Stories', 'mooberry-story'),
'singular_name' => __('Story', 'mooberry-story'),
'menu_name' => __('Stories', 'noun', 'mooberry-story'),
'all_items' => __('All Stories', 'mooberry-story'),
'add_new' => __('Add New', 'mooberry-story'),
'add_new_item' => __('Add New Story', 'mooberry-story'),
'edit' => __('Edit', 'mooberry-story'),
'edit_item' => __('Edit Story', 'mooberry-story'),
'new_item' => __('New Story', 'mooberry-story'),
'view' => __('View Story', 'mooberry-story'),
'view_item' => __('View Story', 'mooberry-story'),
'search_items' => __('Search Stories', 'mooberry-story'),
'not_found' => __('No Stories Found', 'mooberry-story'),
'not_found_in_trash' => __('No Stories Found in Trash', 'mooberry-story'),
'parent' => __('Parent Story', 'mooberry-story'),
'filter_items_list' => __( 'Filter Story List', 'mooberry-story' ),
'items_list_navigation' => __( 'Story List Navigation', 'mooberry-story' ),
'items_list' => __( 'Story List', 'mooberry-story' ),
),
) )
);
Expand All @@ -146,24 +150,24 @@ function mbds_init() {
'assign_terms' => 'edit_posts',
),
'labels' => array(
'name' => __('Genres', 'mbd-blog-post-series'),
'singular_name' => __('Genre', 'mbd-blog-post-series'),
'search_items' => __('Search Genres' , 'mbd-blog-post-series'),
'all_items' => __('All Genres' , 'mbd-blog-post-series'),
'parent_item' => __('Parent Genre' , 'mbd-blog-post-series'),
'parent_item_colon' => __('Parent Genre:' , 'mbd-blog-post-series'),
'edit_item' => __('Edit Genre' , 'mbd-blog-post-series'),
'update_item' => __('Update Genre' , 'mbd-blog-post-series'),
'add_new_item' => __('Add New Genre' , 'mbd-blog-post-series'),
'new_item_name' => __('New Genre Name' , 'mbd-blog-post-series'),
'menu_name' => __('Genres' , 'mbd-blog-post-series'),
'popular_items' => __('Popular Genres', 'mbd-blog-post-series'),
'separate_items_with_commas' => __('Separate genres with commas', 'mbd-blog-post-series'),
'add_or_remove_items' => __('Add or remove genres', 'mbd-blog-post-series'),
'choose_from_most_used' => __('Choose from the most used genres', 'mbd-blog-post-series'),
'not_found' => __('No genres found', 'mbd-blog-post-series'),
'items_list_navigation' => __( 'Genre navigation', 'mbd-blog-post-series' ),
'items_list' => __( 'Genre list', 'mbd-blog-post-series' ),
'name' => __('Genres', 'mooberry-story'),
'singular_name' => __('Genre', 'mooberry-story'),
'search_items' => __('Search Genres' , 'mooberry-story'),
'all_items' => __('All Genres' , 'mooberry-story'),
'parent_item' => __('Parent Genre' , 'mooberry-story'),
'parent_item_colon' => __('Parent Genre:' , 'mooberry-story'),
'edit_item' => __('Edit Genre' , 'mooberry-story'),
'update_item' => __('Update Genre' , 'mooberry-story'),
'add_new_item' => __('Add New Genre' , 'mooberry-story'),
'new_item_name' => __('New Genre Name' , 'mooberry-story'),
'menu_name' => __('Genres' , 'mooberry-story'),
'popular_items' => __('Popular Genres', 'mooberry-story'),
'separate_items_with_commas' => __('Separate genres with commas', 'mooberry-story'),
'add_or_remove_items' => __('Add or remove genres', 'mooberry-story'),
'choose_from_most_used' => __('Choose from the most used genres', 'mooberry-story'),
'not_found' => __('No genres found', 'mooberry-story'),
'items_list_navigation' => __( 'Genre navigation', 'mooberry-story' ),
'items_list' => __( 'Genre list', 'mooberry-story' ),
)
) )
);
Expand All @@ -181,24 +185,24 @@ function mbds_init() {
'assign_terms' => 'edit_posts',
),
'labels' => array(
'name' => __('Series', 'mbd-blog-post-series'),
'singular_name' => __('Series', 'mbd-blog-post-series'),
'search_items' => __('Search Series' , 'mbd-blog-post-series'),
'all_items' => __('All Series' , 'mbd-blog-post-series'),
'parent_item' => __('Parent Series' , 'mbd-blog-post-series'),
'parent_item_colon' => __('Parent Series:' , 'mbd-blog-post-series'),
'edit_item' => __('Edit Series' , 'mbd-blog-post-series'),
'update_item' => __('Update Series' , 'mbd-blog-post-series'),
'add_new_item' => __('Add New Series' , 'mbd-blog-post-series'),
'new_item_name' => __('New Series Name' , 'mbd-blog-post-series'),
'menu_name' => __('Series' , 'mbd-blog-post-series'),
'popular_items' => __('Popular Series', 'mbd-blog-post-series'),
'separate_items_with_commas' => __('Separate series with commas', 'mbd-blog-post-series'),
'add_or_remove_items' => __('Add or remove series', 'mbd-blog-post-series'),
'choose_from_most_used' => __('Choose from the most used series', 'mbd-blog-post-series'),
'not_found' => __('No Series found', 'mbd-blog-post-series'),
'items_list_navigation' => __( 'Series navigation', 'mbd-blog-post-series' ),
'items_list' => __( 'Series list', 'mbd-blog-post-series' ),
'name' => __('Series', 'mooberry-story'),
'singular_name' => __('Series', 'mooberry-story'),
'search_items' => __('Search Series' , 'mooberry-story'),
'all_items' => __('All Series' , 'mooberry-story'),
'parent_item' => __('Parent Series' , 'mooberry-story'),
'parent_item_colon' => __('Parent Series:' , 'mooberry-story'),
'edit_item' => __('Edit Series' , 'mooberry-story'),
'update_item' => __('Update Series' , 'mooberry-story'),
'add_new_item' => __('Add New Series' , 'mooberry-story'),
'new_item_name' => __('New Series Name' , 'mooberry-story'),
'menu_name' => __('Series' , 'mooberry-story'),
'popular_items' => __('Popular Series', 'mooberry-story'),
'separate_items_with_commas' => __('Separate series with commas', 'mooberry-story'),
'add_or_remove_items' => __('Add or remove series', 'mooberry-story'),
'choose_from_most_used' => __('Choose from the most used series', 'mooberry-story'),
'not_found' => __('No Series found', 'mooberry-story'),
'items_list_navigation' => __( 'Series navigation', 'mooberry-story' ),
'items_list' => __( 'Series list', 'mooberry-story' ),
)
) )
);
Expand Down Expand Up @@ -356,7 +360,7 @@ function mbds_wp_title($title, $sep ) {
if (get_post_type() == 'mbds_story' && is_main_query() && !is_admin() ) {
global $post;
$mbds_story = mbds_get_story( $post->ID );
$title = $mbds_story['title'] . ' - ' . __('A', 'mbd-blog-post-series');
$title = $mbds_story['title'] . ' - ' . __('A', 'mooberry-story');

if (isset($mbds_story['genres'])) {
if (count($mbds_story['genres']>0)) {
Expand Down
10 changes: 5 additions & 5 deletions post-meta-box.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function mbds_init_post_meta_box() {

$post_meta_box = new_cmb2_box( apply_filters('mbds_post_meta_box', array(
'id' => $prefix . 'post_meta_box',
'title' => __( 'Mooberry Story', 'mbd-blog-post-series' ),
'title' => __( 'Mooberry Story', 'mooberry-story' ),
'object_types' => array( 'post', ), // Post type
'context' => 'normal',
'priority' => 'high',
Expand All @@ -20,15 +20,15 @@ function mbds_init_post_meta_box() {
) ) );

$post_meta_box->add_field( apply_filters('mbds_posts_story_field', array(
'name' => __( 'Story', 'mbd-blog-post-series' ),
'name' => __( 'Story', 'mooberry-story' ),
'id' => $prefix . 'story',
'type' => 'select',
'options' => mbds_get_story_list(),

) ) );
/*
$post_meta_box->add_field( apply_filters('mbds_posts_summary_field', array(
'name' => __( 'Summary', 'mbd-blog-post-series' ),
'name' => __( 'Summary', 'mooberry-story' ),
'id' => $prefix . 'summary',
'type' => 'wysiwyg',
'options' => array(
Expand Down Expand Up @@ -178,7 +178,7 @@ function mbds_untrash_post( $postID ) {
// Add to our admin_init function
add_filter('manage_post_posts_columns', 'mbds_add_post_columns');
function mbds_add_post_columns($columns) {
$columns['mbds_story'] = __('Story', 'mbd-blog-post-series');
$columns['mbds_story'] = __('Story', 'mooberry-story');
return apply_filters('mbds_posts_columns', $columns);
}

Expand All @@ -196,7 +196,7 @@ function mbds_render_post_columns($column_name, $id) {
echo '<br>';
// grab installment name
$post_name = mbds_get_story_post_name( $storyID, 'single' );
echo sprintf(_x('%s %d of %d', '[POSTS TITLE] [NUMBER] of [TOTAL NUMBER]', 'mbd-blog-post-series'), $post_name, $orderID+1, count($mbds_story['_mbds_posts']));
echo sprintf(_x('%s %d of %d', '[POSTS TITLE] [NUMBER] of [TOTAL NUMBER]', 'mooberry-story'), $post_name, $orderID+1, count($mbds_story['_mbds_posts']));
}
}
break;
Expand Down
8 changes: 4 additions & 4 deletions shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ function mbds_shortcode_next($attr, $content) {
$attr = shortcode_atts(array('summary' => 'no',
'story' => ''), $attr);

return apply_filters('mbds_next_shortcode', mbds_next_prev('next', __('Next', 'mbd-blog-post-series'), $attr['story'], $attr['summary']));
return apply_filters('mbds_next_shortcode', mbds_next_prev('next', __('Next', 'mooberry-story'), $attr['story'], $attr['summary']));
}

function mbds_shortcode_prev($attr, $content) {
$attr = shortcode_atts(array('summary' => 'no',
'story' => ''), $attr);

return apply_filters('mbds_prev_shortcode', mbds_next_prev('prev', __('Previous', 'mbd-blog-post-series'), $attr['story'], $attr['summary']));
return apply_filters('mbds_prev_shortcode', mbds_next_prev('prev', __('Previous', 'mooberry-story'), $attr['story'], $attr['summary']));
}

function mbds_shortcode_summary($attr, $content) {
Expand Down Expand Up @@ -121,7 +121,7 @@ function mbds_shortcode_toc( $attr, $content ) {
$attr = shortcode_atts(array('story' => ''), $attr);
$storyID = mbds_get_storyID($attr['story']);
$mbds_story = mbds_get_story($storyID);
$html_output = '<div class="mbs_toc"><h2 class="mbs_toc_title">' . __('Table of Contents', 'mbd-blog-post-series') . '</h2>';
$html_output = '<div class="mbs_toc"><h2 class="mbs_toc_title">' . __('Table of Contents', 'mooberry-story') . '</h2>';
$html_output .= '<ul class="mbs_toc_list">';
$posts = mbds_get_posts_list( $storyID );
foreach ($posts as $each_post) {
Expand All @@ -139,6 +139,6 @@ function mbds_shortcode_toc( $attr, $content ) {
function mbds_shortcode_toc_link( $attr, $content) {
$attr = shortcode_atts(array('story' => ''), $attr);
$storyID = mbds_get_storyID($attr['story']);
$html_output = '<a class="mbs_toc_link" href="' . get_permalink($storyID) . '">' . __('Table of Contents', 'mbd-blog-post-series') . '</a>';
$html_output = '<a class="mbs_toc_link" href="' . get_permalink($storyID) . '">' . __('Table of Contents', 'mooberry-story') . '</a>';
return apply_filters('mbds_toc_link_shortcode', $html_output);
}
Loading

0 comments on commit 0e02fd1

Please sign in to comment.