admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'image_ai_seo_nonce' ), 'licenseUrl' => admin_url( 'admin.php?page=altimo&tab=license' ), // 2.2.1: the header badges switch at the same balance as on the server. 'credits' => array( 'lowThreshold' => Image_AI_SEO_Credit_Handler::LOW_CREDITS_THRESHOLD, ), // 2.2.0: whether the one-time automatic AI suggestion of the Welcome // settings is still due; the Welcome tab starts it when it opens. 'siteProfile' => array( 'autoRun' => Image_AI_SEO_Site_Profile::is_auto_run_due(), ), 'strings' => array( 'success' => __( 'Changes saved!', 'altimo' ), 'error' => __( 'Error saving.', 'altimo' ), 'emptyKey' => __( 'Please enter an API key.', 'altimo' ), 'connectionError' => __( 'Connection error. Please try again later.', 'altimo' ), 'settingsSaved' => __( 'Settings saved successfully.', 'altimo' ), 'settingsError' => __( 'Error saving settings.', 'altimo' ), 'remainingCredits' => __( 'Remaining credits', 'altimo' ), 'optimizing' => __( 'Optimizing...', 'altimo' ), 'startBulkOptimization' => __( 'Start Bulk Optimization', 'altimo' ), 'allImagesOptimized' => __( 'All images optimized', 'altimo' ), // translators: 1: number of images to optimize, 2: number of credits that will be used (same as %1$d), 3: number of credits currently available. Replaced client-side. 'bulkCreditInfo' => __( 'Optimizing %1$d images will use %2$d credits. You have %3$d credits.', 'altimo' ), 'bulkCreditInsufficient' => __( 'Warning: Not enough credits for all images!', 'altimo' ), 'noImagesToOptimize' => __( 'No images to optimize.', 'altimo' ), 'bulkOptimizationError' => __( 'Error during bulk optimization.', 'altimo' ), 'bulkOptimizationComplete' => __( 'All images have been optimized successfully!', 'altimo' ), // translators: %d: current image number, %total: total number of images in the run (replaced client-side, not via sprintf). 'optimizingImage' => __( 'Optimizing image %d of %total', 'altimo' ), // D-14: Fortsetzen eines unterbrochenen Bulk-Laufs. 'bulkOptimizationResumed' => __( 'Resuming interrupted run…', 'altimo' ), // UAT-Entscheidung "Erst fragen, dann fortsetzen": ein unterbrochener Lauf wird // beim Seitenaufruf NICHT mehr stillschweigend fortgesetzt. Jedes fortgesetzte // Bild kostet einen Credit, also echtes Geld, und wer einen Lauf bewusst // abgebrochen hat, soll dafür nicht das Dashboard meiden müssen. // translators: %d: number of images still pending, %total: total number of images in the run. 'bulkResumePrompt' => __( 'Interrupted run found: %d of %total images still pending. Resume?', 'altimo' ), 'bulkResumeConfirm' => __( 'Resume run', 'altimo' ), 'bulkResumeDiscard' => __( 'Discard run', 'altimo' ), 'bulkResumeDiscarded' => __( 'The interrupted run was discarded. No further credits were used.', 'altimo' ), // D-10/CRED-03: bulk pre-flight truncation prompt. Shown when the // selection exceeds the known credit balance, so a run never aborts // mid-batch. Placeholders are replaced client-side via String.replace() // (%total = selected images, %remaining = available credits). // translators: %total: number of selected images, %remaining: number of available credits. 'bulkPreflightPrompt' => __( 'You selected %total images, but only have %remaining credits. Optimize as many as your credits allow?', 'altimo' ), // translators: %remaining: number of images that can be optimized with the available credits. 'bulkPreflightConfirm' => __( 'Optimize the first %remaining', 'altimo' ), 'bulkPreflightCancel' => __( 'Cancel', 'altimo' ), // CRED-02/D-06: no-credits upsell CTA on the bulk tab. Reuses the exact // "Buy more credits" label already rendered in dashboard-header.php. 'noCreditsUpsellMessage' => __( 'You have no credits remaining. Purchase more to continue optimizing your images.', 'altimo' ), 'buyMoreCredits' => __( 'Buy more credits', 'altimo' ), // CR-05: Bilder, die nach MAX_ATTEMPTS ausgemustert wurden, werden am Ende des // Laufs benannt statt bei jedem Seitenaufruf erneut versucht. 'bulkAttentionHeadline' => __( 'These images need your attention:', 'altimo' ), // translators: %d: attachment ID of the image that was retired from the run. 'bulkAttentionImage' => __( 'Image #%d could not be processed even after multiple attempts.', 'altimo' ), 'bulkNoticesHeadline' => __( 'Notices for this run:', 'altimo' ), /* * D-03: Ein Bild, das nicht verarbeitet werden konnte, bricht den Lauf nicht * mehr ab, sondern erscheint als Hinweis. Bewusst anders formuliert als die * Offload-Meldung aus D-13 ("wird extern gehostet ... wird weiterhin * optimiert", ein reiner Hinweis): dieser Fall benennt das betroffene Bild * und fordert den Nutzer ausdrücklich zum Nachsehen auf. */ // translators: %1$d: attachment ID of the image that was skipped; %2$s: reason why it needs attention. 'bulkImageSkipped' => __( 'Image #%1$d was skipped and needs your attention: %2$s', 'altimo' ), // History strings 'historyOptimize' => __( 'AI Optimization', 'altimo' ), 'historyManual' => __( 'Manual Edit', 'altimo' ), 'historyRevert' => __( 'Reverted', 'altimo' ), 'historyRestore' => __( 'Restored', 'altimo' ), 'historyRegenerate' => __( 'Regenerated', 'altimo' ), 'title' => __( 'Title', 'altimo' ), 'altText' => __( 'Alt-Text', 'altimo' ), 'filename' => __( 'Filename', 'altimo' ), 'revert' => __( 'Revert', 'altimo' ), 'restore' => __( 'Restore', 'altimo' ), 'regenerate' => __( 'Regenerate', 'altimo' ), 'reverted' => __( 'Reverted', 'altimo' ), 'processing' => __( 'Processing...', 'altimo' ), 'confirmRevert' => __( 'Are you sure you want to revert this change?', 'altimo' ), 'confirmRestore' => __( 'Are you sure you want to restore this change?', 'altimo' ), 'confirmRegenerate' => __( 'Are you sure you want to regenerate this image? This will use 1 credit.', 'altimo' ), // Batch and filter strings 'selected' => __( 'selected', 'altimo' ), // translators: %d: number of selected history entries to revert. 'confirmBatchRevert' => __( 'Are you sure you want to revert %d selected changes?', 'altimo' ), 'batchRevertSuccess' => __( 'Successfully reverted.', 'altimo' ), 'batchRevertError' => __( 'Error during batch revert.', 'altimo' ), 'noItemsSelected' => __( 'No items selected.', 'altimo' ), // Error messages 'errorInsufficientCredits' => __( 'Insufficient credits. Please purchase more credits to continue.', 'altimo' ), 'errorInvalidApiKey' => __( 'Invalid API key. Please check your license settings.', 'altimo' ), 'errorNetworkTimeout' => __( 'Network timeout. Please check your connection and try again.', 'altimo' ), 'errorInvalidImage' => __( 'Invalid image file. The file may be corrupted or unsupported.', 'altimo' ), 'errorFilenameExists' => __( 'A file with this name already exists. Please choose a different name.', 'altimo' ), 'errorImageNotFound' => __( 'Image not found. It may have been deleted.', 'altimo' ), 'errorGeneric' => __( 'An unexpected error occurred. Please try again.', 'altimo' ), // A-03: accessible activity-chart data table (visually hidden). 'activityDataHeading' => __( 'Activity data, last 7 days', 'altimo' ), 'activityDataDay' => __( 'Day', 'altimo' ), 'activityDataCount' => __( 'Optimizations', 'altimo' ), // Accessible name for the per-row history batch-select checkbox. 'selectHistoryItem' => __( 'Select this history entry', 'altimo' ), // Bulk run stopped by the consent gate (missing or outdated consent). 'consentRequired' => __( 'Please accept the data-processing notice before using this feature.', 'altimo' ), 'goToLicenseTab' => __( 'Go to License Tab', 'altimo' ), 'consentCheckboxRequired' => __( 'Please tick the consent checkbox first.', 'altimo' ), 'revokeConsent' => __( 'Revoke consent', 'altimo' ), // 2.2.0: AI suggestion of the Welcome settings. 'siteProfileAnalysing' => __( 'AI is analysing your site…', 'altimo' ), 'siteProfileInserted' => __( 'Suggestions inserted. Review them and click "Save Settings" to keep them.', 'altimo' ), 'siteProfileOverwrite' => __( 'The fields already contain text. Replace it with AI suggestions?', 'altimo' ), 'siteProfileReplace' => __( 'Replace with suggestions', 'altimo' ), 'siteProfileKeep' => __( 'Keep my text', 'altimo' ), ), ); } /** * Enqueues the header script that keeps the browser from scrolling to the * URL hash on page load. * * The hash is stored in window.imageAiSeoInitialHash for admin-dashboard.js * (tab deep links) and removed from the address bar. It must run in the * document head, before the page renders, so it is attached as an inline * script to a source-less handle printed in the header instead of being * echoed as a raw