Skip to content

Commit

Permalink
Changed the text domain to all the strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu authored and Radu committed May 20, 2017
1 parent 86bba8b commit 06478bf
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 42 deletions.
6 changes: 3 additions & 3 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@

<section class="error-404 not-found">
<header class="entry-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'begonia' ); ?></h1>
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'begonia-lite' ); ?></h1>
</header><!-- .page-header -->

<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'begonia' ); ?></p>
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'begonia-lite' ); ?></p>

<?php
get_search_form();

the_widget( 'WP_Widget_Recent_Posts' );

/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'begonia' ), convert_smilies( ':)' ) ) . '</p>';
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'begonia-lite' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );

the_widget( 'WP_Widget_Tag_Cloud' );
Expand Down
8 changes: 4 additions & 4 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
Theme Name: Begonia
Theme URI: https://demos.pixelgrade.com/begonia/
Theme Name: Begonia Lite
Theme URI: https://demos.pixelgrade.com/begonia-lite/
Author: PixelGrade
Author URI: https://pixelgrade.com
Description: Some lovely description of your theme here.
Version: 0.0.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: begonia
Text Domain: begonia lite
Domain Path: /languages/
Tags: grid-layout, blog, photography
This theme, like WordPress, is licensed under the GPL.
Expand Down
16 changes: 8 additions & 8 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<h2 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'begonia' ) ),
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'begonia-lite' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
Expand All @@ -37,11 +37,11 @@

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'begonia' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'begonia-lite' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'begonia' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'begonia' ) ); ?></div>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'begonia-lite' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'begonia-lite' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
Expand All @@ -58,11 +58,11 @@

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'begonia' ); ?></h2>
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'begonia-lite' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'begonia' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'begonia' ) ); ?></div>
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'begonia-lite' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'begonia-lite' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
Expand All @@ -75,7 +75,7 @@
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>

<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'begonia' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'begonia-lite' ); ?></p>
<?php
endif;

Expand Down
10 changes: 5 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function begonia_setup() {
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
*/
load_theme_textdomain( 'begonia', get_template_directory() . '/languages' );
load_theme_textdomain( 'begonia-lite', get_template_directory() . '/languages' );

// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
Expand All @@ -45,8 +45,8 @@ function begonia_setup() {

// This theme uses wp_nav_menu() in three locations.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'begonia' ),
'social' => __( 'Social Menu', 'begonia' ),
'primary' => __( 'Primary Menu', 'begonia-lite' ),
'social' => __( 'Social Menu', 'begonia-lite' ),
) );

/*
Expand Down Expand Up @@ -84,9 +84,9 @@ function begonia_content_width() {
*/
function begonia_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Footer Sidebar', 'begonia' ),
'name' => esc_html__( 'Footer Sidebar', 'begonia-lite' ),
'id' => 'footer-sidebar',
'description' => esc_html__( 'Add widgets here.', 'begonia' ),
'description' => esc_html__( 'Add widgets here.', 'begonia-lite' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<body <?php body_class(); ?>>
<?php get_template_part( 'template-parts/toolbar' ); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'begonia' ); ?></a>
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'begonia-lite' ); ?></a>

<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
Expand Down
12 changes: 6 additions & 6 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function begonia_posted_on() { ?>
$output = '';
if ( $categories ) {
foreach ( $categories as $category ) {
$output .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s", 'begonia' ), $category->name ) ) . '">' . $category->cat_name . '</a>' . $separator;
$output .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s", 'begonia-lite' ), $category->name ) ) . '">' . $category->cat_name . '</a>' . $separator;
}
echo trim( $output, $separator );
} ?>
Expand All @@ -40,7 +40,7 @@ function begonia_posted_on() { ?>
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
_x( '%s', 'post date', 'begonia' ),
_x( '%s', 'post date', 'begonia-lite' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
echo '<span class="posted-on">' . $posted_on . '</span>';
Expand All @@ -55,23 +55,23 @@ function begonia_entry_footer() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html__( ' ', 'begonia' ) );
$tags_list = get_the_tag_list( '', esc_html__( ' ', 'begonia-lite' ) );
if ( $tags_list ) {
printf( '<span class="tags-links">' . esc_html__( 'Tags: %1$s', 'begonia' ) . '</span>', $tags_list ); // WPCS: XSS OK.
printf( '<span class="tags-links">' . esc_html__( 'Tags: %1$s', 'begonia-lite' ) . '</span>', $tags_list ); // WPCS: XSS OK.
}
}

if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
/* translators: %s: post title */
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'begonia' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'begonia-lite' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
echo '</span>';
}

edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'begonia' ),
esc_html__( 'Edit %s', 'begonia-lite' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
Expand Down
6 changes: 3 additions & 3 deletions template-parts/content-hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@
// Check the content for the more text
$has_more = strpos( $post->post_content, '<!--more' );
if ( $has_more ) {
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'begonia' ) );
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'begonia-lite' ) );
} else {
the_excerpt(); ?>
<div class="c-hero_read_more">
<a href="<?php the_permalink(); ?>"><?php _e( 'Read More', 'begonia' ); ?> <div class="read-more--arrow"></div></a>
<a href="<?php the_permalink(); ?>"><?php _e( 'Read More', 'begonia-lite' ); ?> <div class="read-more--arrow"></div></a>
</div>
<?php
}
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'begonia' ),
'before' => '<div class="page-links">' . __( 'Pages:', 'begonia-lite' ),
'after' => '</div>',
) ); ?>
</div><!-- .entry-content -->
Expand Down
6 changes: 3 additions & 3 deletions template-parts/content-no_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@
// Check the content for the more text
$has_more = strpos( $post->post_content, '<!--more' );
if ( $has_more ) {
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'begonia' ) );
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'begonia-lite' ) );
} else {
the_excerpt(); ?>
<div class="hero_read_more">
<a href="<?php the_permalink(); ?>"><?php _e( 'Read More', 'begonia' ); ?><div class="read-more--arrow"></div></a>
<a href="<?php the_permalink(); ?>"><?php _e( 'Read More', 'begonia-lite' ); ?><div class="read-more--arrow"></div></a>
</div>
<?php
}
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'begonia' ),
'before' => '<div class="page-links">' . __( 'Pages:', 'begonia-lite' ),
'after' => '</div>',
) ); ?>
</div><!-- .entry-content -->
Expand Down
8 changes: 4 additions & 4 deletions template-parts/content-none.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@

<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'begonia' ); ?></h1>
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'begonia-lite' ); ?></h1>
</header><!-- .page-header -->

<div class="page-content">
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>

<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'begonia' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'begonia-lite' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>

<?php elseif ( is_search() ) : ?>

<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'begonia' ); ?></p>
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'begonia-lite' ); ?></p>
<?php
get_search_form();

else : ?>

<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'begonia' ); ?></p>
<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'begonia-lite' ); ?></p>
<?php
get_search_form();

Expand Down
4 changes: 2 additions & 2 deletions template-parts/content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
the_content();

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'begonia' ),
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'begonia-lite' ),
'after' => '</div>',
) );
?>
Expand All @@ -31,7 +31,7 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'begonia' ),
esc_html__( 'Edit %s', 'begonia-lite' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
Expand Down
4 changes: 2 additions & 2 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'begonia' ), array( 'span' => array( 'class' => array() ) ) ),
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'begonia-lite' ), array( 'span' => array( 'class' => array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'begonia' ),
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'begonia-lite' ),
'after' => '</div>',
) );
?>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package Begonia
*/ ?>
<nav id="social-navigation" class="toolbar-navigation" role="navigation">
<h5 class="screen-reader-text"><?php _e( 'Main navigation', 'begonia' ); ?></h5>
<h5 class="screen-reader-text"><?php _e( 'Main navigation', 'begonia-lite' ); ?></h5>
<?php
wp_nav_menu(
array(
Expand Down

0 comments on commit 06478bf

Please sign in to comment.