Making WordPress.org

Changeset 14266


Ignore:
Timestamp:
12/11/2024 12:08:08 PM (2 months ago)
Author:
amieiro
Message:

Transate: Add the locale variant in the bulk pre-translation feature

See https://meta.trac.wordpress.org/ticket/7841

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-bulk-pretranslations/inc/class-translation-memory.php

    r14207 r14266  
    4444            return false;
    4545        }
    46         $suggestions = Translation_Memory_Client::query( $this->original->singular, $locale->slug );
     46        $target_locale = $locale->slug;
     47        if ( 'default' !== $translation_set->slug ) {
     48            $target_locale .= '_' . $translation_set->slug;
     49        }
     50        $suggestions = Translation_Memory_Client::query( $this->original->singular, $target_locale );   
    4751        if ( empty( $suggestions ) ) {
    4852            return false;
Note: See TracChangeset for help on using the changeset viewer.