Plugin Directory

Changeset 3451500


Ignore:
Timestamp:
02/01/2026 04:56:14 PM (3 weeks ago)
Author:
gkanters
Message:

Fix generate meta description in admin

Location:
ai-translate/tags/2.2.3
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • ai-translate/tags/2.2.3/README.md

    r3451123 r3451500  
    11=== AI Translate ===
    22Contributors: gkanters 
    3 Tags: translation, artificial intelligence, seo, translate, ai translate 
     3Tags: translation, multilingual, woocommerce, seo, artificial intelligence, ai, ai translate
    44Requires at least: 5.0 
    55Tested up to: 6.9 
    66Stable tag: 2.2.3
    7 Requires PHP: 8.0.0
     7Requires PHP: 8.0
    88License: GPLv2 or later 
    99License URI: <https://www.gnu.org/licenses/gpl-2.0.html>
    1010Plugin homepage: https://wordpress.org/plugins/ai-translate
    11 = AI-powered plugin for automatic website translation in 35 languages. Boosts traffic and improves your SEO. =
    12 
    13 ## Short Description
    14 
    15 AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective.
     11= AI Translate for WordPress & WooCommerce. Multilingual SEO with translated slugs & 35+ languages. Fast caching, unique Tone of Voice & low AI costs. =
    1612
    1713## Description
  • ai-translate/tags/2.2.3/assets/admin-page.js

    r3438193 r3451500  
    580580            data.append('save_settings', '1');
    581581
    582             // Add checkbox values to save them during validation
    583             var stopTranslations = document.querySelector('input[name="ai_translate_settings[stop_translations_except_cache_invalidation]"]');
    584             if (stopTranslations) {
    585                 data.append('stop_translations_except_cache_invalidation', stopTranslations.checked ? '1' : '0');
    586             }
    587             var autoClear = document.querySelector('input[name="ai_translate_settings[auto_clear_pages_on_menu_update]"]');
    588             if (autoClear) {
    589                 data.append('auto_clear_pages_on_menu_update', autoClear.checked ? '1' : '0');
    590             }
    591             var multiDomain = document.querySelector('input[name="ai_translate_settings[multi_domain_caching]"]');
    592             if (multiDomain) {
    593                 data.append('multi_domain_caching', multiDomain.checked ? '1' : '0');
     582            var websiteContextField = document.getElementById('website_context_field');
     583            if (websiteContextField) {
     584                data.append('website_context', websiteContextField.value);
     585            }
     586
     587            var homepageMetaField = document.getElementById('homepage_meta_description_field');
     588            if (homepageMetaField) {
     589                data.append('homepage_meta_description', homepageMetaField.value);
     590            }
     591
     592            // Stuur multi_domain_caching mee zodat validate handler weet welke setting te gebruiken
     593            var multiDomainCheckbox = document.querySelector('input[name="ai_translate_settings[multi_domain_caching]"]');
     594            if (multiDomainCheckbox) {
     595                data.append('multi_domain_caching', multiDomainCheckbox.checked ? '1' : '0');
    594596            }
    595597
     
    893895    if (generalForm) {
    894896        generalForm.addEventListener('submit', function (e) {
    895             var apiUrl = document.querySelector('input[name="ai_translate_settings[api_url]"]');
    896897            var apiKey = document.querySelector('input[name="ai_translate_settings[api_key]"]');
    897898
     
    901902            });
    902903
    903             if (!apiUrl.value.trim() || !apiKey.value.trim()) {
     904            if (apiKey && !apiKey.value.trim()) {
    904905                var errorMsg = document.createElement('div');
    905906                errorMsg.className = 'error notice aitranslate-error';
    906                 errorMsg.innerHTML = '<p>Note: Enter both API URL and API Key to use translation functionality.</p>';
    907                 document.querySelector('#general').insertBefore(errorMsg, document.querySelector('#general form'));
     907                errorMsg.innerHTML = '<p>Note: Enter API Key to use translation functionality.</p>';
     908                var generalSection = document.querySelector('#general');
     909                if (generalSection) {
     910                    var formElement = generalSection.querySelector('form');
     911                    if (formElement) {
     912                        generalSection.insertBefore(errorMsg, formElement);
     913                    }
     914                }
    908915            }
    909916        });
     
    940947            formData.append('action', 'ai_translate_generate_website_context');
    941948            formData.append('nonce', aiTranslateAdmin.generateContextNonce);
     949           
     950            // Stuur actieve domain mee bij multi-domain caching
     951            var multiDomainCheckbox = document.querySelector('input[name="ai_translate_settings[multi_domain_caching]"]');
     952            if (multiDomainCheckbox && multiDomainCheckbox.checked) {
     953                // Bepaal actieve domain - gebruik altijd window.location.hostname
     954                // Dit voorkomt dat per ongeluk een cache directory pad wordt gepakt
     955                var activeDomain = window.location.hostname;
     956                // Verwijder poort als aanwezig
     957                if (activeDomain && activeDomain.indexOf(':') !== -1) {
     958                    activeDomain = activeDomain.split(':')[0];
     959                }
     960                if (activeDomain) {
     961                    formData.append('domain', activeDomain);
     962                }
     963            }
    942964
    943965            fetch(ajaxurl, {
     
    9861008                    if (generateContextStatus.innerHTML.includes('✓')) {
    9871009                        generateContextStatus.innerHTML = '';
     1010                    }
     1011                }, 5000);
     1012            });
     1013        });
     1014    }
     1015
     1016    /**
     1017     * Homepage Meta Description Generation Section
     1018     * Automatically generates homepage meta description from homepage content
     1019     */
     1020    var generateMetaBtn = document.getElementById('generate-meta-btn');
     1021    var generateMetaStatus = document.getElementById('generate-meta-status');
     1022    var homepageMetaField = document.getElementById('homepage_meta_description_field');
     1023
     1024    if (generateMetaBtn && generateMetaStatus && homepageMetaField) {
     1025        generateMetaBtn.addEventListener('click', function () {
     1026            // Check if API is configured
     1027            var apiKey = apiKeyInput ? apiKeyInput.value : '';
     1028            if (!apiKey) {
     1029                generateMetaStatus.innerHTML = '<span style="color:red;">Please configure API key first</span>';
     1030                return;
     1031            }
     1032
     1033            // Check if meta field is empty
     1034            if (homepageMetaField.value.trim()) {
     1035                if (!confirm('The meta description field already has content. Do you want to replace it with a generated suggestion?')) {
     1036                    return;
     1037                }
     1038            }
     1039
     1040            generateMetaBtn.disabled = true;
     1041            generateMetaStatus.innerHTML = '<span style="color:blue;">Generating meta description from homepage...</span>';
     1042
     1043            var formData = new FormData();
     1044            formData.append('action', 'ai_translate_generate_homepage_meta');
     1045            formData.append('nonce', aiTranslateAdmin.generateMetaNonce);
     1046           
     1047            // Stuur actieve domain mee bij multi-domain caching
     1048            var multiDomainCheckbox = document.querySelector('input[name="ai_translate_settings[multi_domain_caching]"]');
     1049            if (multiDomainCheckbox && multiDomainCheckbox.checked) {
     1050                // Bepaal actieve domain - gebruik altijd window.location.hostname
     1051                // Dit voorkomt dat per ongeluk een cache directory pad wordt gepakt
     1052                var activeDomain = window.location.hostname;
     1053                // Verwijder poort als aanwezig
     1054                if (activeDomain && activeDomain.indexOf(':') !== -1) {
     1055                    activeDomain = activeDomain.split(':')[0];
     1056                }
     1057                if (activeDomain) {
     1058                    formData.append('domain', activeDomain);
     1059                }
     1060            }
     1061
     1062            fetch(ajaxurl, {
     1063                method: 'POST',
     1064                credentials: 'same-origin',
     1065                body: formData
     1066            })
     1067            .then(response => {
     1068                if (!response.ok) {
     1069                    throw new Error('Server response was not ok: ' + response.status);
     1070                }
     1071                return response.json();
     1072            })
     1073            .then(function (data) {
     1074                if (data.success && data.data && data.data.meta) {
     1075                    homepageMetaField.value = data.data.meta;
     1076                    generateMetaStatus.innerHTML = '<span style="color:green;">✓ Meta description generated successfully!</span>';
     1077                   
     1078                    // Auto-save the form
     1079                    var form = homepageMetaField.closest('form');
     1080                    if (form) {
     1081                        var submitBtn = form.querySelector('input[type="submit"]');
     1082                        if (submitBtn) {
     1083                            submitBtn.click();
     1084                        }
     1085                    }
     1086                } else {
     1087                    var errorMsg = 'Failed to generate meta description';
     1088                    if (data.data && data.data.message) {
     1089                        errorMsg += ': ' + data.data.message;
     1090                    } else if (data.message) {
     1091                        errorMsg += ': ' + data.message;
     1092                    }
     1093                    generateMetaStatus.innerHTML = '<span style="color:red;">✗ ' + errorMsg + '</span>';
     1094                }
     1095            })
     1096            .catch(function (error) {
     1097                console.error('AJAX Error:', error);
     1098                generateMetaStatus.innerHTML = '<span style="color:red;">✗ Error generating meta description: ' + error.message + '</span>';
     1099            })
     1100            .finally(function () {
     1101                generateMetaBtn.disabled = false;
     1102               
     1103                // Clear status message after 5 seconds
     1104                setTimeout(function () {
     1105                    if (generateMetaStatus.innerHTML.includes('✓')) {
     1106                        generateMetaStatus.innerHTML = '';
    9881107                    }
    9891108                }, 5000);
  • ai-translate/tags/2.2.3/docs/readme-ar.po

    r3451123 r3451500  
    2626msgstr "إضافة مدعومة بالذكاء الاصطناعي للترجمة التلقائية للمواقع الإلكترونية بـ 35 لغة. تزيد من حركة المرور وتحسن محركات البحث لديك."
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "ترجمة مدعومة بالذكاء الاصطناعي لـ WordPress و WooCommerce. ترجم موقعك تلقائيًا بأكثر من 35 لغة بنبرة صوت علامتك التجارية الفريدة. تخزين مؤقت سريع وملائم لمحركات البحث وفعال من حيث التكلفة."
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-de_DE.po

    r3451123 r3451500  
    2626msgstr "KI-gestütztes Plugin für automatische Website-Übersetzung in 35 Sprachen. Steigert den Traffic und verbessert Ihre SEO."
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "KI-gestützte Übersetzung für WordPress & WooCommerce. Übersetzen Sie Ihre Website automatisch in 35+ Sprachen mit dem einzigartigen Ton Ihrer Marke. Schnelles Caching, SEO-freundlich und kosteneffektiv."
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-es_ES.po

    r3451123 r3451500  
    2424#. Short Description
    2525msgid "AI-powered plugin for automatic website translation in 35 languages. Boosts traffic and improves your SEO."
    26 msgstr "Plugin impulsado por IA para traducción automática de sitios web en 35 idiomas. Aumenta el tráfico y mejora tu SEO."
     26msgstr "Plugin impulsado por IA para la traducción automática de sitios web en 35 idiomas. Aumenta el tráfico y mejora tu posicionamiento SEO."
     27
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "Traducción con IA para WordPress y WooCommerce. Traduce automáticamente tu sitio a más de 35 idiomas, con el tono de voz único de tu marca. Caché rápida, optimizada para SEO y rentable."
    2731
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
    30 msgstr "AI Translate hace que tu sitio web de WordPress esté disponible automáticamente en 35+ idiomas. Aumenta tu alcance y mejora tu SEO sin trabajo manual."
     34msgstr "AI Translate hace que tu sitio web de WordPress esté disponible automáticamente en 35+ idiomas. Aumenta tu alcance y mejora tu posicionamiento SEO sin trabajo manual."
    3135
    3236msgid "AI Translate automatically translates your entire website using advanced artificial intelligence. The plugin translates pages, posts, titles, menus, and more in real-time or via smart caching."
     
    4044
    4145msgid "<strong>🎯 Smart AI Analysis</strong>\nThe AI first analyzes your website to understand what you do and how you communicate. This ensures translations are always tailored to your brand, terminology, and tone of voice."
    42 msgstr "<strong>🎯 Análisis inteligente de IA</strong>\nLa IA primero analiza tu sitio web para entender qué haces y cómo te comunicas. Esto asegura que las traducciones siempre estén adaptadas a tu marca, terminología y tono de voz."
     46msgstr "<strong>🎯 Análisis inteligente con IA</strong>\nLa IA analiza tu sitio web para entender qué haces y cómo te comunicas. Así, las traducciones se adaptan a tu marca, tu terminología y tu tono de voz."
    4347
    4448msgid "<strong>⚡ Intelligent Caching</strong>\nWith intelligent caching, your site runs fast, even with many translations. Translations are automatically updated when you change original content, without extra API costs."
    45 msgstr "<strong>⚡ Caché inteligente</strong>\nCon caché inteligente, tu sitio funciona rápido, incluso con muchas traducciones. Las traducciones se actualizan automáticamente cuando cambias el contenido original, sin costos adicionales de API."
     49msgstr "<strong>⚡ Caché inteligente</strong>\nCon caché inteligente, tu sitio funciona rápido, incluso con muchas traducciones. Las traducciones se actualizan automáticamente cuando cambias el contenido original, sin costes adicionales de la API."
    4650
    4751msgid "<strong>🌍 SEO-Friendly</strong>\nAutomatic hreflang tags, translated URL slugs, and proper indexing ensure search engines can properly index all language versions of your site."
     
    5862
    5963msgid "<strong>🌍 35+ Languages</strong> - Support for all major world languages and much more."
    60 msgstr "<strong>🌍 35+ Idiomas</strong> - Soporte para todos los principales idiomas del mundo y mucho más."
     64msgstr "<strong>🌍 35+ idiomas</strong> - Soporte para todos los principales idiomas del mundo y mucho más."
    6165
    6266msgid "<strong>⚡ Fast Caching</strong> - Intelligent cache for better performance and lower costs."
    63 msgstr "<strong>⚡ Caché rápida</strong> - Caché inteligente para mejor rendimiento y menores costos."
     67msgstr "<strong>⚡ Caché rápida</strong> - Caché inteligente para un mejor rendimiento y menores costes."
    6468
    6569msgid "<strong>🔄 Automatic Updates</strong> - Translations are automatically updated when content changes."
     
    7074
    7175msgid "<strong>🎨 Easy to Use</strong> - Simple language switcher in the left corner of your website."
    72 msgstr "<strong>🎨 Fácil de usar</strong> - Selector de idioma simple en la esquina izquierda de tu sitio web."
     76msgstr "<strong>🎨 Fácil de usar</strong> - Selector de idioma sencillo en la esquina izquierda de tu sitio web."
    7377
    7478msgid "<strong>🔧 Flexible</strong> - Choose your own AI model (OpenAI, Deepseek, or other APIs)."
     
    7680
    7781msgid "<strong>🔗 SEO-Friendly</strong> - Also translates URLs for better search engine optimization."
    78 msgstr "<strong>🔗 Optimizado para SEO</strong> - También traduce las URLs para una mejor optimización de motores de búsqueda."
     82msgstr "<strong>🔗 Optimizado para SEO</strong> - También traduce las URL para mejorar el posicionamiento en buscadores."
    7983
    8084msgid "Installation"
     
    100104
    101105msgid "AI Translate requires <strong>friendly permalinks</strong> to function properly. The plugin automatically sets your permalinks to the \"Post name\" structure (<code>/%postname%/</code>) during activation if they are currently set to \"Plain\". This is necessary for the language-prefixed URLs (e.g., <code>/de/</code>, <code>/en/</code>) to work correctly."
    102 msgstr "AI Translate requiere <strong>enlaces permanentes amigables</strong> para funcionar correctamente. El plugin establece automáticamente tus enlaces permanentes a la estructura \"Nombre de publicación\" (<code>/%postname%/</code>) durante la activación si actualmente están configurados en \"Simple\". Esto es necesario para que las URLs con prefijo de idioma (por ejemplo, <code>/de/</code>, <code>/en/</code>) funcionen correctamente."
     106msgstr "AI Translate requiere <strong>enlaces permanentes amigables</strong> para funcionar correctamente. El plugin establece automáticamente tus enlaces permanentes a la estructura \"Nombre de publicación\" (<code>/%postname%/</code>) durante la activación si actualmente están configurados en \"Simple\". Esto es necesario para que las URL con prefijo de idioma (por ejemplo, <code>/de/</code>, <code>/en/</code>) funcionen correctamente."
    103107
    104108msgid "If you manually change permalinks to \"Plain\" after activation, you will see a warning in the WordPress admin, and the language switching will not work as expected."
     
    109113
    110114msgid "What are the costs for using AI Translate?"
    111 msgstr "¿Cuáles son los costos de usar AI Translate?"
     115msgstr "¿Cuáles son los costes de usar AI Translate?"
    112116
    113117msgid "AI Translate is free to use, but you need an API key from an AI service provider like OpenAI or Deepseek. Costs depend on your usage and the provider you choose. At OpenAI, translating an average 500-word page costs approximately €0.01."
    114 msgstr "AI Translate es gratuito de usar, pero necesitas una clave API de un proveedor de servicios de IA como OpenAI o Deepseek. Los costos dependen de tu uso y del proveedor que elijas. En OpenAI, traducir una página promedio de 500 palabras cuesta aproximadamente €0,01."
     118msgstr "AI Translate es gratuito de usar, pero necesitas una clave API de un proveedor de servicios de IA como OpenAI o Deepseek. Los costes dependen de tu uso y del proveedor que elijas. En OpenAI, traducir una página promedio de 500 palabras cuesta aproximadamente €0,01."
    115119
    116120msgid "Which languages are supported?"
    117 msgstr "¿Qué idiomas están admitidos?"
     121msgstr "¿Qué idiomas se admiten?"
    118122
    119123msgid "AI Translate supports 35+ languages including Dutch, English, German, French, Spanish, Italian, Portuguese, Russian, Chinese, Japanese, Korean, Arabic, Hindi, Thai, Georgian, Swedish, Norwegian, Danish, Finnish, Polish, Czech, Greek, Romanian, and more."
     
    124128
    125129msgid "AI Translate uses a smart caching system that stores translations in WordPress and files. Translations are only regenerated when the original content changes. This saves API costs and improves your website speed."
    126 msgstr "AI Translate utiliza un sistema de caché inteligente que almacena las traducciones en WordPress y archivos. Las traducciones solo se regeneran cuando cambia el contenido original. Esto ahorra costos de API y mejora la velocidad de tu sitio web."
     130msgstr "AI Translate utiliza un sistema de caché inteligente que almacena las traducciones en WordPress y archivos. Las traducciones solo se regeneran cuando cambia el contenido original. Esto ahorra costes de la API y mejora la velocidad de tu sitio web."
    127131
    128132msgid "Does AI Translate work with all themes?"
     
    169173
    170174msgid "Translations are only updated when the original content changes. This happens automatically and prevents unnecessary API costs. You can also manually clear the cache via the admin settings."
    171 msgstr "Las traducciones solo se actualizan cuando cambia el contenido original. Esto sucede automáticamente y previene costos innecesarios de API. También puedes limpiar el caché manualmente a través de los ajustes de administración."
     175msgstr "Las traducciones solo se actualizan cuando cambia el contenido original. Esto sucede automáticamente y evita costes innecesarios de la API. También puedes limpiar el caché manualmente a través de los ajustes de administración."
    172176
    173177msgid "Is AI Translate SEO-friendly?"
     
    184188
    185189msgid "Not all languages can be translated with all models. So first make sure you use a model that supports the language. Another reason can be that the rewrite rules must be flushed when adding an new language. Disable and enable the plugin will do this."
    186 msgstr "No todos los idiomas se pueden traducir con todos los modelos. Por lo tanto, primero asegúrese de usar un modelo que admita el idioma. Otra razón puede ser que las reglas de reescritura deben vaciarse al agregar un nuevo idioma. Desactivar y activar el complemento hará esto."
     190msgstr "No todos los idiomas se pueden traducir con todos los modelos. Así que primero asegúrate de usar un modelo compatible con ese idioma. Otra causa puede ser que haya que vaciar las reglas de reescritura al añadir un nuevo idioma. Para hacerlo, desactiva y vuelve a activar el plugin."
    187191
    188192msgid "Can I customize the AI prompts?"
     
    319323
    320324msgid "🔗 Path-based language URLs for SEO"
    321 msgstr "🔗 URLs de idioma basadas en rutas para SEO"
     325msgstr "🔗 URL de idioma basadas en rutas para SEO"
    322326
    323327msgid "🚀 Support for more content types and translation improvements are in development"
     
    398402msgstr "Idioma del usuario administrador preferido sobre el idioma del sitio para la traducción de páginas de administración."
    399403
     404msgid "Implement partial caching of extremely large pages timing out on the API limits."
     405msgstr "Se implementó el caché parcial para páginas extremadamente grandes que agotaban el tiempo de espera debido a los límites de la API."
     406
    400407msgid "Support for Wordpress 6.9"
    401408msgstr "Soporte para WordPress 6.9"
     
    420427
    421428msgid "Added options for placing the Language switcher button on your site. "
    422 msgstr "Se agregaron opciones para colocar el botón del selector de idioma en su sitio. "
     429msgstr "Se agregaron opciones para colocar el botón del selector de idioma en tu sitio. "
    423430
    424431msgid "Implemented stop API calls in admin to avoid cost."
    425 msgstr "Se implementó la detención de llamadas API en el administrador para evitar costos."
     432msgstr "Se implementó la detención de llamadas a la API en el administrador para evitar costes."
    426433
    427434msgid "Improved caching and reduce API calls of UI elements."
    428 msgstr "Caché mejorado y reducción de llamadas API de elementos de la interfaz de usuario."
     435msgstr "Mejoras de caché y reducción de llamadas a la API en elementos de la interfaz de usuario."
    429436
    430437msgid "2.1.7"
     
    444451
    445452msgid "Improved UI caching of dynamic elements. "
    446 msgstr "Caché de UI mejorado para elementos dinámicos. "
     453msgstr "Mejora del caché de la interfaz de usuario en elementos dinámicos. "
    447454
    448455msgid "Dual caching strategy for object oriented caching implemented."
     
    459466
    460467msgid "Improved caching and reduce API calls of UI elements"
    461 msgstr "Caché mejorado y reducción de llamadas API de elementos de UI"
     468msgstr "Mejoras de caché y reducción de llamadas a la API en elementos de la interfaz de usuario"
    462469
    463470msgid "Fixed JS issue with speculationrules"
     
    537544
    538545msgid "Fix menu issues with translated URLs"
    539 msgstr "Corrección de problemas de menú con URLs traducidas"
     546msgstr "Corrección de problemas de menú con URL traducidas"
    540547
    541548msgid "Implemented translated open graph tags"
     
    558565
    559566msgid "Stable translated URLs: slugs only change if original changes"
    560 msgstr "URLs traducidas estables: los slugs solo cambian si cambia el original"
     567msgstr "URL traducidas estables: los slugs solo cambian si cambia el original"
    561568
    562569msgid "Added Greek and Romanian"
     
    609616
    610617msgid "Path-based language URLs for SEO"
    611 msgstr "URLs de idioma basadas en rutas para SEO"
     618msgstr "URL de idioma basadas en rutas para SEO"
    612619
    613620msgid "Transient cache clearing option"
  • ai-translate/tags/2.2.3/docs/readme-fr_FR.po

    r3451123 r3451500  
    2626msgstr "Plugin alimenté par l'IA pour la traduction automatique de sites web en 35 langues. Augmente le trafic et améliore votre référencement."
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "Traduction par IA pour WordPress et WooCommerce. Traduisez automatiquement votre site en 35+ langues avec le ton unique de votre marque. Cache rapide, optimisé SEO et économique."
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-hi_IN.po

    r3451123 r3451500  
    2626msgstr "35 भाषाओं में स्वचालित वेबसाइट अनुवाद के लिए AI-संचालित प्लगइन। ट्रैफ़िक बढ़ाता है और आपके SEO में सुधार करता है।"
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "WordPress और WooCommerce के लिए AI-संचालित अनुवाद। 35+ भाषाओं में अपनी साइट को अपने ब्रांड की अनोखी आवाज़ में स्वचालित रूप से अनुवादित करें। तेज़ कैशिंग, SEO-अनुकूल और लागत-प्रभावी।"
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-it_IT.po

    r3451123 r3451500  
    2626msgstr "Plugin alimentato da IA per la traduzione automatica di siti web in 35 lingue. Aumenta il traffico e migliora il tuo SEO."
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "Traduzione con IA per WordPress e WooCommerce. Traduci automaticamente il tuo sito in oltre 35 lingue con il tono di voce unico del tuo brand. Caching veloce, ottimizzato per SEO e conveniente."
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-ja_JP.po

    r3451123 r3451500  
    2626msgstr "35言語で自動ウェブサイト翻訳を可能にするAI搭載プラグイン。トラフィックを増やし、SEOを改善します。"
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "WordPress & WooCommerce向けのAI翻訳。35以上の言語でサイトを自動翻訳し、ブランドの独自のトーンで表現。高速キャッシュ、SEO対応、コスト効率に優れています。"
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-nl_NL.po

    r3451123 r3451500  
    1717msgstr "Korte beschrijving"
    1818
     19msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     20msgstr "AI-vertaling voor WordPress & WooCommerce. Vertaal uw site automatisch in 35+ talen met de unieke toon van uw merk. Snelle caching, SEO-vriendelijk en kosteneffectief."
     21
    1922msgid "Description"
    2023msgstr "Beschrijving"
     
    7477msgstr "Kan ik de AI-prompts aanpassen?"
    7578
    76 msgid ""
    77 "What's the difference between \"Enabled Languages\" and \"Detectable "
    78 "Languages\"?"
    79 msgstr ""
    80 "Wat is het verschil tussen \"Ingeschakelde talen\" en \"Detecteerbare "
    81 "talen\"?"
     79msgid "What's the difference between \"Enabled Languages\" and \"Detectable Languages\"?"
     80msgstr "Wat is het verschil tussen \"Ingeschakelde talen\" en \"Detecteerbare talen\"?"
    8281
    8382msgid "Configuration"
     
    120119msgstr "Changelog"
    121120
    122 msgid "2.2.0"
    123 msgstr "2.2.0"
    124 
    125 msgid "2.2.1"
    126 msgstr "2.2.1"
    127 
    128 msgid "2.1.2"
    129 msgstr "2.1.2"
    130 
    131 msgid "2.0.4"
    132 msgstr "2.0.4"
    133 
    134 msgid "2.0.1"
    135 msgstr "2.0.1"
     121msgid "2.2.3"
     122msgstr "2.2.3"
     123
     124
    136125
    137126msgid "1.34"
     
    153142msgstr "Verzorgd door"
    154143
    155 msgid ""
    156 "**🌐 Automatic Translation** - Pages, posts, and custom post types are "
    157 "automatically translated"
    158 msgstr ""
    159 "**🌐 Automatische Vertaling** - Pagina's, berichten en aangepaste "
    160 "berichttypen worden automatisch vertaald"
    161 
    162 msgid ""
    163 "**✨ Smart AI** - Generates a summary of your site for context-aware "
    164 "translations."
    165 msgstr ""
    166 "**✨ Slimme AI** - Genereert een samenvatting van uw site voor "
    167 "contextbewuste vertalingen."
    168 
    169 msgid ""
    170 "**🌍 35+ Languages** - Support for all major world languages and much more."
    171 msgstr ""
    172 "**🌍 35+ Talen** - Ondersteuning voor alle belangrijke wereldtalen en nog veel meer."
    173 
    174 msgid ""
    175 "**⚡ Fast Caching** - Intelligent cache for better performance and lower "
    176 "costs."
    177 msgstr ""
    178 "**⚡ Snelle Caching** - Intelligente cache voor betere prestaties en lagere "
    179 "kosten."
    180 
    181 msgid ""
    182 "**🔄 Automatic Updates** - Translations are automatically updated when "
    183 "content changes."
    184 msgstr ""
    185 
    186 msgid ""
    187 "**🍪 Remembers Preferences** - Saves each visitor's language preference (via "
    188 "cookies)."
    189 msgstr ""
    190 
    191 msgid ""
    192 "**🎨 Easy to Use** - Simple language switcher in the left corner of your "
    193 "website."
    194 msgstr ""
    195 
    196 msgid ""
    197 "**🔧 Flexible** - Choose your own AI model (OpenAI, Deepseek, or other APIs)."
    198 msgstr ""
    199 
    200 msgid ""
    201 "**🔗 SEO-Friendly** - Also translates URLs for better search engine "
    202 "optimization."
    203 msgstr ""
     144msgid "**🌐 Automatic Translation** - Pages, posts, and custom post types are automatically translated"
     145msgstr "**🌐 Automatische Vertaling** - Pagina's, berichten en aangepaste berichttypen worden automatisch vertaald"
     146
     147msgid "**✨ Smart AI** - Generates a summary of your site for context-aware translations."
     148msgstr "**✨ Slimme AI** - Genereert een samenvatting van uw site voor contextbewuste vertalingen."
     149
     150msgid "**🌍 35+ Languages** - Support for all major world languages and much more."
     151msgstr "**🌍 35+ Talen** - Ondersteuning voor alle belangrijke wereldtalen en nog veel meer."
     152
     153msgid "**⚡ Fast Caching** - Intelligent cache for better performance and lower costs."
     154msgstr "**⚡ Snelle Caching** - Intelligente cache voor betere prestaties en lagere kosten."
     155
     156msgid "**🔄 Automatic Updates** - Translations are automatically updated when content changes."
     157msgstr "**🔄 Automatische Updates** - Vertalingen worden automatisch bijgewerkt wanneer inhoud verandert."
     158
     159msgid "**🍪 Remembers Preferences** - Saves each visitor's language preference (via cookies)."
     160msgstr "**🍪 Onthoudt voorkeuren** - Slaat de taalvoorkeur van elke bezoeker op (via cookies)."
     161
     162msgid "**🎨 Easy to Use** - Simple language switcher in the left corner of your website."
     163msgstr "**🎨 Gebruiksvriendelijk** - Eenvoudige taalwisselaar in de linkerbenedenhoek van uw website."
     164
     165msgid "**🔧 Flexible** - Choose your own AI model (OpenAI, Deepseek, or other APIs)."
     166msgstr "**🔧 Flexibel** - Kies uw eigen AI-model (OpenAI, Deepseek of andere API's)."
     167
     168msgid "**🔗 SEO-Friendly** - Also translates URLs for better search engine optimization."
     169msgstr "**🔗 SEO-vriendelijk** - Vertaalt ook URL's voor betere zoekmachine-optimalisatie."
    204170
    205171msgid "Using a caching plugin like Jetpack, WP Rocket, or W3 Total Cache"
    206 msgstr ""
    207 "Een caching-plugin gebruiken zoals Jetpack, WP Rocket of W3 Total Cache"
     172msgstr "Een caching-plugin gebruiken zoals Jetpack, WP Rocket of W3 Total Cache"
    208173
    209174msgid "Configuring Memcached or Redis for database caching"
     
    213178msgstr "Cacheduur aanpassen op basis van hoe vaak u inhoud bijwerkt"
    214179
    215 msgid ""
    216 "**🔑 API Provider** - Select a provider of your AI translation API (e.g. "
    217 "OpenAI)"
    218 msgstr ""
    219 "**🔑 API Provider** - Selecteer een provider van uw AI vertaal API (bijv. "
    220 "OpenAI)"
     180msgid "**🔑 API Provider** - Select a provider of your AI translation API (e.g. OpenAI)"
     181msgstr "**🔑 API Provider** - Selecteer een provider van uw AI-vertaal-API (bijv. OpenAI)"
    221182
    222183msgid "**🔐 API Key** - Your API authentication key"
     
    232193msgstr "**🎯 Ingeschakelde Talen** - Talen zichtbaar in de taalwisselaar"
    233194
    234 msgid ""
    235 "**🔍 Detectable Languages** - Automatic translation on browser match, but not"
    236 " in switcher"
    237 msgstr ""
    238 "**🔍 Detecteerbare Talen** - Automatische vertaling bij browser overeenkomst,"
    239 " maar niet in wisselaar"
    240 
    241 msgid ""
    242 "**⏱️ Cache Duration (days)** - How long translated content stays cached"
    243 msgstr ""
    244 "**⏱️ Cache Duur (dagen)** - Hoe lang vertaalde inhoud gecached blijft"
    245 
    246 msgid ""
    247 "**🗑️ Cache Management** - Clear all cache, only transient cache, or cache "
    248 "per language"
    249 msgstr ""
    250 "**🗑️ Cache Beheer** - Wis alle cache, alleen tijdelijke cache, of cache "
    251 "per taal"
    252 
    253 msgid ""
    254 "**🔄 Automatic cache invalidation** - Cache is only refreshed on content "
    255 "changes"
    256 msgstr ""
    257 "**🔄 Automatische cache invalidatie** - Cache wordt alleen vernieuwd bij "
    258 "inhoudswijzigingen"
    259 
    260 msgid ""
    261 "**📄 Homepage Meta Description** - Set a custom meta description that will be"
    262 " automatically translated."
    263 msgstr ""
    264 
    265 msgid ""
    266 "**✨ Auto-generate site context** - Let the AI automatically analyze your "
    267 "site for better translations"
    268 msgstr ""
    269 
    270 msgid ""
    271 "**📁 Location** - Translations are cached in `/wp-content/uploads/ai-"
    272 "translate/cache/`"
    273 msgstr ""
     195msgid "**🔍 Detectable Languages** - Automatic translation on browser match, but not in switcher"
     196msgstr "**🔍 Detecteerbare Talen** - Automatische vertaling bij browserovereenkomst, maar niet in wisselaar"
     197
     198msgid "**⏱️ Cache Duration (days)** - How long translated content stays cached"
     199msgstr "**⏱️ Cacheduur (dagen)** - Hoe lang vertaalde inhoud gecached blijft"
     200
     201msgid "**🗑️ Cache Management** - Clear all cache, only transient cache, or cache per language"
     202msgstr "**🗑️ Cachebeheer** - Wis alle cache, alleen tijdelijke cache, of cache per taal"
     203
     204msgid "**🔄 Automatic cache invalidation** - Cache is only refreshed on content changes"
     205msgstr "**🔄 Automatische cache-invalidatie** - Cache wordt alleen vernieuwd bij inhoudswijzigingen"
     206
     207msgid "**📄 Homepage Meta Description** - Set a custom meta description that will be automatically translated."
     208msgstr "**📄 Homepage meta-beschrijving** - Stel een aangepaste meta-beschrijving in die automatisch wordt vertaald."
     209
     210msgid "**✨ Auto-generate site context** - Let the AI automatically analyze your site for better translations"
     211msgstr "**✨ Sitecontext automatisch genereren** - Laat de AI uw site automatisch analyseren voor betere vertalingen"
     212
     213msgid "**📁 Location** - Translations are cached in `/wp-content/uploads/ai-translate/cache/`"
     214msgstr "**📁 Locatie** - Vertalingen worden gecached in `/wp-content/uploads/ai-translate/cache/`"
    274215
    275216msgid "**🧹 Auto-cleanup** - Expired cache is automatically cleaned up"
    276 msgstr ""
     217msgstr "**🧹 Automatisch opruimen** - Verlopen cache wordt automatisch opgeruimd"
    277218
    278219msgid "**🔧 Manual clearing** - Clear cache manually via plugin settings"
    279 msgstr ""
     220msgstr "**🔧 Handmatig wissen** - Wis cache handmatig via plugininstellingen"
    280221
    281222msgid "**💡 OpenAI**: `gpt-4.1-mini`"
     
    283224
    284225msgid "**💰 Deepseek**: `deepseek-chat` - Langzamer, maar kosteneffectiever"
    285 
    286 msgid ""
    287 "**🔧 OpenRouter**: Select google/gemini-2.5-flash-lite which has the best "
    288 "price/performance"
    289 msgstr ""
    290 "**🔧 OpenRouter**: Selecteer google/gemini-2.5-flash-lite die de beste "
    291 "prijs/prestatie heeft"
    292 
    293 msgid ""
    294 "**💡 Groq**: Select LLama 3.1/8b which is fast and the cheapest option. It "
    295 "does not support all languages."
    296 msgstr ""
    297 "**💡 Groq**: Selecteer LLama 3.1/8b die snel is en de goedkoopste optie. Het "
    298 "ondersteunt niet alle talen."
     226msgstr "**💰 Deepseek**: `deepseek-chat` - Langzamer, maar kosteneffectiever"
     227
     228msgid "**🔧 OpenRouter**: Select google/gemini-2.5-flash-lite which has the best price/performance"
     229msgstr "**🔧 OpenRouter**: Selecteer google/gemini-2.5-flash-lite voor de beste prijs/prestatie"
     230
     231msgid "**💡 Groq**: Select LLama 3.1/8b which is fast and the cheapest option. It does not support all languages."
     232msgstr "**💡 Groq**: Selecteer LLama 3.1/8b die snel is en de goedkoopste optie. Ondersteunt niet alle talen."
    299233
    300234msgid "🔗 Path-based language URLs for SEO"
    301235msgstr "🔗 Pad-gebaseerde taal-URL's voor SEO"
    302236
    303 msgid ""
    304 "🚀 Support for more content types and translation improvements are in "
    305 "development"
    306 msgstr ""
    307 "🚀 Ondersteuning voor meer contenttypes en vertaalverbeteringen zijn in "
    308 "ontwikkeling"
     237msgid "🚀 Support for more content types and translation improvements are in development"
     238msgstr "🚀 Ondersteuning voor meer contenttypes en vertaalverbeteringen zijn in ontwikkeling"
    309239
    310240msgid "⚡ Caching and API optimization are continuously improved"
    311241msgstr "⚡ Caching en API-optimalisatie worden continu verbeterd"
    312242
    313 msgid ""
    314 "🔒 Only website content for translation is sent—no visitor IP or personal "
    315 "data"
    316 msgstr ""
    317 "🔒 Alleen website-inhoud voor vertaling wordt verzonden—geen bezoeker-IP of "
    318 "persoonlijke gegevens"
     243msgid "🔒 Only website content for translation is sent—no visitor IP or personal data"
     244msgstr "🔒 Alleen website-inhoud voor vertaling wordt verzonden—geen bezoeker-IP of persoonlijke gegevens"
    319245
    320246msgid "💾 All translations are cached locally; nothing is shared externally"
     
    348274msgstr "Probleem met zoeken dat taalcode niet behoudt opgelost."
    349275
    350 msgid ""
    351 "Improved validation of models, checking account and provider information."
    352 msgstr ""
    353 "Verbeterde validatie van modellen, controle van account- en "
    354 "providerinformatie."
     276msgid "Improved validation of models, checking account and provider information."
     277msgstr "Verbeterde validatie van modellen, controle van account- en providerinformatie."
    355278
    356279msgid "Dual caching strategy for object oriented caching implemented."
    357 msgstr ""
    358 "Dubbele cachingstrategie voor objectgeoriënteerde caching geïmplementeerd."
     280msgstr "Dubbele cachingstrategie voor objectgeoriënteerde caching geïmplementeerd."
    359281
    360282msgid "Support for multi domain caching."
     
    398320
    399321msgid "Fix race condition causing white pages for spiders/crawlers"
    400 msgstr ""
    401 "Race condition die witte pagina's veroorzaakt voor spiders/crawlers opgelost"
     322msgstr "Race condition die witte pagina's veroorzaakt voor spiders/crawlers opgelost"
    402323
    403324msgid "Fixed hreflang tags for default language"
     
    405326
    406327msgid "Fix issue SEO engine inject that might mess up already troubled HTML"
    407 msgstr ""
    408 "Probleem met SEO-engine injectie opgelost dat mogelijk al problematische "
    409 "HTML verstoort"
     328msgstr "Probleem met SEO-engine-injectie opgelost dat mogelijk al problematische HTML verstoort"
    410329
    411330msgid "More efficient merge of translated output resulting in faster load"
    412 msgstr ""
    413 "Efficiëntere merge van vertaalde output resulterend in snellere laadtijd"
     331msgstr "Efficiëntere merge van vertaalde output resulterend in snellere laadtijd"
    414332
    415333msgid "Detect untranslated text in cached pages and translated them"
     
    459377
    460378msgid "Stable translated URLs: slugs only change if original changes"
    461 msgstr ""
    462 "Stabiele vertaalde URL's: slugs veranderen alleen als origineel verandert"
     379msgstr "Stabiele vertaalde URL's: slugs veranderen alleen als origineel verandert"
    463380
    464381msgid "Added Greek and Romanian"
     
    538455
    539456msgid "🎯 Smart AI Analysis"
    540 msgstr ""
     457msgstr "🎯 Slimme AI-analyse"
    541458
    542459msgid "⚡ Intelligent Caching"
    543 msgstr ""
     460msgstr "⚡ Intelligente caching"
    544461
    545462msgid "🌍 SEO-Friendly"
    546 msgstr ""
     463msgstr "🌍 SEO-vriendelijk"
    547464
    548465msgid "🌐 Automatic Translation"
    549 msgstr ""
     466msgstr "🌐 Automatische vertaling"
    550467
    551468msgid "✨ Smart AI"
    552 msgstr ""
     469msgstr "✨ Slimme AI"
    553470
    554471msgid "🌍 35+ Languages"
    555 msgstr ""
     472msgstr "🌍 35+ talen"
    556473
    557474msgid "⚡ Fast Caching"
     
    559476
    560477msgid "🔄 Automatic Updates"
    561 msgstr ""
     478msgstr "🔄 Automatische updates"
    562479
    563480msgid "🍪 Remembers Preferences"
    564 msgstr ""
     481msgstr "🍪 Onthoudt voorkeuren"
    565482
    566483msgid "🎨 Easy to Use"
    567 msgstr ""
     484msgstr "🎨 Gebruiksvriendelijk"
    568485
    569486msgid "🔧 Flexible"
    570 msgstr ""
     487msgstr "🔧 Flexibel"
    571488
    572489msgid "🔗 SEO-Friendly"
    573 msgstr ""
     490msgstr "🔗 SEO-vriendelijk"
    574491
    575492msgid "Install the plugin"
     
    580497
    581498msgid "Configure"
    582 msgstr ""
     499msgstr "Configureren"
    583500
    584501msgid "Add API key"
    585 msgstr ""
     502msgstr "API-sleutel toevoegen"
    586503
    587504msgid "Tip for best performance"
    588 msgstr ""
     505msgstr "Tip voor beste prestaties"
    589506
    590507msgid "friendly permalinks"
    591 msgstr ""
     508msgstr "vriendelijke permalinks"
    592509
    593510msgid "Enabled Languages"
    594 msgstr ""
     511msgstr "Ingeschakelde talen"
    595512
    596513msgid "Detectable Languages"
    597 msgstr ""
     514msgstr "Detecteerbare talen"
    598515
    599516msgid "🔑 API Provider"
     
    601518
    602519msgid "🔐 API Key"
    603 msgstr ""
     520msgstr "🔐 API-sleutel"
    604521
    605522msgid "🤖 Translation Model"
    606 msgstr ""
     523msgstr "🤖 Vertaalmodel"
    607524
    608525msgid "🌍 Default Language"
    609 msgstr ""
     526msgstr "🌍 Standaardtaal"
    610527
    611528msgid "🎯 Enabled Languages"
    612 msgstr ""
     529msgstr "🎯 Ingeschakelde talen"
    613530
    614531msgid "🔍 Detectable Languages"
    615 msgstr ""
     532msgstr "🔍 Detecteerbare talen"
    616533
    617534msgid "⏱️ Cache Duration (days)"
    618 msgstr ""
     535msgstr "⏱️ Cacheduur (dagen)"
    619536
    620537msgid "🗑️ Cache Management"
    621 msgstr ""
     538msgstr "🗑️ Cachebeheer"
    622539
    623540msgid "🔄 Automatic cache invalidation"
    624 msgstr ""
     541msgstr "🔄 Automatische cache-invalidatie"
    625542
    626543msgid "📄 Homepage Meta Description"
    627 msgstr ""
     544msgstr "📄 Homepage meta-beschrijving"
    628545
    629546msgid "✨ Auto-generate site context"
    630 msgstr ""
     547msgstr "✨ Sitecontext automatisch genereren"
    631548
    632549msgid "📁 Location"
    633 msgstr ""
     550msgstr "📁 Locatie"
    634551
    635552msgid "🧹 Auto-cleanup"
    636 msgstr ""
     553msgstr "🧹 Automatisch opruimen"
    637554
    638555msgid "🔧 Manual clearing"
    639 msgstr ""
     556msgstr "🔧 Handmatig wissen"
    640557
    641558msgid "💡 OpenAI"
    642 msgstr ""
     559msgstr "💡 OpenAI"
    643560
    644561msgid "💰 Deepseek"
    645 msgstr ""
     562msgstr "💰 Deepseek"
    646563
    647564msgid "🔧 OpenRouter"
    648 msgstr ""
     565msgstr "🔧 OpenRouter"
    649566
    650567msgid "💡 Groq"
    651 msgstr ""
     568msgstr "💡 Groq"
    652569
    653570msgid "NetCare"
    654 msgstr ""
     571msgstr "NetCare"
    655572
    656573msgid "bash"
    657 msgstr ""
     574msgstr "bash"
    658575
    659576msgid "# Good: Sequential crawling with adequate delays"
    660 msgstr ""
     577msgstr "# Goed: sequentieel crawlen met voldoende pauzes"
    661578
    662579msgid "wget --spider --no-directories --delete-after --recursive --level=10 \\"
    663 msgstr ""
     580msgstr "wget --spider --no-directories --delete-after --recursive --level=10 \\"
    664581
    665582msgid "--wait=3 --random-wait --no-verbose --domains=$SITE --no-parent \\"
    666 msgstr ""
     583msgstr "--wait=3 --random-wait --no-verbose --domains=$SITE --no-parent \\"
    667584
    668585msgid "https://yoursite.com"
    669 msgstr ""
     586msgstr "https://yoursite.com"
     587
  • ai-translate/tags/2.2.3/docs/readme-pt_PT.po

    r3451123 r3451500  
    2626msgstr "Plugin alimentado por IA para tradução automática de sites em 35 idiomas. Aumenta o tráfego e melhora o seu SEO."
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "Tradução com IA para WordPress e WooCommerce. Traduza automaticamente o seu site em mais de 35 idiomas com o tom de voz único da sua marca. Cache rápido, otimizado para SEO e económico."
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/docs/readme-zh_CN.po

    r3451123 r3451500  
    2626msgstr "支持35种语言的自动网站翻译AI插件。增加流量并改善您的SEO。"
    2727
     28#. Short Description
     29msgid "AI-powered translation for WordPress & WooCommerce. Automatically translate your site in 35+ languages with your brand's unique tone of voice. Fast caching, SEO-friendly, and cost-effective."
     30msgstr "面向WordPress和WooCommerce的AI翻译。以您品牌的独特语气自动将您的网站翻译成35种以上语言。快速缓存、SEO友好且经济高效。"
     31
    2832#. Description
    2933msgid "AI Translate automatically makes your WordPress website available in 35+ languages. Increase your reach and improve your SEO without manual work."
  • ai-translate/tags/2.2.3/includes/admin-page.php

    r3450501 r3451500  
    804804    $requested_domain = isset($_POST['domain']) ? sanitize_text_field(wp_unslash($_POST['domain'])) : '';
    805805   
     806    // Als domain niet is meegestuurd maar multi-domain caching aan staat, bepaal actieve domain
     807    if (empty($requested_domain)) {
     808        $settings = get_option('ai_translate_settings', []);
     809        $multi_domain = isset($settings['multi_domain_caching']) ? (bool) $settings['multi_domain_caching'] : false;
     810        if ($multi_domain) {
     811            // Bepaal actieve domain op dezelfde manier als in de UI
     812            if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) {
     813                $requested_domain = sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST']));
     814                if (strpos($requested_domain, ':') !== false) {
     815                    $requested_domain = strtok($requested_domain, ':');
     816                }
     817            }
     818            if (empty($requested_domain) && isset($_SERVER['SERVER_NAME']) && !empty($_SERVER['SERVER_NAME'])) {
     819                $requested_domain = sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
     820            }
     821            if (empty($requested_domain)) {
     822                $requested_domain = parse_url(home_url(), PHP_URL_HOST);
     823                if (empty($requested_domain)) {
     824                    $requested_domain = 'default';
     825                }
     826            }
     827        }
     828    }
     829   
    806830    // Generate website context suggestion
    807831    $translator = AI_Translate_Core::get_instance();
     
    846870    $requested_domain = isset($_POST['domain']) ? sanitize_text_field(wp_unslash($_POST['domain'])) : '';
    847871   
     872    // Als domain niet is meegestuurd maar multi-domain caching aan staat, bepaal actieve domain
     873    if (empty($requested_domain)) {
     874        $settings = get_option('ai_translate_settings', []);
     875        $multi_domain = isset($settings['multi_domain_caching']) ? (bool) $settings['multi_domain_caching'] : false;
     876        if ($multi_domain) {
     877            // Bepaal actieve domain op dezelfde manier als in de UI
     878            if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) {
     879                $requested_domain = sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST']));
     880                if (strpos($requested_domain, ':') !== false) {
     881                    $requested_domain = strtok($requested_domain, ':');
     882                }
     883            }
     884            if (empty($requested_domain) && isset($_SERVER['SERVER_NAME']) && !empty($_SERVER['SERVER_NAME'])) {
     885                $requested_domain = sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
     886            }
     887            if (empty($requested_domain)) {
     888                $requested_domain = parse_url(home_url(), PHP_URL_HOST);
     889                if (empty($requested_domain)) {
     890                    $requested_domain = 'default';
     891                }
     892            }
     893        }
     894    }
     895   
    848896    // Generate meta description
    849897    $translator = AI_Translate_Core::get_instance();
     
    916964        plugin_dir_url(__DIR__) . 'assets/admin-page.js',
    917965        array('jquery'),
    918         '1.0.0',
     966        '1.0.3',
    919967        true
    920968    );
     
    11891237            }
    11901238
     1239            // Website context per-domain array: direct overname van $input als deze is gezet
     1240            // Dit is voor AJAX calls die direct de per-domain array updaten
     1241            if (isset($input['website_context_per_domain']) && is_array($input['website_context_per_domain'])) {
     1242                // AJAX/direct call: overschrijf per-domain array volledig
     1243                $sanitized['website_context_per_domain'] = [];
     1244                foreach ($input['website_context_per_domain'] as $domain => $context) {
     1245                    $sanitized['website_context_per_domain'][sanitize_text_field($domain)] = sanitize_textarea_field($context);
     1246                }
     1247            }
     1248           
    11911249            // Website context (per-domain when multi-domain caching is enabled)
     1250            // Dit is voor form submissions met een enkele website_context value
    11921251            if (isset($input['website_context'])) {
    11931252                if ($multi_domain) {
     
    12491308            } elseif (!isset($sanitized['switcher_position'])) {
    12501309                $sanitized['switcher_position'] = 'bottom-left';
    1251             }
    1252 
    1253             // Multi-domain caching toggle
    1254             // Bij formulier-submit: checkbox is aangevinkt als key bestaat, anders uitgevinkt
    1255             // Bij AJAX/partial update: alleen updaten als expliciet in input
    1256             if ($is_form_submit) {
    1257                 $sanitized['multi_domain_caching'] = isset($input['multi_domain_caching']);
    1258             } elseif (array_key_exists('multi_domain_caching', $input)) {
    1259                 $sanitized['multi_domain_caching'] = (bool) $input['multi_domain_caching'];
    1260             } elseif (!isset($sanitized['multi_domain_caching'])) {
    1261                 // Initialiseer als nog niet gezet
    1262                 $sanitized['multi_domain_caching'] = false;
    12631310            }
    12641311
     
    24422489        // Als validatie succesvol is, sla settings op
    24432490        if (isset($_POST['save_settings']) && $_POST['save_settings'] === '1') {
     2491            // Zorg dat we de meest recente settings uit de database lezen
     2492            wp_cache_delete('ai_translate_settings', 'options');
     2493            wp_cache_delete('alloptions', 'options');
    24442494            $current_settings = get_option('ai_translate_settings', []);
     2495            if (!is_array($current_settings)) {
     2496                $current_settings = [];
     2497            }
    24452498           
    24462499            // Behoud alle bestaande instellingen - alleen API-gerelateerde velden worden geüpdatet
     
    24772530            }
    24782531
    2479             // Update checkbox waarden uit POST (indien meegegeven door JS)
    2480             // Dit zorgt ervoor dat als de gebruiker het vinkje verandert en dan valideert, de nieuwe waarde wordt opgeslagen
    2481             if (isset($_POST['stop_translations_except_cache_invalidation'])) {
    2482                 $updated_settings['stop_translations_except_cache_invalidation'] = $_POST['stop_translations_except_cache_invalidation'] === '1';
    2483             }
    2484             if (isset($_POST['auto_clear_pages_on_menu_update'])) {
    2485                 $updated_settings['auto_clear_pages_on_menu_update'] = $_POST['auto_clear_pages_on_menu_update'] === '1';
    2486             }
    2487             if (isset($_POST['multi_domain_caching'])) {
    2488                 $updated_settings['multi_domain_caching'] = $_POST['multi_domain_caching'] === '1';
     2532            // Website context opslaan tijdens validate (per domain bij multi-domain caching)
     2533            if (isset($_POST['website_context'])) {
     2534                $website_context = sanitize_textarea_field(wp_unslash($_POST['website_context']));
     2535                // Gebruik de waarde uit POST (formulier) in plaats van database, zodat we de meest actuele waarde hebben
     2536                $multi_domain = false;
     2537                if (isset($_POST['multi_domain_caching'])) {
     2538                    $multi_domain = $_POST['multi_domain_caching'] === '1';
     2539                    // Update ook de setting in $updated_settings voor consistentie
     2540                    $updated_settings['multi_domain_caching'] = $multi_domain;
     2541                } elseif (isset($updated_settings['multi_domain_caching'])) {
     2542                    // Fallback naar database waarde als niet in POST
     2543                    $multi_domain = (bool) $updated_settings['multi_domain_caching'];
     2544                }
     2545                if ($multi_domain) {
     2546                    $active_domain = '';
     2547                    if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) {
     2548                        $active_domain = sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST']));
     2549                        if (strpos($active_domain, ':') !== false) {
     2550                            $active_domain = strtok($active_domain, ':');
     2551                        }
     2552                    }
     2553                    if (empty($active_domain) && isset($_SERVER['SERVER_NAME']) && !empty($_SERVER['SERVER_NAME'])) {
     2554                        $active_domain = sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
     2555                    }
     2556                    if (empty($active_domain)) {
     2557                        $active_domain = parse_url(home_url(), PHP_URL_HOST);
     2558                        if (empty($active_domain)) {
     2559                            $active_domain = 'default';
     2560                        }
     2561                    }
     2562                    // Kopieer bestaande website_context_per_domain van current_settings als die niet bestaat in updated_settings
     2563                    if (!isset($updated_settings['website_context_per_domain']) || !is_array($updated_settings['website_context_per_domain'])) {
     2564                        $updated_settings['website_context_per_domain'] = isset($current_settings['website_context_per_domain']) && is_array($current_settings['website_context_per_domain'])
     2565                            ? $current_settings['website_context_per_domain']
     2566                            : [];
     2567                    }
     2568                    $updated_settings['website_context_per_domain'][$active_domain] = $website_context;
     2569                    // BELANGRIJK: Verwijder de oude website_context key zodat de sanitize_callback
     2570                    // de nieuwe per-domain waarde niet overschrijft met de oude single-domain waarde
     2571                    unset($updated_settings['website_context']);
     2572                } else {
     2573                    $updated_settings['website_context'] = $website_context;
     2574                    // Verwijder per-domain array als we terug naar single-domain gaan
     2575                    unset($updated_settings['website_context_per_domain']);
     2576                }
     2577            }
     2578
     2579            // Homepage meta description opslaan tijdens validate (per domain bij multi-domain caching)
     2580            if (isset($_POST['homepage_meta_description'])) {
     2581                $homepage_meta_description = sanitize_textarea_field(wp_unslash($_POST['homepage_meta_description']));
     2582                // Gebruik de waarde uit POST (formulier) in plaats van database, zodat we de meest actuele waarde hebben
     2583                $multi_domain = false;
     2584                if (isset($_POST['multi_domain_caching'])) {
     2585                    $multi_domain = $_POST['multi_domain_caching'] === '1';
     2586                } elseif (isset($updated_settings['multi_domain_caching'])) {
     2587                    // Fallback naar database waarde als niet in POST
     2588                    $multi_domain = (bool) $updated_settings['multi_domain_caching'];
     2589                }
     2590                if ($multi_domain) {
     2591                    $active_domain = '';
     2592                    if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) {
     2593                        $active_domain = sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST']));
     2594                        if (strpos($active_domain, ':') !== false) {
     2595                            $active_domain = strtok($active_domain, ':');
     2596                        }
     2597                    }
     2598                    if (empty($active_domain) && isset($_SERVER['SERVER_NAME']) && !empty($_SERVER['SERVER_NAME'])) {
     2599                        $active_domain = sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
     2600                    }
     2601                    if (empty($active_domain)) {
     2602                        $active_domain = parse_url(home_url(), PHP_URL_HOST);
     2603                        if (empty($active_domain)) {
     2604                            $active_domain = 'default';
     2605                        }
     2606                    }
     2607                    // Kopieer bestaande homepage_meta_description_per_domain van current_settings als die niet bestaat in updated_settings
     2608                    if (!isset($updated_settings['homepage_meta_description_per_domain']) || !is_array($updated_settings['homepage_meta_description_per_domain'])) {
     2609                        $updated_settings['homepage_meta_description_per_domain'] = isset($current_settings['homepage_meta_description_per_domain']) && is_array($current_settings['homepage_meta_description_per_domain'])
     2610                            ? $current_settings['homepage_meta_description_per_domain']
     2611                            : [];
     2612                    }
     2613                    $updated_settings['homepage_meta_description_per_domain'][$active_domain] = $homepage_meta_description;
     2614                    // BELANGRIJK: Verwijder de oude homepage_meta_description key zodat de sanitize_callback
     2615                    // de nieuwe per-domain waarde niet overschrijft met de oude single-domain waarde
     2616                    unset($updated_settings['homepage_meta_description']);
     2617                } else {
     2618                    $updated_settings['homepage_meta_description'] = $homepage_meta_description;
     2619                    // Verwijder per-domain array als we terug naar single-domain gaan
     2620                    unset($updated_settings['homepage_meta_description_per_domain']);
     2621                }
    24892622            }
    24902623
    24912624            // Sla de instellingen op via update_option
    2492             // De sanitize_callback behoudt automatisch alle checkbox-waarden en andere instellingen
    2493             // die niet in $updated_settings staan
    24942625            update_option('ai_translate_settings', $updated_settings);
    24952626        }
  • ai-translate/tags/2.2.3/includes/class-ai-translate-core.php

    r3451123 r3451500  
    162162                ],
    163163            ];
    164             // Chat test: one cap for all providers (OpenAI/OpenRouter require minimum 16)
    165             $chatTestMaxTokens = 32;
    166             // Newer models (gpt-5.x, o1-series, o3-series) use max_completion_tokens; others use max_tokens
    167             // DeepSeek v3.2 doesn't require either (per documentation)
    168             if (str_starts_with($model, 'gpt-5') || str_starts_with($model, 'o1-') || str_starts_with($model, 'o3-')) {
    169                 $chatBody['max_completion_tokens'] = $chatTestMaxTokens;
    170                 // GPT-5 models: use minimal reasoning for fast validation
    171                 if (str_starts_with($model, 'gpt-5')) {
    172                     $chatBody['reasoning_effort'] = 'minimal';
    173                 }
    174             } elseif (!str_starts_with($model, 'deepseek/deepseek-v3')) {
    175                 $chatBody['max_tokens'] = $chatTestMaxTokens;
    176                 $chatBody['temperature'] = 0;
    177             }
     164            // Chat test: ruime limiet voor alle models inclusief reasoning models
     165            $chatBody['max_completion_tokens'] = 10000;
    178166            $chatResp = wp_remote_post($chatEndpoint, [
    179167                'headers' => $chatHeaders,
     
    365353
    366354    /**
    367      * Clear only disk-based language caches (HTML artifacts) and preserve menu and slug caches.
     355     * Clear only disk-based language caches (HTML artifacts) for this site and preserve menu and slug caches.
    368356     * Does not touch transients or object cache.
     357     * Clears only the site-specific cache dir (e.g. cache/netcare.nl) using this WordPress site's home host,
     358     * so the correct dir is cleared regardless of whether admin is opened via www or non-www.
    369359     *
    370360     * @return void
     
    374364        $uploads = wp_upload_dir();
    375365        $root = trailingslashit($uploads['basedir']) . 'ai-translate/cache/';
    376        
    377         // Add site-specific directory if multi-domain caching is enabled
    378         $site_dir = $this->get_site_cache_dir();
     366
     367        $site_dir = $this->get_site_cache_dir_for_clearing();
    379368        if (!empty($site_dir)) {
    380369            $root = trailingslashit($root) . $site_dir . '/';
    381370        }
    382        
     371
    383372        if (!is_dir($root)) {
    384373            \AITranslate\AI_Cache_Meta::delete_by_path_prefix($root);
     
    398387        }
    399388        \AITranslate\AI_Cache_Meta::delete_by_path_prefix($root);
     389    }
     390
     391    /**
     392     * Site cache subdir name for clearing: based on this WordPress site's home URL host.
     393     * Ensures we clear the correct dir (e.g. netcare.nl) even when admin is opened via www.netcare.nl.
     394     *
     395     * @return string
     396     */
     397    private function get_site_cache_dir_for_clearing()
     398    {
     399        $settings = get_option('ai_translate_settings', []);
     400        $multi_domain = isset($settings['multi_domain_caching']) ? (bool) $settings['multi_domain_caching'] : false;
     401
     402        if (!$multi_domain) {
     403            return '';
     404        }
     405
     406        $host = parse_url(home_url(), PHP_URL_HOST);
     407        if (empty($host)) {
     408            return 'default';
     409        }
     410        $sanitized = sanitize_file_name($host);
     411        return empty($sanitized) ? 'default' : $sanitized;
    400412    }
    401413
     
    10021014                ];
    10031015
    1004                 // Model specific params (consistent with Batch class)
    1005                 if (str_starts_with($model, 'gpt-5') || str_starts_with($model, 'o1-') || str_starts_with($model, 'o3-') || str_starts_with($model, 'deepseek/deepseek-v3')) {
    1006                      $body['max_completion_tokens'] = 500;
    1007                 } else {
    1008                      $body['max_tokens'] = 500;
    1009                      $body['temperature'] = 0.3;
    1010                 }
     1016                // Token limits - ruime limiet voor alle models (je betaalt alleen wat je gebruikt)
     1017                $body['max_completion_tokens'] = 16000;
    10111018
    10121019                $headers = [
     
    11601167                ];
    11611168
    1162                 // Model specific params
    1163                 if (str_starts_with($model, 'gpt-5') || str_starts_with($model, 'o1-') || str_starts_with($model, 'o3-') || str_starts_with($model, 'deepseek/deepseek-v3')) {
    1164                      $body['max_completion_tokens'] = 300;
    1165                 } else {
    1166                      $body['max_tokens'] = 300;
    1167                      $body['temperature'] = 0.7;
    1168                 }
     1169                // Token limits - ruime limiet voor alle models (je betaalt alleen wat je gebruikt)
     1170                $body['max_completion_tokens'] = 16000;
    11691171
    11701172                $headers = [
     
    11891191                $response = wp_remote_post($endpoint, [
    11901192                    'headers' => $headers,
    1191                     'timeout' => 30,
     1193                    'timeout' => 45,
    11921194                    'sslverify' => true,
    11931195                    'body' => wp_json_encode($body),
    11941196                ]);
    11951197
    1196                 if (!is_wp_error($response) && wp_remote_retrieve_response_code($response) === 200) {
    1197                     $data = json_decode(wp_remote_retrieve_body($response), true);
    1198                     if (isset($data['choices'][0]['message']['content'])) {
    1199                         $meta = trim($data['choices'][0]['message']['content']);
    1200                         $meta = str_replace(["```json", "```JSON", "```"], '', $meta);
    1201                         $meta = strip_tags($meta);
    1202                         return $meta;
    1203                     }
    1204                 }
     1198                if (is_wp_error($response)) {
     1199                    throw new \Exception('API request failed: ' . $response->get_error_message());
     1200                }
     1201               
     1202                $response_code = wp_remote_retrieve_response_code($response);
     1203                if ($response_code !== 200) {
     1204                    $response_body = wp_remote_retrieve_body($response);
     1205                    throw new \Exception('API returned error code ' . $response_code . ': ' . $response_body);
     1206                }
     1207               
     1208                $response_body = wp_remote_retrieve_body($response);
     1209                $data = json_decode($response_body, true);
     1210               
     1211                if (!isset($data['choices'][0]['message']['content'])) {
     1212                    throw new \Exception('Invalid API response: missing content in choices');
     1213                }
     1214               
     1215                $meta = trim($data['choices'][0]['message']['content']);
     1216                $meta = str_replace(["```json", "```JSON", "```"], '', $meta);
     1217                $meta = strip_tags($meta);
     1218                $meta = trim($meta);
     1219               
     1220                if (empty($meta)) {
     1221                    throw new \Exception('API returned empty meta description');
     1222                }
     1223               
     1224                return $meta;
    12051225            } catch (\Exception $e) {
    1206                 // Fall through
    1207             }
    1208         }
    1209 
    1210         // 4. Fallback
    1211         return mb_substr($content, 0, 160);
     1226                // Re-throw exception so AJAX handler can show proper error message
     1227                throw $e;
     1228            }
     1229        }
     1230
     1231        // 4. Fallback only if AI is not configured
     1232        if ($provider === '' || $model === '' || $apiKey === '' || $baseUrl === '') {
     1233            return mb_substr($content, 0, 160);
     1234        }
     1235       
     1236        // If AI is configured but failed, throw exception instead of using fallback
     1237        throw new \Exception('AI generation failed but no error was caught');
    12121238    }
    12131239}
Note: See TracChangeset for help on using the changeset viewer.