abouzouzou Posted October 13, 2019 Share Posted October 13, 2019 Bonjour, quand j'essaie de traduire les emails ou alors d'autres module voici mon erreur : Could not crawl for translation files: The "/home/customer/www/mytacos-thonon.fr/public_html/var/cache/prod/themes/at_kola/translations" directory does not exist. Avez-vous une idée ? Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 La question est plutôt: le répertoire "/home/customer/www/mytacos-thonon.fr/public_html/var/cache/prod/themes/at_kola/translations" existe-t-il sur votre ftp ? Link to comment Share on other sites More sharing options...
abouzouzou Posted October 13, 2019 Author Share Posted October 13, 2019 Non justement comment le faire créer ? je ne comprend pas je n'ai jamais eu ce genre de problèmes auparavant avec mes autres installations ! Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 défaut du thème^^ Ajoutez ce répertoire depuis votre logiciel ftp ("ajouter un répertoire") Link to comment Share on other sites More sharing options...
abouzouzou Posted October 13, 2019 Author Share Posted October 13, 2019 juste le créer ? Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 Oui Link to comment Share on other sites More sharing options...
abouzouzou Posted October 13, 2019 Author Share Posted October 13, 2019 oui mais apres cela me dit no translations files not available alors que je tente juste de modifier les traductions de email ! Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 là on parlait du répertoire /cache Est ce que le répertoire /themes/at_kola/translations existe à la racine de votre site ? Link to comment Share on other sites More sharing options...
abouzouzou Posted October 13, 2019 Author Share Posted October 13, 2019 oui il existe Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 il a des sous-répertoires /fr, /en etc à l'intérieur ? Avez-vous également un répertoire /themes/at_kola/mails dans votre thème ? Link to comment Share on other sites More sharing options...
abouzouzou Posted October 13, 2019 Author Share Posted October 13, 2019 oui il ya quelques langues il y a FR car c'est ce que je veux mais seulement quelques fichiers /themes/at_kola/mails n'existe pas Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 ok. Copiez l'intégralité du répertoire /mails du thème par défaut dans votre thème Ensuite, videz votre cache Prestashop Link to comment Share on other sites More sharing options...
abouzouzou Posted October 13, 2019 Author Share Posted October 13, 2019 ok merci mais je vais devoir faire cela pour chacun des modules que je vais vouloir traduire ? la je suis en train de voir avec lui si au cas ou il n'aurait pas oublié des choses. ou installer en local pour voir si les repertoires ne se crééraient pas à ce moment la ? en tout cas un grand merci pour votre disponibilité Link to comment Share on other sites More sharing options...
Eolia Posted October 13, 2019 Share Posted October 13, 2019 Pour les modules c'est Prestashop qui doit les créer automatiquement lorsque l'on choisit une langue et un thème (du moins en 1.6, en 1.7 je ne veux même pas le savoir vu comme il ont modifié le truc) /** * Read the Post var and write the translation file. * This method overwrites the old translation file. * * @param bool $override_file Set true if this file is a override * * @throws PrestaShopException */ protected function writeTranslationFile($override_file = false) { $type = Tools::toCamelCase($this->type_selected, true); if (isset($this->translations_informations[$this->type_selected])) { $translation_informations = $this->translations_informations[$this->type_selected]; } else { return; } if ($override_file) { $file_path = $translation_informations['override']['dir'].$translation_informations['override']['file']; } else { $file_path = $translation_informations['dir'].$translation_informations['file']; } if ($file_path && !file_exists($file_path)) { if (!file_exists(dirname($file_path)) && !mkdir(dirname($file_path), 0777, true)) { throw new PrestaShopException(sprintf(Tools::displayError('Directory "%s" cannot be created'), dirname($file_path))); } elseif (!touch($file_path)) { throw new PrestaShopException(sprintf(Tools::displayError('File "%s" cannot be created'), $file_path)); } } $thm_name = str_replace('.', '', Tools::getValue('theme')); $kpi_key = substr(strtoupper($thm_name.'_'.Tools::getValue('lang')), 0, 16); if ($fd = fopen($file_path, 'w')) { // Get value of button save and stay $save_and_stay = Tools::isSubmit('submitTranslations'.$type.'AndStay'); // Get language $lang = strtolower(Tools::getValue('lang')); // Unset all POST which are not translations unset( $_POST['submitTranslations'.$type], $_POST['submitTranslations'.$type.'AndStay'], $_POST['lang'], $_POST['token'], $_POST['theme'], $_POST['type'] ); // Get all POST which aren't empty $to_insert = array(); foreach ($_POST as $key => $value) { if (!empty($value)) { $to_insert[$key] = $value; } } ConfigurationKPI::updateValue('FRONTOFFICE_TRANSLATIONS_EXPIRE', time()); ConfigurationKPI::updateValue('TRANSLATE_TOTAL_'.$kpi_key, count($_POST)); ConfigurationKPI::updateValue('TRANSLATE_DONE_'.$kpi_key, count($to_insert)); // translations array is ordered by key (easy merge) ksort($to_insert); $tab = $translation_informations['var']; fwrite($fd, "<?php\n\nglobal \$".$tab.";\n\$".$tab." = array();\n"); foreach ($to_insert as $key => $value) { fwrite($fd, '$'.$tab.'[\''.pSQL($key, true).'\'] = \''.pSQL($value, true).'\';'."\n"); } fwrite($fd, "\n?>"); fclose($fd); // Redirect if ($save_and_stay) { $this->redirect(true); } else { $this->redirect(); } } else { throw new PrestaShopException(sprintf(Tools::displayError('Cannot write this file: "%s"'), $file_path)); } } Link to comment Share on other sites More sharing options...
abouzouzou Posted October 14, 2019 Author Share Posted October 14, 2019 je suis en train de voir avec le developpeur du thème car j'ai pas trop envie de perdre du temps la dessus Link to comment Share on other sites More sharing options...
abouzouzou Posted October 15, 2019 Author Share Posted October 15, 2019 Donc apparement c'est une erreur de la version 1.7.6.0 qui a été corrigée dans la version 1.7.6.1 mais malheureusement c'est le site d'un client je peux pas lui dire de payer un module d'upgrade alors que l'erreur viens du CMS, avez vous une idée ? copier le repertoire mail est-il une bonne solution ? merci ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now