WordPress.org

Making WordPress.org


Ignore:
Timestamp:
12/05/2019 06:37:42 AM (4 months ago)
Author:
dd32
Message:

Translate: Localise links to Plugin/Theme pages within the project description when viewing on a locale-specific page.

Fixes #2768.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php

    r8558 r9312  
    1212
    1313<div class="project-header">
    14     <p class="project-description"><?php echo $sub_project->description; ?></p>
     14    <p class="project-description"><?php
     15        $description = apply_filters( 'project_description', $sub_project->description, $sub_project );
     16
     17        // Localize the links to the currently viewed locale.
     18        $description = WordPressdotorg\GlotPress\Customizations\Plugin::get_instance()->localize_links( $description, $locale->wp_locale );
     19
     20        echo $description;
     21    ?></p>
    1522
    1623    <div class="project-box percent-<?php echo $project_status->percent_complete; ?>">
     
    3340                            <?php
    3441                            foreach ( $variants as $variant ) {
    35                                 $selected =
    3642                                printf(
    3743                                    '<option name="%s" data-project-url="%s"%s>%s</option>',
Note: See TracChangeset for help on using the changeset viewer.