<?php
if (!defined('ABSPATH')) exit;

class AIIO_I18n {
    public static function load() {
        // WordPress.org loads translations from /languages automatically (WP 4.6+).
    }

    public static function js_strings() {
        return [
            'loading' => __('Loading...', 'pewit-ai-image-optimizer'),
            'upgrade' => __('Managed support', 'pewit-ai-image-optimizer'),
            'upgradePro' => __('Managed support', 'pewit-ai-image-optimizer'),
            'automationLocked' => __('Bulk optimize, WebP, AVIF and backups are all included for free.', 'pewit-ai-image-optimizer'),
            'scanning' => __('Scanning media library...', 'pewit-ai-image-optimizer'),
            'scanDone' => __('Scan complete.', 'pewit-ai-image-optimizer'),
            'scanFailed' => __('Scan failed.', 'pewit-ai-image-optimizer'),
            'preview' => __('Preview', 'pewit-ai-image-optimizer'),
            'previewing' => __('Generating preview...', 'pewit-ai-image-optimizer'),
            'previewReady' => __('Preview ready — review savings before applying.', 'pewit-ai-image-optimizer'),
            'previewFailed' => __('Preview failed.', 'pewit-ai-image-optimizer'),
            'applyDone' => __('Optimization applied.', 'pewit-ai-image-optimizer'),
            'applyFailed' => __('Apply failed.', 'pewit-ai-image-optimizer'),
            'before' => __('Before', 'pewit-ai-image-optimizer'),
            'after' => __('After', 'pewit-ai-image-optimizer'),
            'saved' => __('Saved', 'pewit-ai-image-optimizer'),
            'webpSidecar' => __('WebP sidecar preview', 'pewit-ai-image-optimizer'),
            'quality' => __('Quality', 'pewit-ai-image-optimizer'),
            'avifSidecar' => __('AVIF sidecar preview', 'pewit-ai-image-optimizer'),
            'av1Sidecar' => __('AV1 WebM sidecar preview', 'pewit-ai-image-optimizer'),
            'noSavings' => __('This image may already be well compressed.', 'pewit-ai-image-optimizer'),
            'optimized' => __('Optimized', 'pewit-ai-image-optimizer'),
            'rollback' => __('Rollback', 'pewit-ai-image-optimizer'),
            'rollbackConfirm' => __('Restore the original file from backup?', 'pewit-ai-image-optimizer'),
            'rollbackDone' => __('Image restored from backup.', 'pewit-ai-image-optimizer'),
            'rollbackFailed' => __('Rollback failed.', 'pewit-ai-image-optimizer'),
            'bulkConfirm' => __('Start bulk optimization for ', 'pewit-ai-image-optimizer'),
            'bulkConfirmEnd' => __(' images?', 'pewit-ai-image-optimizer'),
            'jobStarted' => __('Background job started.', 'pewit-ai-image-optimizer'),
            'jobFailed' => __('Could not start job.', 'pewit-ai-image-optimizer'),
            'jobCancelled' => __('Job cancelled.', 'pewit-ai-image-optimizer'),
            'cancelFailed' => __('Could not cancel job.', 'pewit-ai-image-optimizer'),
            'saveDone' => __('Settings saved.', 'pewit-ai-image-optimizer'),
            'saveFailed' => __('Could not save settings.', 'pewit-ai-image-optimizer'),
            'noResults' => __('No heavy images found for the current threshold.', 'pewit-ai-image-optimizer'),
            'noBulk' => __('No optimizable images in the list.', 'pewit-ai-image-optimizer'),
            'noJobs' => __('No jobs yet. Start one from the Images tab.', 'pewit-ai-image-optimizer'),
            'status' => __('Status', 'pewit-ai-image-optimizer'),
            'progress' => __('Progress', 'pewit-ai-image-optimizer'),
            'none' => __('None', 'pewit-ai-image-optimizer'),
        ];
    }
}
