riconegri Posted August 12, 2013 Share Posted August 12, 2013 (edited) On page translations of Prestashop in Chrome, you translate the page to the desired language, and runs the script below in the console jQuery('tbody tr').each(function(i){ var vau = jQuery(this).find('input').val() || jQuery(this).find('textarea').val(); if(!vau){ jQuery(this).find('input').val(jQuery(this).find('td').eq(0).text()); jQuery(this).find('textarea').val(jQuery(this).find('td').eq(0).text()); //console.log(jQuery(this).find('td').eq(0).text()); } }); The translated terms of the browser, were transferred to the fields, so now it's just correct, and save your translation. Remember, symbols are wrongly translated, so remember to pass the translation, and change, for exemple, the '% d' to '% d' ..., remove a blank ..., or improve script... Thanks... Edited August 12, 2013 by riconegri (see edit history) 5 Link to comment Share on other sites More sharing options...
progresivos Posted August 24, 2016 Share Posted August 24, 2016 Hola, ojalá me pudieran ayudar. Al ingresar el código: jQuery('tbody tr').each(function(i){ var vau = jQuery(this).find('input').val() || jQuery(this).find('textarea').val(); if(!vau){ jQuery(this).find('input').val(jQuery(this).find('td').eq(0).text()); jQuery(this).find('textarea').val(jQuery(this).find('td').eq(0).text()); //console.log(jQuery(this).find('td').eq(0).text()); } }); Me sale el siguiente error en la consola y no cambia nada VM2419:1 Uncaught ReferenceError: jQuery is not defined(…)(anonymous function) @ VM2419:1 Que creen que pueda ser que hago mal? De antemano muchas gracias! Link to comment Share on other sites More sharing options...
Lesielle Posted October 21, 2016 Share Posted October 21, 2016 On page translations of Prestashop in Chrome, you translate the page to the desired language, and runs the script below in the console jQuery('tbody tr').each(function(i){ var vau = jQuery(this).find('input').val() || jQuery(this).find('textarea').val(); if(!vau){ jQuery(this).find('input').val(jQuery(this).find('td').eq(0).text()); jQuery(this).find('textarea').val(jQuery(this).find('td').eq(0).text()); //console.log(jQuery(this).find('td').eq(0).text()); } }); The translated terms of the browser, were transferred to the fields, so now it's just correct, and save your translation. Remember, symbols are wrongly translated, so remember to pass the translation, and change, for exemple, the '% d' to '% d' ..., remove a blank ..., or improve script... Thanks... amazing, everyone should know this!!!!! you saved me tons of hours!! 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