Making WordPress.org


Ignore:
Timestamp:
03/19/2024 06:34:18 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Update the archive titles to remove the "Browse:" prefix from the section archives.

This will help sync the translations of the sections from the homepage to the archive views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-i18n.php

    r8613 r13354  
    2323            $term->name = esc_html( translate_with_gettext_context( html_entity_decode( $term->name ), 'Plugin Category Name', 'wporg-plugins' ) );
    2424        } elseif ( 'plugin_section' == $term->taxonomy ) {
     25            $original   = $term->name;
    2526            $term->name = esc_html( translate_with_gettext_context( html_entity_decode( $term->name ), 'Plugin Section Name', 'wporg-plugins' ) );
     27
     28            // Some strings already exist without the context, try those.
     29            if ( $term->name === $original ) {
     30                $term->name = esc_html( translate( html_entity_decode( $term->name ), 'wporg-plugins' ) );
     31            }
     32
    2633            if ( $term->description ) {
    2734                $term->description = esc_html( translate_with_gettext_context( html_entity_decode( $term->description ), 'Plugin Section Description', 'wporg-plugins' ) );
     
    7380        // Section terms.
    7481        _x( 'Adopt Me', 'Plugin Section Name', 'wporg-plugins' );
    75         _x( 'Beta', 'Plugin Section Name', 'wporg-plugins' );
    76         _x( 'Blocks', 'Plugin Section Name', 'wporg-plugins' );
     82        _x( 'Beta Plugins', 'Plugin Section Name', 'wporg-plugins' );
     83        _x( 'Block-Enabled Plugins', 'Plugin Section Name', 'wporg-plugins' );
    7784        _x( 'My Favorites', 'Plugin Section Name', 'wporg-plugins' );
    78         _x( 'Featured', 'Plugin Section Name', 'wporg-plugins' );
    79         _x( 'Popular', 'Plugin Section Name', 'wporg-plugins' );
    80         _x( 'Blocks', 'Plugin Section Name', 'wporg-plugins' );
     85        _x( 'Featured Plugins', 'Plugin Section Name', 'wporg-plugins' );
     86        _x( 'Popular Plugins', 'Plugin Section Name', 'wporg-plugins' );
     87        /* translators: Block plugins are single-block plugins, not block-enabled plugins. */
     88        _x( 'Block Plugins', 'Plugin Section Name', 'wporg-plugins' );
     89        _x( 'New Plugins', 'Plugin Section Name', 'wporg-plugins' );
     90        _x( 'Updated Plugins', 'Plugin Section Name', 'wporg-plugins' );
    8191
    8292        // Section descriptions.
    8393        _x( 'Plugins that have been offered for adoption by others.', 'Plugin Section Description', 'wporg-plugins' );
    8494        _x( 'Beta plugins are in development for possible inclusion in a future version of WordPress.', 'Plugin Section Description', 'wporg-plugins' );
    85         _x( 'Plugins that offer blocks.', 'Plugin Section Description', 'wporg-plugins' );
    86         _x( 'Plugins contained within this category get displayed on the Featured tab.', 'Plugin Section Description', 'wporg-plugins' );
    8795        _x( 'The below plugins have been marked as favorites.', 'Plugin Section Description', 'wporg-plugins' );
    8896        _x( 'Plugins that offer blocks for the block-based editor.', 'Plugin Section Description', 'wporg-plugins' );
     97        _x( 'Block Plugins as used in the Block Directory.', 'Plugin Section Description', 'wporg-plugins' );
    8998    }
    9099}
Note: See TracChangeset for help on using the changeset viewer.