diff --git a/asset/js/script.js b/asset/js/script.js index 7c5521d..e173f7c 100644 --- a/asset/js/script.js +++ b/asset/js/script.js @@ -1,5 +1,5 @@ // functions -var determine_media_to_migrate; +var determine_media_to_sync; var remote_media_files_unavailable = false; var remote_connection_data; var connection_info; @@ -19,7 +19,7 @@ var media_successfully_determined; $(document).ready(function() { - if (migration_type() == 'savefile') { + if (syncing_type() == 'savefile') { $('.media-files-options').hide(); } @@ -32,7 +32,7 @@ var media_successfully_determined; }; var hide_show_options = function(unavailable) { - var mig_type = migration_type(); + var mig_type = syncing_type(); if ('savefile' == mig_type) { $('.media-files-options').hide(); @@ -44,7 +44,7 @@ var media_successfully_determined; if (unavailable) { $('.media-files-options ul').hide(); - $('.media-migration-unavailable').show(); + $('.media-syncing-unavailable').show(); disable_media_files_option(); return; } @@ -60,7 +60,7 @@ var media_successfully_determined; } $('.media-files-options ul').show(); - $('.media-migration-unavailable').hide(); + $('.media-syncing-unavailable').hide(); $('.media-files-different-plugin-version-notice').hide(); $('#media-files').removeAttr('disabled'); $('.media-files').removeClass('disabled'); @@ -71,7 +71,7 @@ var media_successfully_determined; hide_show_options(remote_media_files_unavailable); $('.remove-scope-1').html('remote'); $('.remove-scope-2').html('local'); - if (migration_type() == 'pull') { + if (syncing_type() == 'pull') { $('.remove-scope-1').html('local'); $('.remove-scope-2').html('remote'); } @@ -85,15 +85,15 @@ var media_successfully_determined; hide_show_options(remote_media_files_unavailable); }); - $.wpsdb.add_filter('wpsdb_before_migration_complete_hooks', function( + $.wpsdb.add_filter('wpsdb_before_syncing_complete_hooks', function( hooks) { - if (false == is_media_migration() || 'savefile' == migration_type()) + if (false == is_media_syncing() || 'savefile' == syncing_type()) return hooks; - hooks.push('determine_media_to_migrate'); + hooks.push('determine_media_to_sync'); return hooks; }); - determine_media_to_migrate = function() { + determine_media_to_sync = function() { connection_info = $.trim($('.pull-push-connection-info').val()).split( "\n"); $('.progress-text').html(wpsdbmf_strings.determining); @@ -110,35 +110,35 @@ var media_successfully_determined; dataType: 'text', cache: false, data: { - action: 'wpsdbmf_determine_media_to_migrate', + action: 'wpsdbmf_determine_media_to_sync', remove_local_media: remove_local_media, - intent: migration_type(), + intent: syncing_type(), url: connection_info[0], key: connection_info[1], temp_prefix: connection_data.temp_prefix, - nonce: wpsdb_nonces.determine_media_to_migrate, + nonce: wpsdb_nonces.determine_media_to_sync, }, error: function(jqXHR, textStatus, errorThrown) { - $('.progress-title').html(wpsdbmf_strings.migration_failed); + $('.progress-title').html(wpsdbmf_strings.syncing_failed); $('.progress-text').html(wpsdbmf_strings.error_determining + ' (#101mf)'); - $('.progress-text').addClass('migration-error'); + $('.progress-text').addClass('syncing-error'); console.log(jqXHR); console.log(textStatus); console.log(errorThrown); - migration_error = true; - migration_complete_events(); + syncing_error = true; + syncing_complete_events(); return; }, success: function(data) { original_data = data; data = JSON.parse(data.trim()); if (false == data) { - migration_failed(original_data); + syncing_failed(original_data); return; } - next_step_in_migration = { + next_step_in_syncing = { fn: media_successfully_determined, args: [data] }; @@ -149,18 +149,18 @@ var media_successfully_determined; } - function migration_failed(data) { - $('.progress-title').html(wpsdbmf_strings.migration_failed); + function syncing_failed(data) { + $('.progress-title').html(wpsdbmf_strings.syncing_failed); $('.progress-text').html(data); - $('.progress-text').addClass('migration-error'); - migration_error = true; - migration_complete_events(); + $('.progress-text').addClass('syncing-error'); + syncing_error = true; + syncing_complete_events(); } media_successfully_determined = function(data) { if (typeof data.wpsdb_error != 'undefined' && data.wpsdb_error == 1) { non_fatal_errors += data.body; - next_step_in_migration = { + next_step_in_syncing = { fn: wpsdb_call_next_hook }; execute_next_step(); @@ -172,11 +172,11 @@ var media_successfully_determined; args.media_progress_image_number = 0; args.media_total_size = data.total_size; args.remote_uploads_url = data.remote_uploads_url; - args.files_to_migrate = data.files_to_migrate; + args.files_to_sync = data.files_to_sync; args.bottleneck = wpsdb_max_request; - if (Object.size(args.files_to_migrate) > 0) { + if (Object.size(args.files_to_sync) > 0) { $('.progress-bar').width('0px'); } @@ -186,45 +186,45 @@ var media_successfully_determined; $('.progress-tables').prepend('
' + wpsdbmf_strings.media_files + - ' (0 / ' + - wpsdb_add_commas(Object.size(args.files_to_migrate)) + + ' (0 / ' + + wpsdb_add_commas(Object.size(args.files_to_sync)) + ')
'); - next_step_in_migration = { - fn: migrate_media_files_recursive, + next_step_in_syncing = { + fn: sync_media_files_recursive, args: [args] }; execute_next_step(); } - function migrate_media_files_recursive(args) { - if (0 == Object.size(args.files_to_migrate)) { + function sync_media_files_recursive(args) { + if (0 == Object.size(args.files_to_sync)) { wpsdb_call_next_hook(); return; } - var file_chunk_to_migrate = []; + var file_chunk_to_sync = []; var file_chunk_size = 0; - var number_of_files_to_migrate = 0; + var number_of_files_to_sync = 0; - $.each(args.files_to_migrate, function(index, value) { - if (!file_chunk_to_migrate.length) { - file_chunk_to_migrate.push(index); + $.each(args.files_to_sync, function(index, value) { + if (!file_chunk_to_sync.length) { + file_chunk_to_sync.push(index); file_chunk_size += value; - delete args.files_to_migrate[index]; + delete args.files_to_sync[index]; ++args.media_progress_image_number; - ++number_of_files_to_migrate; + ++number_of_files_to_sync; } else { if ((file_chunk_size + value) > args.bottleneck || - number_of_files_to_migrate >= remote_connection_data.media_files_max_file_uploads + number_of_files_to_sync >= remote_connection_data.media_files_max_file_uploads ) { return false; } else { - file_chunk_to_migrate.push(index); + file_chunk_to_sync.push(index); file_chunk_size += value; - delete args.files_to_migrate[index]; + delete args.files_to_sync[index]; ++args.media_progress_image_number; - ++number_of_files_to_migrate; + ++number_of_files_to_sync; } } }); @@ -238,31 +238,31 @@ var media_successfully_determined; dataType: 'text', cache: false, data: { - action: 'wpsdbmf_migrate_media', - file_chunk: file_chunk_to_migrate, + action: 'wpsdbmf_sync_media', + file_chunk: file_chunk_to_sync, remote_uploads_url: args.remote_uploads_url, - intent: migration_type(), + intent: syncing_type(), url: connection_info[0], key: connection_info[1], - nonce: wpsdb_nonces.migrate_media, + nonce: wpsdb_nonces.sync_media, }, error: function(jqXHR, textStatus, errorThrown) { - $('.progress-title').html('Migration failed'); - $('.progress-text').html(wpsdbmf_strings.problem_migrating_media + + $('.progress-title').html('Syncing failed'); + $('.progress-text').html(wpsdbmf_strings.problem_syncing_media + ' (#102mf)'); - $('.progress-text').addClass('migration-error'); + $('.progress-text').addClass('syncing-error'); console.log(jqXHR); console.log(textStatus); console.log(errorThrown); - migration_error = true; - migration_complete_events(); + syncing_error = true; + syncing_complete_events(); return; }, success: function(data) { original_data = data; data = JSON.parse(data.trim()); if (false == data) { - migration_failed(original_data); + syncing_failed(original_data); return; } @@ -278,11 +278,11 @@ var media_successfully_determined; overall_percent = Math.floor(percent); $('.progress-text').html(overall_percent + '% - ' + - wpsdbmf_strings.migrating_media_files); - $('.media-migration-current-image').html(wpsdb_add_commas(args.media_progress_image_number)); + wpsdbmf_strings.syncing_media_files); + $('.media-syncing-current-image').html(wpsdb_add_commas(args.media_progress_image_number)); - next_step_in_migration = { - fn: migrate_media_files_recursive, + next_step_in_syncing = { + fn: sync_media_files_recursive, args: [args] }; execute_next_step(); @@ -290,12 +290,12 @@ var media_successfully_determined; }); } - function is_media_migration() { + function is_media_syncing() { return $('#media-files').attr('data-available') == '1' && $( '#media-files').is(':checked') ? true : false; } - function migration_type() { + function syncing_type() { return $('input[name=action]:checked').val(); } }); diff --git a/class/wpsdb-media-files.php b/class/wpsdb-media-files.php index e113671..e2509e3 100644 --- a/class/wpsdb-media-files.php +++ b/class/wpsdb-media-files.php @@ -1,6 +1,6 @@ meets_version_requirements( '1.4b1' ) ) return; - add_action( 'wpsdb_after_advanced_options', array( $this, 'migration_form_controls' ) ); + add_action( 'wpsdb_after_advanced_options', array( $this, 'syncing_form_controls' ) ); add_action( 'wpsdb_load_assets', array( $this, 'load_assets' ) ); add_action( 'wpsdb_js_variables', array( $this, 'js_variables' ) ); add_filter( 'wpsdb_accepted_profile_fields', array( $this, 'accepted_profile_fields' ) ); add_filter( 'wpsdb_establish_remote_connection_data', array( $this, 'establish_remote_connection_data' ) ); add_filter( 'wpsdb_nonces', array( $this, 'add_nonces' ) ); - // compatibility with CLI migraitons - add_filter( 'wpsdb_cli_finalize_migration', array( $this, 'cli_migration' ), 10, 4 ); + // compatibility with CLI syncing + add_filter( 'wpsdb_cli_finalize_syncing', array( $this, 'cli_syncing' ), 10, 4 ); // internal AJAX handlers - add_action( 'wp_ajax_wpsdbmf_determine_media_to_migrate', array( $this, 'ajax_determine_media_to_migrate' ) ); - add_action( 'wp_ajax_wpsdbmf_migrate_media', array( $this, 'ajax_migrate_media' ) ); + add_action( 'wp_ajax_wpsdbmf_determine_media_to_sync', array( $this, 'ajax_determine_media_to_sync' ) ); + add_action( 'wp_ajax_wpsdbmf_sync_media', array( $this, 'ajax_sync_media' ) ); // external AJAX handlers add_action( 'wp_ajax_nopriv_wpsdbmf_get_remote_media_listing', array( $this, 'respond_to_get_remote_media_listing' ) ); @@ -37,7 +37,7 @@ function get_local_attachments() { $temp_prefix = stripslashes( $_POST['temp_prefix'] ); /* - * We determine which media files need migrating BEFORE the database migration is finalized. + * We determine which media files need syncing BEFORE the database syncing is finalized. * Because of this we need to scan the *_post & *_postmeta that are prefixed using the temporary prefix. * Though this should only happen when we're responding to a get_remote_media_listing() call AND it's a push OR * we're scanning local files AND it's a pull. @@ -154,8 +154,8 @@ function get_local_media() { return $local_media; } - function ajax_migrate_media() { - $this->check_ajax_referer( 'migrate-media' ); + function ajax_sync_media() { + $this->check_ajax_referer( 'sync-media' ); $this->set_time_limit(); if ( $_POST['intent'] == 'pull' ) { @@ -228,18 +228,18 @@ function process_pull_request() { } function process_push_request() { - $files_to_migrate = $_POST['file_chunk']; + $files_to_sync = $_POST['file_chunk']; $upload_dir = $this->uploads_dir(); $body = ''; - foreach( $files_to_migrate as $file_to_migrate ) { - $body .= $this->file_to_multipart( $upload_dir . $file_to_migrate ); + foreach( $files_to_sync as $file_to_sync ) { + $body .= $this->file_to_multipart( $upload_dir . $file_to_sync ); } $post_args = array( 'action' => 'wpsdbmf_push_request', - 'files' => serialize( $files_to_migrate ) + 'files' => serialize( $files_to_sync ) ); $post_args['sig'] = $this->create_signature( $post_args, $_POST['key'] ); @@ -309,8 +309,8 @@ function respond_to_push_request() { return $result; } - function ajax_determine_media_to_migrate() { - $this->check_ajax_referer( 'determine-media-to-migrate' ); + function ajax_determine_media_to_sync() { + $this->check_ajax_referer( 'determine-media-to-sync' ); $this->set_time_limit(); $local_attachments = $this->get_local_attachments(); @@ -330,7 +330,7 @@ function ajax_determine_media_to_migrate() { $remote_attachments = $response['remote_attachments']; $remote_media = $response['remote_media']; - $this->files_to_migrate = array(); + $this->files_to_sync = array(); if( $_POST['intent'] == 'pull' ) { $this->media_diff( $local_attachments, $remote_attachments, $local_media, $remote_media ); @@ -339,8 +339,8 @@ function ajax_determine_media_to_migrate() { $this->media_diff( $remote_attachments, $local_attachments, $remote_media, $local_media ); } - $return['files_to_migrate'] = $this->files_to_migrate; - $return['total_size'] = array_sum( $this->files_to_migrate ); + $return['files_to_sync'] = $this->files_to_sync; + $return['total_size'] = array_sum( $this->files_to_sync ); $return['remote_uploads_url'] = $response['remote_uploads_url']; // remove local/remote media if it doesn't exist on the local/remote site @@ -422,26 +422,26 @@ function media_diff( $site_a_attachments, $site_b_attachments, $site_a_media, $s $local_timestamp = strtotime( $site_a_attachments[$local_attachment_key]['date'] ); if( $local_timestamp >= $remote_timestamp ) { if( ! isset( $site_a_media[$attachment['file']] ) ) { - $this->add_files_to_migrate( $attachment, $site_b_media ); + $this->add_files_to_sync( $attachment, $site_b_media ); } else { $this->maybe_add_resized_images( $attachment, $site_b_media, $site_a_media ); } } else { - $this->add_files_to_migrate( $attachment, $site_b_media ); + $this->add_files_to_sync( $attachment, $site_b_media ); } } } - function add_files_to_migrate( $attachment, $remote_media ) { + function add_files_to_sync( $attachment, $remote_media ) { if( isset( $remote_media[$attachment['file']] ) ) { - $this->files_to_migrate[$attachment['file']] = $remote_media[$attachment['file']]; + $this->files_to_sync[$attachment['file']] = $remote_media[$attachment['file']]; } if( empty( $attachment['sizes'] ) || apply_filters( 'wpsdb_exclude_resized_media', false ) ) return; foreach( $attachment['sizes'] as $size ) { if( isset( $remote_media[$size] ) ) { - $this->files_to_migrate[$size] = $remote_media[$size]; + $this->files_to_sync[$size] = $remote_media[$size]; } } } @@ -450,7 +450,7 @@ function maybe_add_resized_images( $attachment, $site_b_media, $site_a_media ) { if( empty( $attachment['sizes'] ) || apply_filters( 'wpsdb_exclude_resized_media', false ) ) return; foreach( $attachment['sizes'] as $size ) { if( isset( $site_b_media[$size] ) && ! isset( $site_a_media[$size] ) ) { - $this->files_to_migrate[$size] = $site_b_media[$size]; + $this->files_to_sync[$size] = $site_b_media[$size]; } } } @@ -484,8 +484,8 @@ function respond_to_get_remote_media_listing() { return $result; } - function migration_form_controls() { - $this->template( 'migrate' ); + function syncing_form_controls() { + $this->template( 'sync' ); } function accepted_profile_fields( $profile_fields ) { @@ -501,12 +501,12 @@ function load_assets() { wp_enqueue_script( 'wp-sync-db-media-files-script', $src, array( 'jquery', 'wp-sync-db-common', 'wp-sync-db-hook', 'wp-sync-db-script' ), $version, true ); wp_localize_script( 'wp-sync-db-media-files-script', 'wpsdbmf_strings', array( - 'determining' => __( "Determining which media files to migrate, please wait...", 'wp-sync-db-media-files' ), - 'error_determining' => __( "Error while attempting to determine which media files to migrate.", 'wp-sync-db-media-files' ), - 'migration_failed' => __( "Migration failed", 'wp-sync-db-media-files' ), - 'problem_migrating_media' => __( "A problem occurred when migrating the media files.", 'wp-sync-db-media-files' ), + 'determining' => __( "Determining which media files to sync, please wait...", 'wp-sync-db-media-files' ), + 'error_determining' => __( "Error while attempting to determine which media files to sync.", 'wp-sync-db-media-files' ), + 'syncing_failed' => __( "Syncing failed", 'wp-sync-db-media-files' ), + 'problem_syncing_media' => __( "A problem occurred when syncing the media files.", 'wp-sync-db-media-files' ), 'media_files' => __( "Media Files", 'wp-sync-db-media-files' ), - 'migrating_media_files' => __( "Migrating media files", 'wp-sync-db-media-files' ), + 'syncing_media_files' => __( "Syncing media files", 'wp-sync-db-media-files' ), ) ); } @@ -608,12 +608,12 @@ function verify_remote_post_response( $response ) { } function add_nonces( $nonces ) { - $nonces['migrate_media'] = wp_create_nonce( 'migrate-media' ); - $nonces['determine_media_to_migrate'] = wp_create_nonce( 'determine-media-to-migrate' ); + $nonces['sync_media'] = wp_create_nonce( 'sync-media' ); + $nonces['determine_media_to_sync'] = wp_create_nonce( 'determine-media-to-sync' ); return $nonces; } - function cli_migration( $outcome, $profile, $verify_connection_response, $initiate_migration_response ) { + function cli_syncing( $outcome, $profile, $verify_connection_response, $initiate_syncing_response ) { global $wpsdb, $wpsdb_cli; if ( true !== $outcome ) return $outcome; if ( !isset( $profile['media_files'] ) || '1' !== $profile['media_files'] ) return $outcome; @@ -623,8 +623,8 @@ function cli_migration( $outcome, $profile, $verify_connection_response, $initia } $this->set_time_limit(); - $wpsdb->set_cli_migration(); - $this->set_cli_migration(); + $wpsdb->set_cli_syncing(); + $this->set_cli_syncing(); $connection_info = explode( "\n", $profile['connection_info'] ); @@ -634,42 +634,42 @@ function cli_migration( $outcome, $profile, $verify_connection_response, $initia $_POST['remove_local_media'] = ( isset( $profile['remove_local_media'] ) ) ? 1 : 0; $_POST['temp_prefix'] = $verify_connection_response['temp_prefix']; - do_action( 'wpsdb_cli_before_determine_media_to_migrate', $profile, $verify_connection_response, $initiate_migration_response ); + do_action( 'wpsdb_cli_before_determine_media_to_sync', $profile, $verify_connection_response, $initiate_syncing_response ); - $response = $this->ajax_determine_media_to_migrate(); - if( is_wp_error( $determine_media_to_migrate_response = $wpsdb_cli->verify_cli_response( $response, 'ajax_determine_media_to_migrate()' ) ) ) return $determine_media_to_migrate_response; + $response = $this->ajax_determine_media_to_sync(); + if( is_wp_error( $determine_media_to_sync_response = $wpsdb_cli->verify_cli_response( $response, 'ajax_determine_media_to_sync()' ) ) ) return $determine_media_to_sync_response; - $remote_uploads_url = $determine_media_to_migrate_response['remote_uploads_url']; - $files_to_migrate = $determine_media_to_migrate_response['files_to_migrate']; + $remote_uploads_url = $determine_media_to_sync_response['remote_uploads_url']; + $files_to_sync = $determine_media_to_sync_response['files_to_sync']; // seems like this value needs to be different depending on pull/push? $bottleneck = $wpsdb->get_bottleneck(); - while ( !empty( $files_to_migrate ) ) { - $file_chunk_to_migrate = array(); + while ( !empty( $files_to_sync ) ) { + $file_chunk_to_sync = array(); $file_chunk_size = 0; - $number_of_files_to_migrate = 0; - foreach ( $files_to_migrate as $file_to_migrate => $file_size ) { - if ( empty( $file_chunk_to_migrate ) ) { - $file_chunk_to_migrate[] = $file_to_migrate; + $number_of_files_to_sync = 0; + foreach ( $files_to_sync as $file_to_sync => $file_size ) { + if ( empty( $file_chunk_to_sync ) ) { + $file_chunk_to_sync[] = $file_to_sync; $file_chunk_size += $file_size; - unset( $files_to_migrate[$file_to_migrate] ); - ++$number_of_files_to_migrate; + unset( $files_to_sync[$file_to_sync] ); + ++$number_of_files_to_sync; } else { - if ( ( $file_chunk_size + $file_size ) > $bottleneck || $number_of_files_to_migrate >= $verify_connection_response['media_files_max_file_uploads'] ) { + if ( ( $file_chunk_size + $file_size ) > $bottleneck || $number_of_files_to_sync >= $verify_connection_response['media_files_max_file_uploads'] ) { break; } else { - $file_chunk_to_migrate[] = $file_to_migrate; + $file_chunk_to_sync[] = $file_to_sync; $file_chunk_size += $file_size; - unset( $files_to_migrate[$file_to_migrate] ); - ++$number_of_files_to_migrate; + unset( $files_to_sync[$file_to_sync] ); + ++$number_of_files_to_sync; } } - $_POST['file_chunk'] = $file_chunk_to_migrate; + $_POST['file_chunk'] = $file_chunk_to_sync; $_POST['remote_uploads_url'] = $remote_uploads_url; - $response = $this->ajax_migrate_media(); - if( is_wp_error( $migrate_media_response = $wpsdb_cli->verify_cli_response( $response, 'ajax_migrate_media()' ) ) ) return $migrate_media_response; + $response = $this->ajax_sync_media(); + if( is_wp_error( $sync_media_response = $wpsdb_cli->verify_cli_response( $response, 'ajax_sync_media()' ) ) ) return $sync_media_response; } } return true; diff --git a/languages/wp-migrate-db-pro-media-files-en.pot b/languages/wp-migrate-db-pro-media-files-en.pot deleted file mode 100644 index f9ed8be..0000000 --- a/languages/wp-migrate-db-pro-media-files-en.pot +++ /dev/null @@ -1,85 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: WP Sync DB Media Files\n" -"POT-Creation-Date: 2014-05-28 13:46+1000\n" -"PO-Revision-Date: 2014-05-28 13:46+1000\n" -"Last-Translator: Delicious Brains \n" -"Language-Team: Delicious Brains \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.6.5\n" -"X-Poedit-Basepath: ..\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" -"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" -"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SearchPath-0: .\n" - -#: class/wpsdb-media-files.php:273 -msgid "$_FILES is empty, the upload appears to have failed" -msgstr "" - -#: class/wpsdb-media-files.php:382 -msgid "Error attempting to unserialize the remote attachment data" -msgstr "" - -#: class/wpsdb-media-files.php:504 -msgid "Determining which media files to migrate, please wait..." -msgstr "" - -#: class/wpsdb-media-files.php:505 -msgid "Error while attempting to determine which media files to migrate." -msgstr "" - -#: class/wpsdb-media-files.php:506 -msgid "Migration failed" -msgstr "" - -#: class/wpsdb-media-files.php:507 -msgid "A problem occurred when migrating the media files." -msgstr "" - -#: class/wpsdb-media-files.php:508 template/migrate.php:6 -msgid "Media Files" -msgstr "" - -#: class/wpsdb-media-files.php:509 -msgid "Migrating media files" -msgstr "" - -#: class/wpsdb-media-files.php:561 -msgid "Invalid URL Provided." -msgstr "" - -#: class/wpsdb-media-files.php:565 -msgid "Could not create Temporary file." -msgstr "" - -#: class/wpsdb-media-files.php:623 -msgid "" -"WP Sync DB Media Files does not seems to be installed/active on the " -"remote website." -msgstr "" - -#: template/migrate.php:15 -msgid "" -"Remove local media files that are not " -"found on the remote site" -msgstr "" - -#: template/migrate.php:23 -msgid "Addon Missing" -msgstr "" - -#: template/migrate.php:23 -msgid "" -"The Media Files addon is inactive on the remote site. " -"Please install and activate it to enable media file migration." -msgstr "" - -#: template/migrate.php:27 -msgid "Version Mismatch" -msgstr "" diff --git a/languages/wp-sync-db-media-files.pot b/languages/wp-sync-db-media-files.pot new file mode 100644 index 0000000..885eac0 --- /dev/null +++ b/languages/wp-sync-db-media-files.pot @@ -0,0 +1,108 @@ +# Loco Gettext template +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: WP Sync DB Media Files\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-09-21 13:55+0000\n" +"POT-Revision-Date: Sat Sep 24 2016 12:18:57 GMT+0200 (W. Europe Standard " +"Time)\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: \n" +"Language: \n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Generator: Loco - https://localise.biz/\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;" +"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;" +"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;" +"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;" +"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2" + +#. Name of the plugin +msgid "WP Sync DB Media Files" +msgstr "" + +#. Description of the plugin +msgid "An extension of WP Sync DB that allows the syncing of media files." +msgstr "" + +#. Author of the plugin +msgid "Sean Lang" +msgstr "" + +#. Author URI of the plugin +msgid "http://slang.cx" +msgstr "" + +#: ../class/wpsdb-media-files.php:273 +msgid "$_FILES is empty, the upload appears to have failed" +msgstr "" + +#: ../class/wpsdb-media-files.php:382 +msgid "Error attempting to unserialize the remote attachment data" +msgstr "" + +#: ../class/wpsdb-media-files.php:504 +msgid "Determining which media files to sync, please wait..." +msgstr "" + +#: ../class/wpsdb-media-files.php:505 +msgid "Error while attempting to determine which media files to sync." +msgstr "" + +#: ../class/wpsdb-media-files.php:506 +msgid "Syncing failed" +msgstr "" + +#: ../class/wpsdb-media-files.php:507 +msgid "A problem occurred when syncing the media files." +msgstr "" + +#: ../class/wpsdb-media-files.php:508 ../template/sync.php:5 +msgid "Media Files" +msgstr "" + +#: ../class/wpsdb-media-files.php:509 +msgid "Syncing media files" +msgstr "" + +#: ../class/wpsdb-media-files.php:561 +msgid "Invalid URL Provided." +msgstr "" + +#: ../class/wpsdb-media-files.php:565 +msgid "Could not create Temporary file." +msgstr "" + +#: ../class/wpsdb-media-files.php:622 +msgid "" +"WP Sync DB Media Files does not seems to be installed/active on the remote " +"website." +msgstr "" + +#: ../template/sync.php:12 +msgid "" +"Remove local media files that are not " +"found on the remote site" +msgstr "" + +#: ../template/sync.php:18 +msgid "Addon Missing" +msgstr "" + +#: ../template/sync.php:18 +msgid "" +"The Media Files addon is inactive on the remote site. " +"Please install and activate it to enable media file syncing." +msgstr "" + +#: ../template/sync.php:21 +msgid "Version Mismatch" +msgstr "" diff --git a/template/migrate.php b/template/sync.php similarity index 90% rename from template/migrate.php rename to template/sync.php index bafc2ac..7f27055 100644 --- a/template/migrate.php +++ b/template/sync.php @@ -14,8 +14,8 @@ -