mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI. Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov. Fixes #29748. git-svn-id: https://develop.svn.wordpress.org/trunk@55276 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -114,7 +114,10 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
||||
* @return string
|
||||
*/
|
||||
public function addedLine( $line ) {
|
||||
return "<td class='diff-addedline'><span aria-hidden='true' class='dashicons dashicons-plus'></span><span class='screen-reader-text'>" . __( 'Added:' ) . " </span>{$line}</td>";
|
||||
return "<td class='diff-addedline'><span aria-hidden='true' class='dashicons dashicons-plus'></span><span class='screen-reader-text'>" .
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Added:' ) .
|
||||
" </span>{$line}</td>";
|
||||
|
||||
}
|
||||
|
||||
@@ -125,7 +128,10 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
||||
* @return string
|
||||
*/
|
||||
public function deletedLine( $line ) {
|
||||
return "<td class='diff-deletedline'><span aria-hidden='true' class='dashicons dashicons-minus'></span><span class='screen-reader-text'>" . __( 'Deleted:' ) . " </span>{$line}</td>";
|
||||
return "<td class='diff-deletedline'><span aria-hidden='true' class='dashicons dashicons-minus'></span><span class='screen-reader-text'>" .
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Deleted:' ) .
|
||||
" </span>{$line}</td>";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +141,10 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
||||
* @return string
|
||||
*/
|
||||
public function contextLine( $line ) {
|
||||
return "<td class='diff-context'><span class='screen-reader-text'>" . __( 'Unchanged:' ) . " </span>{$line}</td>";
|
||||
return "<td class='diff-context'><span class='screen-reader-text'>" .
|
||||
/* translators: Hidden accessibility text. */
|
||||
__( 'Unchanged:' ) .
|
||||
" </span>{$line}</td>";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user