Making WordPress.org


Ignore:
Timestamp:
03/21/2023 11:12:19 AM (16 months ago)
Author:
spiraltee
Message:

Translate: Fix multiple statuses for same translation

File:
1 edited

Legend:

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

    r12432 r12485  
    250250                }
    251251
    252                 $_existing_translation->set_status( $translation->status );
     252                if ( 'current' == $translation->status ) {
     253                    $_existing_translation->set_as_current();
     254
     255                } elseif ( 'changesrequested' == $translation->status() ) {
     256                    $_existing_translation->set_as_changesrequested();
     257
     258                } else {
     259                    $_existing_translation->set_status( $translation->status );
     260                }
     261
    253262                gp_clean_translation_set_cache( $new_translation_set->id );
    254263
Note: See TracChangeset for help on using the changeset viewer.