-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Translatability fixes #1858
Translatability fixes #1858
Conversation
- provide `translators: ` notes - make date formates translatable for archive title - replace the deprecated urlencode with rawurlencode - date archives don't return an object for `get_queried_object()`, so in that case we shouldn't be trying to get the term meta post - better formatting for the date archive dropdown picker - replace an endwhile with {} - remove translation of post_type_archive_title() as translation for that function's output is handled during post type registration. - improved escaping of output - punctuate inline comments
- add a translators: note to an error condition in co-authors - make the output generator for coauthors links more readable via sprintf
…gets/largo-twitter.php
Yea. I think we can ignore this one because it thinks |
@benlk I went hunting and commented out all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work as expected. 👍
With the following comments, the warning goes away: diff --git a/inc/post-social.php b/inc/post-social.php
index aad372cd..47c81099 100644
--- a/inc/post-social.php
+++ b/inc/post-social.php
@@ -34,11 +34,13 @@ if ( ! function_exists( 'largo_post_social_links' ) ) {
if ( isset( $utilities['facebook'] ) && '1' === $utilities['facebook'] ) {
$fb_share = '<span class="facebook"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=%1$s"><i class="icon-facebook"></i><span class="hidden-phone">%2$s</span></a></span>';
+ /*
$output .= sprintf(
$fb_share,
rawurlencode( get_permalink() ),
__( ucfirst( of_get_option( 'fb_verb' ) ), 'largo' )
);
+ */
}
if ( isset( $utilities['twitter'] ) && '1' === $utilities['twitter'] ) {
diff --git a/inc/widgets/largo-twitter.php b/inc/widgets/largo-twitter.php
index fa41913f..129c815c 100644
--- a/inc/widgets/largo-twitter.php
+++ b/inc/widgets/largo-twitter.php
@@ -31,7 +31,7 @@ class largo_twitter_widget extends WP_Widget {
$widget_href = 'https://twitter.com/' . $instance['twitter_username'] . '/likes';
$widget_text = sprintf(
// translators: @username's Likes on Twitter.
- __( "@%1$s's Likes on Twitter", 'largo' ),
+ // __( "@%1$s's Likes on Twitter", 'largo' ),
esc_html( $instance['twitter_username'] )
);
break;
@@ -39,7 +39,7 @@ class largo_twitter_widget extends WP_Widget {
$widget_href = 'https://twitter.com/' . $instance['twitter_username'] . '/lists/' . $instance['twitter_list_slug'];
$widget_text = sprintf(
/* translators: A Twitter List by [twitter user name] */
- __( 'A Twitter List by %1$s', 'largo' ),
+ // __( 'A Twitter List by %1$s', 'largo' ),
$instance['twitter_username']
);
break;
@@ -52,7 +52,7 @@ class largo_twitter_widget extends WP_Widget {
/* translators: Tweets by @username */
$widget_text = sprintf(
// translators: %1$s is the twitter username
- __( 'Tweets by @%1$s', 'largo' ),
+ // __( 'Tweets by @%1$s', 'largo' ),
esc_html( $instance['twitter_username'] )
);
} It's tripping over:
|
…ne argument, because it was confusing the Theme Check plugin.
With those two latest commits, it now completes without those two error messages. |
Changes
This pull request makes the following changes:
largo
translators:
notes for strings translated for use withsprintf
/printf
, based on the output ofgrunt pot
This PR does not include:
<php echo esc_html__( 'My name is', 'largo' ); . ' ' . $name ?>
Why
For #1592 and INN/umbrella-caribbean#96
Testing/Questions
Features that this PR affects:
Questions that need to be answered before merging:
Steps to test this PR:
grunt pot
. Expect no error messages.I can't find this one. Good luck if you're going hunting.
The theme check plugin appears to think
lib_e
is a translation function. It's not; these results are a false positive.That's the right format for passing a variable to sprintf, right?