Changeset 3479459
- Timestamp:
- 03/10/2026 06:36:21 PM (3 weeks ago)
- Location:
- esolleso-daily-bible-reading-plan
- Files:
-
- 2 added
- 8 edited
-
tags/1.1.0/bible-reading-plan.php (modified) (1 diff)
-
tags/1.1.0/includes/adminpanel.php (modified) (25 diffs)
-
tags/1.1.0/includes/helpers.php (modified) (8 diffs)
-
tags/1.1.0/includes/shortcode.php (modified) (6 diffs)
-
tags/1.1.0/languages/esolleso-daily-bible-reading-plan.pot (added)
-
trunk/bible-reading-plan.php (modified) (1 diff)
-
trunk/includes/adminpanel.php (modified) (25 diffs)
-
trunk/includes/helpers.php (modified) (8 diffs)
-
trunk/includes/shortcode.php (modified) (6 diffs)
-
trunk/languages/esolleso-daily-bible-reading-plan.pot (added)
Legend:
- Unmodified
- Added
- Removed
-
esolleso-daily-bible-reading-plan/tags/1.1.0/bible-reading-plan.php
r3479283 r3479459 27 27 add_action('init', function () { 28 28 load_plugin_textdomain( 29 ' bible-reading-plan',29 'esolleso-daily-bible-reading-plan', 30 30 false, 31 31 dirname(plugin_basename(BIBLDARE_PLUGIN_PATH)) . '/languages' -
esolleso-daily-bible-reading-plan/tags/1.1.0/includes/adminpanel.php
r3479283 r3479459 11 11 { 12 12 add_management_page( 13 __('Bible Reading Plan', ' bible-reading-plan'),14 __('Bible Reading Plan', ' bible-reading-plan'),13 __('Bible Reading Plan', 'esolleso-daily-bible-reading-plan'), 14 __('Bible Reading Plan', 'esolleso-daily-bible-reading-plan'), 15 15 'manage_options', 16 16 'bible-daily-reading-plan', … … 51 51 return [ 52 52 'success' => false, 53 'message' => __('No data provided.', ' bible-reading-plan'),53 'message' => __('No data provided.', 'esolleso-daily-bible-reading-plan'), 54 54 ]; 55 55 } … … 66 66 'success' => false, 67 67 'message' => sprintf( 68 __('Invalid JSON: %s', ' bible-reading-plan'),68 __('Invalid JSON: %s', 'esolleso-daily-bible-reading-plan'), 69 69 json_last_error_msg() 70 70 ), … … 89 89 return [ 90 90 'success' => true, 91 'message' => __('Schedule saved successfully.', ' bible-reading-plan'),91 'message' => __('Schedule saved successfully.', 'esolleso-daily-bible-reading-plan'), 92 92 ]; 93 93 } … … 95 95 return [ 96 96 'success' => false, 97 'message' => __('Failed to save schedule data.', ' bible-reading-plan'),97 'message' => __('Failed to save schedule data.', 'esolleso-daily-bible-reading-plan'), 98 98 ]; 99 99 } … … 109 109 110 110 if (!file_exists($backup_file)) { 111 add_settings_error('bible_schedule_messages', 'error', __('Backup file not found at:', ' bible-reading-plan') . ' ' . $backup_file, 'error');111 add_settings_error('bible_schedule_messages', 'error', __('Backup file not found at:', 'esolleso-daily-bible-reading-plan') . ' ' . $backup_file, 'error'); 112 112 return; 113 113 } … … 116 116 117 117 if (!is_array($default_data)) { 118 add_settings_error('bible_schedule_messages', 'error', __('Backup file format is invalid (must return an array).', ' bible-reading-plan'), 'error');118 add_settings_error('bible_schedule_messages', 'error', __('Backup file format is invalid (must return an array).', 'esolleso-daily-bible-reading-plan'), 'error'); 119 119 return; 120 120 } … … 126 126 'bible_schedule_messages', 127 127 'success', 128 __('Successfully reset database to default data!', ' bible-reading-plan'),128 __('Successfully reset database to default data!', 'esolleso-daily-bible-reading-plan'), 129 129 'success' 130 130 ); … … 132 132 return true; 133 133 } else { 134 add_settings_error('bible_schedule_messages', 'error', __('Failed to update database with default data.', ' bible-reading-plan'), 'error');134 add_settings_error('bible_schedule_messages', 'error', __('Failed to update database with default data.', 'esolleso-daily-bible-reading-plan'), 'error'); 135 135 return false; 136 136 } … … 250 250 251 251 <div class="wrap"> 252 <h1><?php echo esc_html(__('Bible Schedule Tools', ' bible-reading-plan')); ?></h1>252 <h1><?php echo esc_html(__('Bible Schedule Tools', 'esolleso-daily-bible-reading-plan')); ?></h1> 253 253 254 254 <?php settings_errors('bible_schedule_messages'); ?> … … 256 256 <?php if (isset($_GET['cache_cleared'])): ?> 257 257 <div class="notice notice-success is-dismissible"> 258 <p><strong><?php echo esc_html(__('Cache cleared successfully!', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('All cached Bible data has been removed.', 'bible-reading-plan')); ?></p>258 <p><strong><?php echo esc_html(__('Cache cleared successfully!', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('All cached Bible data has been removed.', 'esolleso-daily-bible-reading-plan')); ?></p> 259 259 </div> 260 260 <?php endif; ?> … … 267 267 <?php else: ?> 268 268 <div class="notice notice-error is-dismissible"> 269 <p><strong><?php echo esc_html(__('Error:', ' bible-reading-plan')); ?></strong> <?php echo esc_html($save_result['message']); ?></p>269 <p><strong><?php echo esc_html(__('Error:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html($save_result['message']); ?></p> 270 270 </div> 271 271 <?php endif; ?> … … 275 275 276 276 <div class="card" style="width: 100%; margin: 0; padding: 20px; background: #fff; border: 1px solid #c3c4c7;"> 277 <h2 class="title" style="margin-top: 0;"><?php echo esc_html(__('Cache Management', ' bible-reading-plan')); ?></h2>277 <h2 class="title" style="margin-top: 0;"><?php echo esc_html(__('Cache Management', 'esolleso-daily-bible-reading-plan')); ?></h2> 278 278 279 279 <div style="margin-bottom: 24px;"> 280 <p class="description" style="margin-bottom: 15px;"><?php echo esc_html(__('Force the plugin to fetch fresh Bible data on the next page load.', ' bible-reading-plan')); ?></p>280 <p class="description" style="margin-bottom: 15px;"><?php echo esc_html(__('Force the plugin to fetch fresh Bible data on the next page load.', 'esolleso-daily-bible-reading-plan')); ?></p> 281 281 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>"> 282 282 <input type="hidden" name="action" value="clear_bible_cache"> 283 283 <?php wp_nonce_field('clear_bible_cache_nonce'); ?> 284 <button type="submit" class="button button-secondary"><?php echo esc_html(__('Clear All Cache', ' bible-reading-plan')); ?></button>284 <button type="submit" class="button button-secondary"><?php echo esc_html(__('Clear All Cache', 'esolleso-daily-bible-reading-plan')); ?></button> 285 285 </form> 286 286 </div> … … 295 295 <label style="display: flex; align-items: center; gap: 8px;"> 296 296 <input type="checkbox" name="cache_enabled" <?php checked($cache_enabled, 1); ?> value="1"> 297 <span><?php echo esc_html(__('Enable Cache', ' bible-reading-plan')); ?></span>297 <span><?php echo esc_html(__('Enable Cache', 'esolleso-daily-bible-reading-plan')); ?></span> 298 298 </label> 299 299 </p> 300 <button type="submit" class="button button-primary"><?php echo esc_html(__('Save Settings', ' bible-reading-plan')); ?></button>300 <button type="submit" class="button button-primary"><?php echo esc_html(__('Save Settings', 'esolleso-daily-bible-reading-plan')); ?></button> 301 301 </form> 302 302 </div> … … 305 305 <div 306 306 style="width: 100%; position: relative; padding: 0.7em 2em 1em; padding-top: 20px; border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background: #fff; box-sizing: border-box;"> 307 <h2 class="title" style="margin-top: 0; margin-bottom: 24px;"><?php echo esc_html(__('Language and Version Settings', ' bible-reading-plan')); ?></h2>307 <h2 class="title" style="margin-top: 0; margin-bottom: 24px;"><?php echo esc_html(__('Language and Version Settings', 'esolleso-daily-bible-reading-plan')); ?></h2> 308 308 <form method="post" id="bibldare-language-form"> 309 309 <?php wp_nonce_field('save_bible_settings_nonce'); ?> … … 312 312 <div style="display: flex; flex-direction: column; gap: 24px;"> 313 313 <div> 314 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Language', ' bible-reading-plan')); ?></h3>314 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Language', 'esolleso-daily-bible-reading-plan')); ?></h3> 315 315 <select name="language" id="bibldare_language_select" 316 316 style="width: 100%; max-width: 420px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px;"> 317 <option value="eng" <?php selected($language, 'eng'); ?>><?php echo esc_html(__('English', ' bible-reading-plan')); ?></option>318 <option value="geo" <?php selected($language, 'geo'); ?>><?php echo esc_html(__('Georgian', ' bible-reading-plan')); ?></option>317 <option value="eng" <?php selected($language, 'eng'); ?>><?php echo esc_html(__('English', 'esolleso-daily-bible-reading-plan')); ?></option> 318 <option value="geo" <?php selected($language, 'geo'); ?>><?php echo esc_html(__('Georgian', 'esolleso-daily-bible-reading-plan')); ?></option> 319 319 </select> 320 320 </div> 321 321 322 322 <div> 323 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Version', ' bible-reading-plan')); ?></h3>323 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Version', 'esolleso-daily-bible-reading-plan')); ?></h3> 324 324 <select name="version" id="bibldare_version_select" 325 325 style="width: 100%; max-width: 420px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px;"> … … 328 328 329 329 <div> 330 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Background Color', ' bible-reading-plan')); ?></h3>330 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Background Color', 'esolleso-daily-bible-reading-plan')); ?></h3> 331 331 <select name="background" 332 332 style="width: 100%; max-width: 420px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px;"> 333 <option value="white" <?php selected($background, 'white'); ?>><?php echo esc_html(__('White', ' bible-reading-plan')); ?></option>334 <option value="black" <?php selected($background, 'black'); ?>><?php echo esc_html(__('Black', ' bible-reading-plan')); ?></option>335 <option value="gold" <?php selected($background, 'gold'); ?>><?php echo esc_html(__('Gold', ' bible-reading-plan')); ?></option>333 <option value="white" <?php selected($background, 'white'); ?>><?php echo esc_html(__('White', 'esolleso-daily-bible-reading-plan')); ?></option> 334 <option value="black" <?php selected($background, 'black'); ?>><?php echo esc_html(__('Black', 'esolleso-daily-bible-reading-plan')); ?></option> 335 <option value="gold" <?php selected($background, 'gold'); ?>><?php echo esc_html(__('Gold', 'esolleso-daily-bible-reading-plan')); ?></option> 336 336 </select> 337 337 </div> … … 347 347 348 348 <div> 349 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Shortcode:', ' bible-reading-plan')); ?></h3>349 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Shortcode:', 'esolleso-daily-bible-reading-plan')); ?></h3> 350 350 <input id="bibldareShortcodeInput" type="text" readonly onclick="this.select()" 351 351 value="<?php echo esc_attr($shortcode); ?>" … … 358 358 359 359 <div class="card" style="max-width: 100%; margin-top: 20px;"> 360 <h2 class="title"><?php echo esc_html(__('Edit Schedule Data', ' bible-reading-plan')); ?></h2>361 362 <p><strong><?php echo esc_html(__('Note:', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('Schedule data is stored securely in your WordPress database. Edit the JSON below to customize your reading schedule.', 'bible-reading-plan')); ?></p>360 <h2 class="title"><?php echo esc_html(__('Edit Schedule Data', 'esolleso-daily-bible-reading-plan')); ?></h2> 361 362 <p><strong><?php echo esc_html(__('Note:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('Schedule data is stored securely in your WordPress database. Edit the JSON below to customize your reading schedule.', 'esolleso-daily-bible-reading-plan')); ?></p> 363 363 364 364 <?php if (file_exists(plugin_dir_path(BIBLDARE_PLUGIN_PATH) . 'assets/images/data-structure.png')): ?> … … 368 368 369 369 <div class="bible-schedule"> 370 <h3><?php echo esc_html(__('Book Indexes', ' bible-reading-plan')); ?></h3>370 <h3><?php echo esc_html(__('Book Indexes', 'esolleso-daily-bible-reading-plan')); ?></h3> 371 371 <ul style="column-count: 5; column-gap: 20px; list-style-position: inside;"> 372 372 <?php foreach ($bibleNames as $index => $book): ?> … … 376 376 </div> 377 377 378 <p><?php echo esc_html(__("Today's index is:", ' bible-reading-plan')); ?> <strong><?php echo esc_html(bibldare_get_today_index()); ?></strong></p>378 <p><?php echo esc_html(__("Today's index is:", 'esolleso-daily-bible-reading-plan')); ?> <strong><?php echo esc_html(bibldare_get_today_index()); ?></strong></p> 379 379 380 380 <form method="post" style="margin-top: 15px;"> … … 386 386 <p class="submit" style="margin-top: 15px;"> 387 387 <button type="submit" class="button button-primary" 388 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to save changes?', ' bible-reading-plan')); ?>');">389 <?php echo esc_html(__('Save Changes', ' bible-reading-plan')); ?>388 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to save changes?', 'esolleso-daily-bible-reading-plan')); ?>');"> 389 <?php echo esc_html(__('Save Changes', 'esolleso-daily-bible-reading-plan')); ?> 390 390 </button> 391 391 <button type="button" class="button" onclick="location.reload();"> 392 <?php echo esc_html(__('Cancel / Reload', ' bible-reading-plan')); ?>392 <?php echo esc_html(__('Cancel / Reload', 'esolleso-daily-bible-reading-plan')); ?> 393 393 </button> 394 394 </p> … … 400 400 <p class="submit" style="margin-top: 0;"> 401 401 <button type="submit" class="button button-secondary" 402 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to reset to default data? This will replace all current content.', ' bible-reading-plan')); ?>');"402 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to reset to default data? This will replace all current content.', 'esolleso-daily-bible-reading-plan')); ?>');" 403 403 style="background: #dc3545; border-color: #dc3545; color: #fff;"> 404 <?php echo esc_html(__('Reset to Default', ' bible-reading-plan')); ?>404 <?php echo esc_html(__('Reset to Default', 'esolleso-daily-bible-reading-plan')); ?> 405 405 </button> 406 406 </p> … … 409 409 410 410 <div class="card" style="max-width: 100%; margin-top: 20px;"> 411 <h2 class="title"><?php echo esc_html(__('Cache Information', ' bible-reading-plan')); ?></h2>411 <h2 class="title"><?php echo esc_html(__('Cache Information', 'esolleso-daily-bible-reading-plan')); ?></h2> 412 412 <?php 413 413 $cached_days = 0; … … 418 418 } 419 419 ?> 420 <p><strong><?php echo esc_html(__('Cached Days:', ' bible-reading-plan')); ?></strong> <?php echo esc_html($cached_days); ?> / 365</p>421 <p><strong><?php echo esc_html(__('Cache Duration:', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('30 days', 'bible-reading-plan')); ?></p>422 <p><strong><?php echo esc_html(__('Storage:', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('WordPress database (shared across all users)', 'bible-reading-plan')); ?></p>420 <p><strong><?php echo esc_html(__('Cached Days:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html($cached_days); ?> / 365</p> 421 <p><strong><?php echo esc_html(__('Cache Duration:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('30 days', 'esolleso-daily-bible-reading-plan')); ?></p> 422 <p><strong><?php echo esc_html(__('Storage:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('WordPress database (shared across all users)', 'esolleso-daily-bible-reading-plan')); ?></p> 423 423 </div> 424 424 </div> -
esolleso-daily-bible-reading-plan/tags/1.1.0/includes/helpers.php
r3479297 r3479459 348 348 { 349 349 if (!is_array($data)) { 350 return new WP_Error('invalid_root', __('Root must be an array.', ' bibldare'));350 return new WP_Error('invalid_root', __('Root must be an array.', 'esolleso-daily-bible-reading-plan')); 351 351 } 352 352 … … 360 360 return new WP_Error( 361 361 'invalid_day', 362 sprintf(__('Day %d is out of range (1-366).', ' bibldare'), $day_key)362 sprintf(__('Day %d is out of range (1-366).', 'esolleso-daily-bible-reading-plan'), $day_key) 363 363 ); 364 364 } … … 367 367 return new WP_Error( 368 368 'empty_day', 369 sprintf(__('Day %d has no readings.', ' bibldare'), $day_key)369 sprintf(__('Day %d has no readings.', 'esolleso-daily-bible-reading-plan'), $day_key) 370 370 ); 371 371 } … … 378 378 return new WP_Error( 379 379 'invalid_reading', 380 sprintf(__('Reading %d on day %d is not an array.', ' bibldare'), $reading_idx + 1, $day_key)380 sprintf(__('Reading %d on day %d is not an array.', 'esolleso-daily-bible-reading-plan'), $reading_idx + 1, $day_key) 381 381 ); 382 382 } … … 387 387 return new WP_Error( 388 388 'invalid_book', 389 sprintf(__('Invalid bookIndex %d on day %d.', ' bibldare'), $book_index, $day_key)389 sprintf(__('Invalid bookIndex %d on day %d.', 'esolleso-daily-bible-reading-plan'), $book_index, $day_key) 390 390 ); 391 391 } … … 395 395 return new WP_Error( 396 396 'missing_chapters', 397 sprintf(__('No chapters defined for reading %d on day %d.', ' bibldare'), $reading_idx + 1, $day_key)397 sprintf(__('No chapters defined for reading %d on day %d.', 'esolleso-daily-bible-reading-plan'), $reading_idx + 1, $day_key) 398 398 ); 399 399 } … … 404 404 return new WP_Error( 405 405 'invalid_chapter', 406 sprintf(__('Chapter entry %d on day %d is malformed.', ' bibldare'), $chap_idx + 1, $day_key)406 sprintf(__('Chapter entry %d on day %d is malformed.', 'esolleso-daily-bible-reading-plan'), $chap_idx + 1, $day_key) 407 407 ); 408 408 } … … 413 413 return new WP_Error( 414 414 'invalid_chapter_num', 415 sprintf(__('Invalid chapter number %d on day %d.', ' bibldare'), $chapter, $day_key)415 sprintf(__('Invalid chapter number %d on day %d.', 'esolleso-daily-bible-reading-plan'), $chapter, $day_key) 416 416 ); 417 417 } -
esolleso-daily-bible-reading-plan/tags/1.1.0/includes/shortcode.php
r3479283 r3479459 43 43 </svg> 44 44 </div> 45 <div class="days-panel-header-title"><?php echo esc_html(__('Our Reading Plan', ' bible-reading-plan')); ?></div>45 <div class="days-panel-header-title"><?php echo esc_html(__('Our Reading Plan', 'esolleso-daily-bible-reading-plan')); ?></div> 46 46 </div> 47 47 … … 85 85 <div class="bible-schedule-loader"> 86 86 <div class="spinner"></div> 87 <p><?php echo esc_html(__('loading', ' bible-reading-plan') . '...'); ?></p>87 <p><?php echo esc_html(__('loading', 'esolleso-daily-bible-reading-plan') . '...'); ?></p> 88 88 </div> 89 89 … … 287 287 288 288 if (!$schedule_data) { 289 wp_send_json_error(['message' => __('No schedule found for this day.', ' bible-reading-plan')]);289 wp_send_json_error(['message' => __('No schedule found for this day.', 'esolleso-daily-bible-reading-plan')]); 290 290 return; 291 291 } … … 336 336 <h3> 337 337 <span class="chapter-label"> 338 <?php echo esc_html(__('chapter', ' bible-reading-plan')); ?>338 <?php echo esc_html(__('chapter', 'esolleso-daily-bible-reading-plan')); ?> 339 339 </span> 340 340 <?php echo esc_html($chapterNumber); ?> … … 342 342 <?php if ($hasRange): ?> 343 343 <span class="chapter-range"> 344 (<?php echo esc_html(__('verses', ' bible-reading-plan')); ?>344 (<?php echo esc_html(__('verses', 'esolleso-daily-bible-reading-plan')); ?> 345 345 <?php echo esc_html($from); ?>-<?php echo esc_html($to); ?>) 346 346 </span> … … 363 363 <?php else: ?> 364 364 <p class="error-message"> 365 <?php echo esc_html__('No verses available for this chapter.' ); ?>365 <?php echo esc_html__('No verses available for this chapter.', 'esolleso-daily-bible-reading-plan'); ?> 366 366 </p> 367 367 <?php endif; ?> -
esolleso-daily-bible-reading-plan/trunk/bible-reading-plan.php
r3479283 r3479459 27 27 add_action('init', function () { 28 28 load_plugin_textdomain( 29 ' bible-reading-plan',29 'esolleso-daily-bible-reading-plan', 30 30 false, 31 31 dirname(plugin_basename(BIBLDARE_PLUGIN_PATH)) . '/languages' -
esolleso-daily-bible-reading-plan/trunk/includes/adminpanel.php
r3479283 r3479459 11 11 { 12 12 add_management_page( 13 __('Bible Reading Plan', ' bible-reading-plan'),14 __('Bible Reading Plan', ' bible-reading-plan'),13 __('Bible Reading Plan', 'esolleso-daily-bible-reading-plan'), 14 __('Bible Reading Plan', 'esolleso-daily-bible-reading-plan'), 15 15 'manage_options', 16 16 'bible-daily-reading-plan', … … 51 51 return [ 52 52 'success' => false, 53 'message' => __('No data provided.', ' bible-reading-plan'),53 'message' => __('No data provided.', 'esolleso-daily-bible-reading-plan'), 54 54 ]; 55 55 } … … 66 66 'success' => false, 67 67 'message' => sprintf( 68 __('Invalid JSON: %s', ' bible-reading-plan'),68 __('Invalid JSON: %s', 'esolleso-daily-bible-reading-plan'), 69 69 json_last_error_msg() 70 70 ), … … 89 89 return [ 90 90 'success' => true, 91 'message' => __('Schedule saved successfully.', ' bible-reading-plan'),91 'message' => __('Schedule saved successfully.', 'esolleso-daily-bible-reading-plan'), 92 92 ]; 93 93 } … … 95 95 return [ 96 96 'success' => false, 97 'message' => __('Failed to save schedule data.', ' bible-reading-plan'),97 'message' => __('Failed to save schedule data.', 'esolleso-daily-bible-reading-plan'), 98 98 ]; 99 99 } … … 109 109 110 110 if (!file_exists($backup_file)) { 111 add_settings_error('bible_schedule_messages', 'error', __('Backup file not found at:', ' bible-reading-plan') . ' ' . $backup_file, 'error');111 add_settings_error('bible_schedule_messages', 'error', __('Backup file not found at:', 'esolleso-daily-bible-reading-plan') . ' ' . $backup_file, 'error'); 112 112 return; 113 113 } … … 116 116 117 117 if (!is_array($default_data)) { 118 add_settings_error('bible_schedule_messages', 'error', __('Backup file format is invalid (must return an array).', ' bible-reading-plan'), 'error');118 add_settings_error('bible_schedule_messages', 'error', __('Backup file format is invalid (must return an array).', 'esolleso-daily-bible-reading-plan'), 'error'); 119 119 return; 120 120 } … … 126 126 'bible_schedule_messages', 127 127 'success', 128 __('Successfully reset database to default data!', ' bible-reading-plan'),128 __('Successfully reset database to default data!', 'esolleso-daily-bible-reading-plan'), 129 129 'success' 130 130 ); … … 132 132 return true; 133 133 } else { 134 add_settings_error('bible_schedule_messages', 'error', __('Failed to update database with default data.', ' bible-reading-plan'), 'error');134 add_settings_error('bible_schedule_messages', 'error', __('Failed to update database with default data.', 'esolleso-daily-bible-reading-plan'), 'error'); 135 135 return false; 136 136 } … … 250 250 251 251 <div class="wrap"> 252 <h1><?php echo esc_html(__('Bible Schedule Tools', ' bible-reading-plan')); ?></h1>252 <h1><?php echo esc_html(__('Bible Schedule Tools', 'esolleso-daily-bible-reading-plan')); ?></h1> 253 253 254 254 <?php settings_errors('bible_schedule_messages'); ?> … … 256 256 <?php if (isset($_GET['cache_cleared'])): ?> 257 257 <div class="notice notice-success is-dismissible"> 258 <p><strong><?php echo esc_html(__('Cache cleared successfully!', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('All cached Bible data has been removed.', 'bible-reading-plan')); ?></p>258 <p><strong><?php echo esc_html(__('Cache cleared successfully!', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('All cached Bible data has been removed.', 'esolleso-daily-bible-reading-plan')); ?></p> 259 259 </div> 260 260 <?php endif; ?> … … 267 267 <?php else: ?> 268 268 <div class="notice notice-error is-dismissible"> 269 <p><strong><?php echo esc_html(__('Error:', ' bible-reading-plan')); ?></strong> <?php echo esc_html($save_result['message']); ?></p>269 <p><strong><?php echo esc_html(__('Error:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html($save_result['message']); ?></p> 270 270 </div> 271 271 <?php endif; ?> … … 275 275 276 276 <div class="card" style="width: 100%; margin: 0; padding: 20px; background: #fff; border: 1px solid #c3c4c7;"> 277 <h2 class="title" style="margin-top: 0;"><?php echo esc_html(__('Cache Management', ' bible-reading-plan')); ?></h2>277 <h2 class="title" style="margin-top: 0;"><?php echo esc_html(__('Cache Management', 'esolleso-daily-bible-reading-plan')); ?></h2> 278 278 279 279 <div style="margin-bottom: 24px;"> 280 <p class="description" style="margin-bottom: 15px;"><?php echo esc_html(__('Force the plugin to fetch fresh Bible data on the next page load.', ' bible-reading-plan')); ?></p>280 <p class="description" style="margin-bottom: 15px;"><?php echo esc_html(__('Force the plugin to fetch fresh Bible data on the next page load.', 'esolleso-daily-bible-reading-plan')); ?></p> 281 281 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>"> 282 282 <input type="hidden" name="action" value="clear_bible_cache"> 283 283 <?php wp_nonce_field('clear_bible_cache_nonce'); ?> 284 <button type="submit" class="button button-secondary"><?php echo esc_html(__('Clear All Cache', ' bible-reading-plan')); ?></button>284 <button type="submit" class="button button-secondary"><?php echo esc_html(__('Clear All Cache', 'esolleso-daily-bible-reading-plan')); ?></button> 285 285 </form> 286 286 </div> … … 295 295 <label style="display: flex; align-items: center; gap: 8px;"> 296 296 <input type="checkbox" name="cache_enabled" <?php checked($cache_enabled, 1); ?> value="1"> 297 <span><?php echo esc_html(__('Enable Cache', ' bible-reading-plan')); ?></span>297 <span><?php echo esc_html(__('Enable Cache', 'esolleso-daily-bible-reading-plan')); ?></span> 298 298 </label> 299 299 </p> 300 <button type="submit" class="button button-primary"><?php echo esc_html(__('Save Settings', ' bible-reading-plan')); ?></button>300 <button type="submit" class="button button-primary"><?php echo esc_html(__('Save Settings', 'esolleso-daily-bible-reading-plan')); ?></button> 301 301 </form> 302 302 </div> … … 305 305 <div 306 306 style="width: 100%; position: relative; padding: 0.7em 2em 1em; padding-top: 20px; border: 1px solid #c3c4c7; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); background: #fff; box-sizing: border-box;"> 307 <h2 class="title" style="margin-top: 0; margin-bottom: 24px;"><?php echo esc_html(__('Language and Version Settings', ' bible-reading-plan')); ?></h2>307 <h2 class="title" style="margin-top: 0; margin-bottom: 24px;"><?php echo esc_html(__('Language and Version Settings', 'esolleso-daily-bible-reading-plan')); ?></h2> 308 308 <form method="post" id="bibldare-language-form"> 309 309 <?php wp_nonce_field('save_bible_settings_nonce'); ?> … … 312 312 <div style="display: flex; flex-direction: column; gap: 24px;"> 313 313 <div> 314 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Language', ' bible-reading-plan')); ?></h3>314 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Language', 'esolleso-daily-bible-reading-plan')); ?></h3> 315 315 <select name="language" id="bibldare_language_select" 316 316 style="width: 100%; max-width: 420px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px;"> 317 <option value="eng" <?php selected($language, 'eng'); ?>><?php echo esc_html(__('English', ' bible-reading-plan')); ?></option>318 <option value="geo" <?php selected($language, 'geo'); ?>><?php echo esc_html(__('Georgian', ' bible-reading-plan')); ?></option>317 <option value="eng" <?php selected($language, 'eng'); ?>><?php echo esc_html(__('English', 'esolleso-daily-bible-reading-plan')); ?></option> 318 <option value="geo" <?php selected($language, 'geo'); ?>><?php echo esc_html(__('Georgian', 'esolleso-daily-bible-reading-plan')); ?></option> 319 319 </select> 320 320 </div> 321 321 322 322 <div> 323 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Version', ' bible-reading-plan')); ?></h3>323 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Version', 'esolleso-daily-bible-reading-plan')); ?></h3> 324 324 <select name="version" id="bibldare_version_select" 325 325 style="width: 100%; max-width: 420px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px;"> … … 328 328 329 329 <div> 330 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Background Color', ' bible-reading-plan')); ?></h3>330 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Background Color', 'esolleso-daily-bible-reading-plan')); ?></h3> 331 331 <select name="background" 332 332 style="width: 100%; max-width: 420px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px;"> 333 <option value="white" <?php selected($background, 'white'); ?>><?php echo esc_html(__('White', ' bible-reading-plan')); ?></option>334 <option value="black" <?php selected($background, 'black'); ?>><?php echo esc_html(__('Black', ' bible-reading-plan')); ?></option>335 <option value="gold" <?php selected($background, 'gold'); ?>><?php echo esc_html(__('Gold', ' bible-reading-plan')); ?></option>333 <option value="white" <?php selected($background, 'white'); ?>><?php echo esc_html(__('White', 'esolleso-daily-bible-reading-plan')); ?></option> 334 <option value="black" <?php selected($background, 'black'); ?>><?php echo esc_html(__('Black', 'esolleso-daily-bible-reading-plan')); ?></option> 335 <option value="gold" <?php selected($background, 'gold'); ?>><?php echo esc_html(__('Gold', 'esolleso-daily-bible-reading-plan')); ?></option> 336 336 </select> 337 337 </div> … … 347 347 348 348 <div> 349 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Shortcode:', ' bible-reading-plan')); ?></h3>349 <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;"><?php echo esc_html(__('Shortcode:', 'esolleso-daily-bible-reading-plan')); ?></h3> 350 350 <input id="bibldareShortcodeInput" type="text" readonly onclick="this.select()" 351 351 value="<?php echo esc_attr($shortcode); ?>" … … 358 358 359 359 <div class="card" style="max-width: 100%; margin-top: 20px;"> 360 <h2 class="title"><?php echo esc_html(__('Edit Schedule Data', ' bible-reading-plan')); ?></h2>361 362 <p><strong><?php echo esc_html(__('Note:', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('Schedule data is stored securely in your WordPress database. Edit the JSON below to customize your reading schedule.', 'bible-reading-plan')); ?></p>360 <h2 class="title"><?php echo esc_html(__('Edit Schedule Data', 'esolleso-daily-bible-reading-plan')); ?></h2> 361 362 <p><strong><?php echo esc_html(__('Note:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('Schedule data is stored securely in your WordPress database. Edit the JSON below to customize your reading schedule.', 'esolleso-daily-bible-reading-plan')); ?></p> 363 363 364 364 <?php if (file_exists(plugin_dir_path(BIBLDARE_PLUGIN_PATH) . 'assets/images/data-structure.png')): ?> … … 368 368 369 369 <div class="bible-schedule"> 370 <h3><?php echo esc_html(__('Book Indexes', ' bible-reading-plan')); ?></h3>370 <h3><?php echo esc_html(__('Book Indexes', 'esolleso-daily-bible-reading-plan')); ?></h3> 371 371 <ul style="column-count: 5; column-gap: 20px; list-style-position: inside;"> 372 372 <?php foreach ($bibleNames as $index => $book): ?> … … 376 376 </div> 377 377 378 <p><?php echo esc_html(__("Today's index is:", ' bible-reading-plan')); ?> <strong><?php echo esc_html(bibldare_get_today_index()); ?></strong></p>378 <p><?php echo esc_html(__("Today's index is:", 'esolleso-daily-bible-reading-plan')); ?> <strong><?php echo esc_html(bibldare_get_today_index()); ?></strong></p> 379 379 380 380 <form method="post" style="margin-top: 15px;"> … … 386 386 <p class="submit" style="margin-top: 15px;"> 387 387 <button type="submit" class="button button-primary" 388 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to save changes?', ' bible-reading-plan')); ?>');">389 <?php echo esc_html(__('Save Changes', ' bible-reading-plan')); ?>388 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to save changes?', 'esolleso-daily-bible-reading-plan')); ?>');"> 389 <?php echo esc_html(__('Save Changes', 'esolleso-daily-bible-reading-plan')); ?> 390 390 </button> 391 391 <button type="button" class="button" onclick="location.reload();"> 392 <?php echo esc_html(__('Cancel / Reload', ' bible-reading-plan')); ?>392 <?php echo esc_html(__('Cancel / Reload', 'esolleso-daily-bible-reading-plan')); ?> 393 393 </button> 394 394 </p> … … 400 400 <p class="submit" style="margin-top: 0;"> 401 401 <button type="submit" class="button button-secondary" 402 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to reset to default data? This will replace all current content.', ' bible-reading-plan')); ?>');"402 onclick="return confirm('<?php echo esc_js(__('Are you sure you want to reset to default data? This will replace all current content.', 'esolleso-daily-bible-reading-plan')); ?>');" 403 403 style="background: #dc3545; border-color: #dc3545; color: #fff;"> 404 <?php echo esc_html(__('Reset to Default', ' bible-reading-plan')); ?>404 <?php echo esc_html(__('Reset to Default', 'esolleso-daily-bible-reading-plan')); ?> 405 405 </button> 406 406 </p> … … 409 409 410 410 <div class="card" style="max-width: 100%; margin-top: 20px;"> 411 <h2 class="title"><?php echo esc_html(__('Cache Information', ' bible-reading-plan')); ?></h2>411 <h2 class="title"><?php echo esc_html(__('Cache Information', 'esolleso-daily-bible-reading-plan')); ?></h2> 412 412 <?php 413 413 $cached_days = 0; … … 418 418 } 419 419 ?> 420 <p><strong><?php echo esc_html(__('Cached Days:', ' bible-reading-plan')); ?></strong> <?php echo esc_html($cached_days); ?> / 365</p>421 <p><strong><?php echo esc_html(__('Cache Duration:', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('30 days', 'bible-reading-plan')); ?></p>422 <p><strong><?php echo esc_html(__('Storage:', ' bible-reading-plan')); ?></strong> <?php echo esc_html(__('WordPress database (shared across all users)', 'bible-reading-plan')); ?></p>420 <p><strong><?php echo esc_html(__('Cached Days:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html($cached_days); ?> / 365</p> 421 <p><strong><?php echo esc_html(__('Cache Duration:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('30 days', 'esolleso-daily-bible-reading-plan')); ?></p> 422 <p><strong><?php echo esc_html(__('Storage:', 'esolleso-daily-bible-reading-plan')); ?></strong> <?php echo esc_html(__('WordPress database (shared across all users)', 'esolleso-daily-bible-reading-plan')); ?></p> 423 423 </div> 424 424 </div> -
esolleso-daily-bible-reading-plan/trunk/includes/helpers.php
r3479297 r3479459 348 348 { 349 349 if (!is_array($data)) { 350 return new WP_Error('invalid_root', __('Root must be an array.', ' bibldare'));350 return new WP_Error('invalid_root', __('Root must be an array.', 'esolleso-daily-bible-reading-plan')); 351 351 } 352 352 … … 360 360 return new WP_Error( 361 361 'invalid_day', 362 sprintf(__('Day %d is out of range (1-366).', ' bibldare'), $day_key)362 sprintf(__('Day %d is out of range (1-366).', 'esolleso-daily-bible-reading-plan'), $day_key) 363 363 ); 364 364 } … … 367 367 return new WP_Error( 368 368 'empty_day', 369 sprintf(__('Day %d has no readings.', ' bibldare'), $day_key)369 sprintf(__('Day %d has no readings.', 'esolleso-daily-bible-reading-plan'), $day_key) 370 370 ); 371 371 } … … 378 378 return new WP_Error( 379 379 'invalid_reading', 380 sprintf(__('Reading %d on day %d is not an array.', ' bibldare'), $reading_idx + 1, $day_key)380 sprintf(__('Reading %d on day %d is not an array.', 'esolleso-daily-bible-reading-plan'), $reading_idx + 1, $day_key) 381 381 ); 382 382 } … … 387 387 return new WP_Error( 388 388 'invalid_book', 389 sprintf(__('Invalid bookIndex %d on day %d.', ' bibldare'), $book_index, $day_key)389 sprintf(__('Invalid bookIndex %d on day %d.', 'esolleso-daily-bible-reading-plan'), $book_index, $day_key) 390 390 ); 391 391 } … … 395 395 return new WP_Error( 396 396 'missing_chapters', 397 sprintf(__('No chapters defined for reading %d on day %d.', ' bibldare'), $reading_idx + 1, $day_key)397 sprintf(__('No chapters defined for reading %d on day %d.', 'esolleso-daily-bible-reading-plan'), $reading_idx + 1, $day_key) 398 398 ); 399 399 } … … 404 404 return new WP_Error( 405 405 'invalid_chapter', 406 sprintf(__('Chapter entry %d on day %d is malformed.', ' bibldare'), $chap_idx + 1, $day_key)406 sprintf(__('Chapter entry %d on day %d is malformed.', 'esolleso-daily-bible-reading-plan'), $chap_idx + 1, $day_key) 407 407 ); 408 408 } … … 413 413 return new WP_Error( 414 414 'invalid_chapter_num', 415 sprintf(__('Invalid chapter number %d on day %d.', ' bibldare'), $chapter, $day_key)415 sprintf(__('Invalid chapter number %d on day %d.', 'esolleso-daily-bible-reading-plan'), $chapter, $day_key) 416 416 ); 417 417 } -
esolleso-daily-bible-reading-plan/trunk/includes/shortcode.php
r3479283 r3479459 43 43 </svg> 44 44 </div> 45 <div class="days-panel-header-title"><?php echo esc_html(__('Our Reading Plan', ' bible-reading-plan')); ?></div>45 <div class="days-panel-header-title"><?php echo esc_html(__('Our Reading Plan', 'esolleso-daily-bible-reading-plan')); ?></div> 46 46 </div> 47 47 … … 85 85 <div class="bible-schedule-loader"> 86 86 <div class="spinner"></div> 87 <p><?php echo esc_html(__('loading', ' bible-reading-plan') . '...'); ?></p>87 <p><?php echo esc_html(__('loading', 'esolleso-daily-bible-reading-plan') . '...'); ?></p> 88 88 </div> 89 89 … … 287 287 288 288 if (!$schedule_data) { 289 wp_send_json_error(['message' => __('No schedule found for this day.', ' bible-reading-plan')]);289 wp_send_json_error(['message' => __('No schedule found for this day.', 'esolleso-daily-bible-reading-plan')]); 290 290 return; 291 291 } … … 336 336 <h3> 337 337 <span class="chapter-label"> 338 <?php echo esc_html(__('chapter', ' bible-reading-plan')); ?>338 <?php echo esc_html(__('chapter', 'esolleso-daily-bible-reading-plan')); ?> 339 339 </span> 340 340 <?php echo esc_html($chapterNumber); ?> … … 342 342 <?php if ($hasRange): ?> 343 343 <span class="chapter-range"> 344 (<?php echo esc_html(__('verses', ' bible-reading-plan')); ?>344 (<?php echo esc_html(__('verses', 'esolleso-daily-bible-reading-plan')); ?> 345 345 <?php echo esc_html($from); ?>-<?php echo esc_html($to); ?>) 346 346 </span> … … 363 363 <?php else: ?> 364 364 <p class="error-message"> 365 <?php echo esc_html__('No verses available for this chapter.' ); ?>365 <?php echo esc_html__('No verses available for this chapter.', 'esolleso-daily-bible-reading-plan'); ?> 366 366 </p> 367 367 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.