Making WordPress.org


Ignore:
Timestamp:
07/28/2021 08:09:44 AM (3 years ago)
Author:
dd32
Message:

Translate: When importing translations from a plugin, set the status to waiting as they may require review.

This only happens when the GlotPress project is created for the first time in response to a plugin import.
See https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/i18n/class-code-import.php?rev=11155&marks=74-77#L70

See https://wordpress.slack.com/archives/C02RP50LK/p1627457591198600
Props ocean90.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-plugin-directory/inc/cli/class-import-plugin-translations.php

    r2946 r11155  
    6666
    6767        add_filter( 'translation_set_import_over_existing', '__return_false' );
    68         //add_filter( 'translation_set_import_status', array( $this, '__string_status_waiting' ) );
     68        add_filter( 'translation_set_import_status', array( $this, '__string_status_waiting' ) );
    6969
    7070        // Do the import.
    7171        $imported = $translation_set->import( $translations );
    7272
    73         //remove_filter( 'translation_set_import_status', '__string_status_waiting' );
     73        remove_filter( 'translation_set_import_status', '__string_status_waiting' );
    7474        remove_filter( 'translation_set_import_over_existing', '__return_false' );
    7575
Note: See TracChangeset for help on using the changeset viewer.