From b44446c4486ab97e08f46b23587c503163f23df9 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Wed, 11 Jun 2025 13:18:49 -0700 Subject: [PATCH] Add translator comments (#77) Signed-off-by: Andy Fragen --- inc/avatars/namespace.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/avatars/namespace.php b/inc/avatars/namespace.php index 619a3c6..72753dd 100644 --- a/inc/avatars/namespace.php +++ b/inc/avatars/namespace.php @@ -219,7 +219,7 @@ function get_avatar_url( $id_or_email, $args ) { $switched = false; if ( is_multisite() ) { $switched = true; - $user_site = get_user_meta( $user->ID, 'fair_avatar_site_id', true ); + $user_site = get_user_meta( $user->ID, 'fair_avatar_site_id', true ); switch_to_blog( $user_site ); } $avatar_url = wp_get_attachment_image_url( $avatar_id, [ $size, $size ] ); @@ -240,6 +240,7 @@ function get_avatar_url( $id_or_email, $args ) { function get_avatar_alt( $id_or_email ) { // Comments use the author name, rather than the user's display name. if ( $id_or_email instanceof \WP_Comment ) { + /* translators: %s: Name of person in profile picture */ return sprintf( __( 'profile picture for %s', 'fair' ), $id_or_email->comment_author ); } @@ -255,6 +256,7 @@ function get_avatar_alt( $id_or_email ) { return _x( 'profile picture for user', 'alt for unknown avatar user', 'fair' ); } + /* translators: %s: Name of person in profile picture */ return sprintf( __( 'profile picture for %s', 'fair' ), $user->display_name ); }