hermes1383 Posted August 17, 2013 Share Posted August 17, 2013 (edited) Bonjour à tous,je suis en train de développer une boutique sur PS 1.5.4.1, et j'ai un soucis de traduction sur le module "productcomments". Malgré le fait que toutes les entrées de traduction en français sont bien faites, il me garde : "Title is incorrect" et "Subject is incorrect" lorsqu'on ne remplit pas l'un où l'autre...Essayez sur vos versions, je l'ai moi même testé sur plusieurs boutiques, ainsi que le module en cours de développement. Comment faire ? Merci Edited October 10, 2013 by hermes1383 (see edit history) Link to comment Share on other sites More sharing options...
hermes1383 Posted August 25, 2013 Author Share Posted August 25, 2013 Personne d'autre n'a ce soucis ? Link to comment Share on other sites More sharing options...
Quokka Web Posted October 5, 2013 Share Posted October 5, 2013 Même souci de traduction... apparemment la clé de traduction recherchée n'est pas la bonne. PS cherche "$_MODULE['<{productcomments}prestashop>productcomments_7b0bf23ae4079e07a3a4cb4d07e2caef']" or la clé présente dans les fichiers de traduction est la suivante : "$_MODULE['<{productcomments}prestashop>default_7b0bf23ae4079e07a3a4cb4d07e2caef']". Est-ce qu'il y aurait possibilité de surcharger le fichier productcomments/controllers/front/default.php? Je vois la correction qu'il faut faire mais je voudrais ne pas modifier ce fichier directement. Link to comment Share on other sites More sharing options...
Quokka Web Posted October 6, 2013 Share Posted October 6, 2013 (edited) Finalement, j'ai contourné le problème. C'est pas une bonne façon de faire mais, au moins, ça permet de ne pas toucher aux fichiers sources du module productcomments. J'ai modifié le fichier themes/mon_theme/modules/productcomments/productcomments.tpl et j'ai ajouté un bloc caché avec les textes traduits. <div style="display: none"> {l s='ID product is incorrect' mod='productcomments'} {l s='Title is incorrect' mod='productcomments'} {l s='Comment is incorrect' mod='productcomments'} {l s='Customer name is incorrect' mod='productcomments'} {l s='You must be logged in order to send a comment' mod='productcomments'} {l s='You must give a rating' mod='productcomments'} {l s='Product not found' mod='productcomments'} </div> Vous pouvez le mettre où vous voulez. Personnellement, je l'ai mis dans le bloc #new_comment_form_content. Il faudra penser à traduire ces nouveaux messages dans le BackOffice. Edited October 6, 2013 by titchagcreation (see edit history) Link to comment Share on other sites More sharing options...
indesign47 Posted October 6, 2013 Share Posted October 6, 2013 Bonsoir, Fichier default.php (dossier modules/productcomments/controllers/front) Remplacer // Validation if (!Validate::isInt(Tools::getValue('id_product'))) $errors[] = $module_instance->l('ID product is incorrect'); if (!Tools::getValue('title') || !Validate::isGenericName(Tools::getValue('title'))) $errors[] = $module_instance->l('Title is incorrect'); if (!Tools::getValue('content') || !Validate::isMessage(Tools::getValue('content'))) $errors[] = $module_instance->l('Comment is incorrect'); if (!$id_customer && (!Tools::isSubmit('customer_name') || !Tools::getValue('customer_name') || !Validate::isGenericName(Tools::getValue('customer_name')))) $errors[] = $module_instance->l('Customer name is incorrect'); if (!$this->context->customer->id && !Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS')) $errors[] = $module_instance->l('You must be logged in order to send a comment'); if (!count(Tools::getValue('criterion'))) $errors[] = $module_instance->l('You must give a rating'); $product = new Product(Tools::getValue('id_product')); if (!$product->id) $errors[] = $module_instance->l('Product not found'); Par // Validation if (!Validate::isInt(Tools::getValue('id_product'))) $errors[] = $module_instance->l('ID product is incorrect', 'default'); if (!Tools::getValue('title') || !Validate::isGenericName(Tools::getValue('title'))) $errors[] = $module_instance->l('Title is incorrect', 'default'); if (!Tools::getValue('content') || !Validate::isMessage(Tools::getValue('content'))) $errors[] = $module_instance->l('Comment is incorrect', 'default'); if (!$id_customer && (!Tools::isSubmit('customer_name') || !Tools::getValue('customer_name') || !Validate::isGenericName(Tools::getValue('customer_name')))) $errors[] = $module_instance->l('Customer name is incorrect', 'default'); if (!$this->context->customer->id && !Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS')) $errors[] = $module_instance->l('You must be logged in order to send a comment', 'default'); if (!count(Tools::getValue('criterion'))) $errors[] = $module_instance->l('You must give a rating', 'default'); $product = new Product(Tools::getValue('id_product')); if (!$product->id) $errors[] = $module_instance->l('Product not found', 'default'); Link to comment Share on other sites More sharing options...
Quokka Web Posted October 6, 2013 Share Posted October 6, 2013 (edited) Bonsoir indesign, Il faudrait que la solution que tu proposes (c'est exactement celle que j'avais en tête) soit prise en compte par l'équipe PS par contre il y a toujours le risque de perdre cette modification lors d'une mise à jour c'est pourquoi j'ai préféré modifié le thème. Edited October 6, 2013 by titchagcreation (see edit history) 1 Link to comment Share on other sites More sharing options...
indesign47 Posted October 7, 2013 Share Posted October 7, 2013 (edited) J'ai fait un pull-request ici et un autre ici et un autre ici Merci à maniT4c Edited October 7, 2013 by indesign (see edit history) 1 Link to comment Share on other sites More sharing options...
hermes1383 Posted October 10, 2013 Author Share Posted October 10, 2013 Même souci de traduction... apparemment la clé de traduction recherchée n'est pas la bonne. PS cherche "$_MODULE['<{productcomments}prestashop>productcomments_7b0bf23ae4079e07a3a4cb4d07e2caef']" or la clé présente dans les fichiers de traduction est la suivante : "$_MODULE['<{productcomments}prestashop>default_7b0bf23ae4079e07a3a4cb4d07e2caef']". Est-ce qu'il y aurait possibilité de surcharger le fichier productcomments/controllers/front/default.php? Je vois la correction qu'il faut faire mais je voudrais ne pas modifier ce fichier directement. Bonjour, Personnellement j'ai fini par contourner le problème en modifiant directement mon fichier fr.php dans mon répertoire theme/montheme/lang En lui donnant ce qu'il cherche...il trouve Link to comment Share on other sites More sharing options...
indesign47 Posted October 11, 2013 Share Posted October 11, 2013 Bonsoir, Deux des trois PR ont été validés ici et ici > ils seront intégrés dans la 1.5.7 + autre fix pour la 1.5.6 ici 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