소스 검색

Fixing WP Import

svalavuo 4 일 전
부모
커밋
06b77fd59b
1개의 변경된 파일23개의 추가작업 그리고 23개의 파일을 삭제
  1. 23 23
      admin/wordpress_import.php

+ 23 - 23
admin/wordpress_import.php

@@ -42,7 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         
         // Validate required fields
         if (empty($wpConfig['host']) || empty($wpConfig['database']) || empty($wpConfig['username'])) {
-            throw new Exception(t('wordpress_import_config_required'));
+            throw new Exception("WordPress database configuration is required. Please provide host, database, and username.");
         }
         
         // Direct WordPress connection test (bypass WordPressImport class)
@@ -88,11 +88,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
                     $stats['comments'] = 0;
                 }
                 
-                $message = t('wordpress_connection_success') . ': ' . 
-                          t('posts') . ': ' . $stats['posts'] . ', ' .
-                          t('categories') . ': ' . $stats['categories'] . ', ' .
-                          t('users') . ': ' . $stats['users'] . ', ' .
-                          t('comments') . ': ' . $stats['comments'];
+                $message = "WordPress connection successful: " . 
+                          "Posts: " . $stats['posts'] . ", " .
+                          "Categories: " . $stats['categories'] . ", " .
+                          "Users: " . $stats['users'] . ", " .
+                          "Comments: " . $stats['comments'];
             }
         } catch (Exception $e) {
             throw new Exception("WordPress connection failed: " . $e->getMessage());
@@ -303,33 +303,33 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
 
             <!-- Information Section -->
             <div class="info-section">
-                <h3><?php echo t('wordpress_import_info'); ?></h3>
+                <h3>WordPress Import Information</h3>
                 <div class="info-content">
                     <div class="info-item">
-                        <h4><?php echo t('what_gets_imported'); ?></h4>
+                        <h4>What Gets Imported</h4>
                         <ul>
-                            <li><?php echo t('import_posts_info'); ?></li>
-                            <li><?php echo t('import_categories_info'); ?></li>
-                            <li><?php echo t('import_users_info'); ?></li>
-                            <li><?php echo t('import_comments_info'); ?></li>
+                            <li>Posts (title, content, author, publication date)</li>
+                            <li>Categories (name and description)</li>
+                            <li>Users (username, email, display name)</li>
+                            <li>Comments (content, author, date, threading)</li>
                         </ul>
                     </div>
                     
                     <div class="info-item">
-                        <h4><?php echo t('import_requirements'); ?></h4>
+                        <h4>Requirements</h4>
                         <ul>
-                            <li><?php echo t('import_db_access'); ?></li>
-                            <li><?php echo t('import_wp_structure'); ?></li>
-                            <li><?php echo t('import_backup'); ?></li>
+                            <li>Database access to WordPress database</li>
+                            <li>WordPress database with standard structure</li>
+                            <li>Backup of your current data (recommended)</li>
                         </ul>
                     </div>
                     
                     <div class="info-item">
-                        <h4><?php echo t('import_notes'); ?></h4>
+                        <h4>Important Notes</h4>
                         <ul>
-                            <li><?php echo t('import_existing_data'); ?></li>
-                            <li><?php echo t('import_content_processing'); ?></li>
-                            <li><?php echo t('import_user_mapping'); ?></li>
+                            <li>Existing data with same identifiers will be skipped</li>
+                            <li>WordPress content is processed for compatibility</li>
+                            <li>WordPress users are mapped to your user system</li>
                         </ul>
                     </div>
                 </div>
@@ -349,7 +349,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
                 if (loading) {
                     button.disabled = true;
                     button.dataset.originalText = button.textContent;
-                    button.textContent = button.dataset.loadingText || '<?php echo t('loading'); ?>...';
+                    button.textContent = button.dataset.loadingText || 'Loading...';
                 } else {
                     button.disabled = false;
                     button.textContent = button.dataset.originalText;
@@ -359,13 +359,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
             // Test connection loading
             testBtn.addEventListener('click', function() {
                 setLoading(this, true);
-                this.dataset.loadingText = '<?php echo t('testing_connection'); ?>';
+                this.dataset.loadingText = 'Testing connection...';
             });
             
             // Import loading
             importBtn.addEventListener('click', function() {
                 setLoading(this, true);
-                this.dataset.loadingText = '<?php echo t('importing'); ?>...';
+                this.dataset.loadingText = 'Importing...';
             });
             
             // Reset loading on form submit