added: date formats in search and author are now customizable

+ fixed translator comments
This commit is contained in:
Kniebremser
2019-07-10 02:40:25 +02:00
parent ecb51f8101
commit aff96ca431
10 changed files with 245 additions and 252 deletions

View File

@@ -76,7 +76,7 @@ if ( have_posts() ) {
<?php
printf(
/* translators: Number of found comic */
/* translators: %d: Number of found comic */
esc_html( _n( '%d comic', '%d comics', $count, 'comicpress' ) ),
esc_html( $count )
);
@@ -92,7 +92,7 @@ if ( have_posts() ) {
<?php
printf(
/* translators: Number of found results */
/* translators: %d: Number of found results */
esc_html( _n( '%d result', '%d results', $count, 'comicpress' ) ),
esc_html( $count )
);
@@ -208,7 +208,7 @@ if ( have_posts() ) {
<?php
printf(
/* translators: Number of found results */
/* translators: %d: Number of found results */
esc_html( _n( '%d result', '%d results', $count, 'comicpress' ) ),
esc_html( $count )
);

View File

@@ -214,7 +214,7 @@ if ( get_query_var( 'author_name' ) ) {
<tr>
<td class="author-archive-date" align="right">
<?php the_time( 'M j, Y' ); ?>
<?php the_time( _x( 'M j, Y', 'author page table date format', 'comicpress' ) ); ?>
</td>
<td class="author-archive-title">
<a href="<?php the_permalink(); ?>">

View File

@@ -139,7 +139,7 @@ function comicpress_comments_callback( $comment, $args, $depth ) {
<?php
printf(
/* translators: 1: Date 2: Time in comments */
/* translators: %1$s: Date %2$s: Time in comments */
__( '%1$s, %2$s', 'comicpress' ),
get_comment_date(),
get_comment_time()

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -336,7 +336,7 @@ function comicpress_admin_options() {
<?php
printf(
/* translators: 1: Link to website 2: Additional link attribute 3: Theme versions number*/
/* translators: %1$1s: Link to website %2$2s: Additional link attribute %3$3s: Theme versions number*/
__( '<a href="%1$1s" %2$2s>ComicPress</a> %3$3s', 'comicpress' ),
esc_url( 'http://frumph.net/' ),
'target="_blank" rel="noopener noreferrer"',
@@ -350,7 +350,7 @@ function comicpress_admin_options() {
<?php
printf(
/* translators: 1: Link to website 2: Additional link attribute */
/* translators: %1$1s: Link to website %2$2s: Additional link attribute */
__( 'Developed and maintained by <a href="%1$1s" %2$2s>Philip M. Hofer alias <small>(Frumph)</small></a>.', 'comicpress' ),
esc_url( 'http://frumph.net/' ),
'target="_blank" rel="noopener noreferrer"'
@@ -358,7 +358,7 @@ function comicpress_admin_options() {
?>
<?php
printf(
/* translators: 1: Link to website 2: Additional link attribute */
/* translators: %1$1s: Link to website %2$2s: Additional link attribute */
__( 'Originally created by<a href="%1$1s" %2$2s> Tyler Martin</a>.', 'comicpress' ),
esc_url( 'http://mindfaucet.com/' ),
'target="_blank" rel="noopener noreferrer"'

View File

@@ -52,7 +52,7 @@
<td>
<?php
printf(
/* translators: 1: Link to website 2: Additional link attribute */
/* translators: %1$1s: Link to website %2$2s: Additional link attribute */
__( 'Enabling this option will show a gravatar of the post author based on the author email address. Gravatars are associated by your email address and you can create them at <a href="%1$1s" %2$2s>Gravatar.com</a>.', 'comicpress' ),
esc_url( 'https://gravatar.com/' ),
'target="_blank" rel="noopener noreferrer"'

View File

@@ -53,7 +53,8 @@ PHP: 5.4
== Changelog ==
= 4.X =
* changed: Symbols for search button (&raquo;) and image area (&lsaquo; and &rsaquo; are now customizable via language file
* added: Date format in search.php "display_archive_as_links" and author.phpp "author-archive-date" are now customizable via language file
* added: Symbols for search button (&raquo;) and image area (&lsaquo; and &rsaquo; are now customizable via language file
* removed Google+ Service was discontinued
* under the hood: Code optimizations according to WPCS

View File

@@ -30,7 +30,7 @@ if ( have_posts() ) :
<?php
printf(
/* translators: Number of found results */
/* translators: %d: Number of found results */
esc_html( _n( '%d result', '%d results', $count, 'comicpress' ) ),
esc_html( $count )
);
@@ -59,7 +59,7 @@ if ( have_posts() ) :
<tr>
<td class="archive-date">
<?php the_time( 'M d, Y' ); ?>
<?php the_time( _x( 'M d, Y', 'search page table date format', 'comicpress' ) ); ?>
</td>
<td class="archive-title">
<a href="<?php echo esc_html( get_permalink( $post->ID ) ); ?>" rel="bookmark" title="<?php esc_html_e( 'Permanent Link:', 'comicpress' ); ?> <?php the_title(); ?>">

View File

@@ -95,7 +95,7 @@ function comicpress_get_calendar( $initial = true, $echo = true, $taxonomy = 'po
ORDER BY post_date ASC
LIMIT 1");
/* translators: Calendar caption: 1: Month name, 2: 4-digit year */
/* translators: Calendar caption: %1$s: Month name, %2$s: 4-digit year */
$calendar_caption = _x( '%1$s %2$s', 'calendar caption', 'comicpress' );
$calendar_output = '<table id="wp-calendar" summary="' . esc_attr__( 'Calendar', 'comicpress' ) . '">
<caption>' . sprintf( $calendar_caption, $wp_locale->get_month( $thismonth ), date( 'Y', $unixmonth ) ) . '</caption>