Changeset 12400
- Timestamp:
- 02/17/2023 02:40:05 PM (20 months ago)
- 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
r11771 r12400 136 136 global $wpdb; 137 137 138 // Only propagate current translations without warnings. 139 if ( 'current' !== $translation->status || ! empty( $translation->warnings ) ) { 138 $allowed_statuses = array( "current", "rejected", "changesrequested", "fuzzy" ); 139 140 // Do not propagate waiting translations and other translations with warnings. 141 if ( ! in_array( $translation->status, $allowed_statuses ) || ! empty( $translation->warnings ) ) { 140 142 return; 141 143 } … … 259 261 $copy->original_id = $new_original->id; 260 262 $copy->translation_set_id = $new_translation_set->id; 261 $copy->status = 'current';263 $copy->status = $translation->status; 262 264 263 265 $translation = GP::$translation->create( $copy ); … … 266 268 } 267 269 268 $translation->set_as_current(); 270 do_action( 'wporg_translate_translation_synced', $copy, $translation ); 271 272 $translation->set_status($copy->status); 269 273 gp_clean_translation_set_cache( $new_translation_set->id ); 270 274
Note: See TracChangeset
for help on using the changeset viewer.