lixotuka Posted November 28, 2019 Share Posted November 28, 2019 Hi, Do you know if is there any bug in TB translations? I have translate to my language some texts several times but suddenly I find them in English once again. I translate texts in TB menu Location/Translations. Do you think is better to do it in the files through FTP? Thanks in advance! Link to comment Share on other sites More sharing options...
musicmaster Posted November 28, 2019 Share Posted November 28, 2019 It is hard to do it in the files as they don't contain the original text but only some hash. For me and most people translations work ok. The only annoying thing is that you need translate a word like "order" dozens of times - once for each place where it is present in the code. I have been considering writing something for it in Prestools but it has low priority. If you have a problem that when you translate some text at some location and that translation is later reverted it would help if you could provide a concrete example. Only with such reports people can try to reproduce your problem. Link to comment Share on other sites More sharing options...
Occam Posted November 28, 2019 Share Posted November 28, 2019 Problem is that currently just 4 languages are nearly full translated (German, Italian, Slovenian and Russian), followed by Dutch, Hebrew, Portuguese and Spanish. What is your language, and which items did you translate and were afterwards displayed in English again? You should know that custom translations for mails and modules are stored to the theme directory, not to the original files. Link to comment Share on other sites More sharing options...
wakabayashi Posted November 28, 2019 Share Posted November 28, 2019 Are you talking about the BO? In the version I use, there is a bug for BO translations. For more info: Link to comment Share on other sites More sharing options...
lixotuka Posted November 28, 2019 Author Share Posted November 28, 2019 4 hours ago, Occam said: What is your language, and which items did you translate and were afterwards displayed in English again? My language is Spanish. The attached picture is a category. I've maked in red colour the texts that I've translated several times. Link to comment Share on other sites More sharing options...
lixotuka Posted November 29, 2019 Author Share Posted November 29, 2019 6 hours ago, musicmaster said: If you have a problem that when you translate some text at some location and that translation is later reverted it would help if you could provide a concrete example. Only with such reports people can try to reproduce your problem. It's difficult to know when the translations are reverted, I always realize it days after I've translated it and checked that it works, but I'll observe it. Link to comment Share on other sites More sharing options...
lixotuka Posted November 29, 2019 Author Share Posted November 29, 2019 (edited) 1 hour ago, wakabayashi said: Are you talking about the BO? In the version I use, there is a bug for BO translations. Yes, I make the translations in BO. I'm using TB 1.1.0 Edited November 29, 2019 by lixotuka Link to comment Share on other sites More sharing options...
Occam Posted November 29, 2019 Share Posted November 29, 2019 (edited) I checked it. Currently 88% of thirty bees is translated into Spanish, which means that a few thousand of items are still displayed in English. But this does not apply to the examples you gave. The sort order is completely translated. Labels like Sale or New may have to be translated in the module's section, too. The translation for the availability label, however, has to be translated for each product separately in the products section of the BO, tab Quantity. If you have many products the only way to simplify this would be a change via SQL command or the use of @musicmaster's Prestools for a global change. Currently the handling of 3rd party themes like yours is buggy. So I'd suggest to automatically import the Spanish language in locations --> translations into all themes. And to avoid the behavior you described, you should always make a backup copy of the folder themes --> <your theme> --> lang, or at least the es.php file you find there, after your own translations. Until the bugs are fixed, it is recommended to always upload this updated version to the themes default-bootstrap and Niara. Edited November 29, 2019 by Occam Link to comment Share on other sites More sharing options...
lixotuka Posted November 30, 2019 Author Share Posted November 30, 2019 Thank you @Occam! I'll try to fix it following your explanations. I forgot to tell that I'm using Panda theme. Link to comment Share on other sites More sharing options...
the.rampage.rado Posted November 30, 2019 Share Posted November 30, 2019 Your problem may be caused by Template Compilation setting in Performance. When you reopen your translations page you see an old copy with the old strings, when you click save they are written down together with your new changes. You should keep this at "Recompile if changed" setting to avoid this issue. The "Recompile always" will give large performance penalty and thus is not for 'production' and only for editing and fixing period. Hope this makes sense! 1 Link to comment Share on other sites More sharing options...
lixotuka Posted December 3, 2019 Author Share Posted December 3, 2019 Hi @the.rampage.rado I reckon my TB is already setup as you recommend. I attach a picture. Link to comment Share on other sites More sharing options...
Pedalman Posted December 3, 2019 Share Posted December 3, 2019 I would give it another try since I see it as Rampage suggested. I had his problem often in the last 8 years and always it was related to caching problems. (These are not only the settings you set in your BO but also those used by your ' host'. In my case I I had issues some times in the past with php additions like APC and OPcache. Also with activated mod_pagespeed I had issues. But all this is not my domain but if you know those terms and know where to de-/activate them you could give it a try.) Make also sure that in your performance settings cache (APC etc.) and full page caching (both more at the bottom part of performance settings) are disabled for testing your problem. I had excactly the same problems as said and sometimes a translations appeared correctly literally the next day on front/back. Link to comment Share on other sites More sharing options...
led24ee Posted September 18, 2021 Share Posted September 18, 2021 (edited) Is there a quick way to add translation to this > product > tab : prices > Unit price (tax excl.) ? Found this : http://nemops.com/prestashop-thirtybees-multi-language-product-fields/ It is from year 2017. Maybe this can be in next version ? Edited September 18, 2021 by led24ee Link to comment Share on other sites More sharing options...
yaniv14 Posted September 19, 2021 Share Posted September 19, 2021 This tutorial from 2017 most likely will work for you. But its not a recommended way of doing it, because it requires modifying core files. I suggest (until proper fix will be implanted in core) doing some hack with javascript. Link to comment Share on other sites More sharing options...
led24ee Posted September 19, 2021 Share Posted September 19, 2021 7 hours ago, yaniv14 said: This tutorial from 2017 most likely will work for you. I suggest (until proper fix will be implanted in core) doing some hack with javascript. That's why I suggest this (or some other solution) to be in next release. With javascript I have 0 experience. So I think I will do this to my shop and try to remember do it again after update. Link to comment Share on other sites More sharing options...
yaniv14 Posted September 19, 2021 Share Posted September 19, 2021 what is your shop url? Link to comment Share on other sites More sharing options...
led24ee Posted September 19, 2021 Share Posted September 19, 2021 led24.ee Link to comment Share on other sites More sharing options...
yaniv14 Posted September 19, 2021 Share Posted September 19, 2021 (edited) if you only need it in product page, so you can try adding this code to the bottom of "themes/niara/js/product.js" window.addEventListener('DOMContentLoaded', (event) => { const lang = document.documentElement.getAttribute('lang'); if (lang === 'en-us') { document.querySelector('.unit-price').innerHTML = document.querySelector('.unit-price').innerHTML.replace('per meeter', 'for meter'); } else if (lang === 'tk') { document.querySelector('.unit-price').innerHTML = document.querySelector('.unit-price').innerHTML.replace('per meeter', 'for meter in tk'); } }); Edited September 19, 2021 by yaniv14 Link to comment Share on other sites More sharing options...
led24ee Posted September 19, 2021 Share Posted September 19, 2021 So the original is in my language and replacement will happen when language is set to en-us ? And if there is need for another replacement (tk -> pc for example) then I need to add only last row which begin with document.querySelector... Link to comment Share on other sites More sharing options...
yaniv14 Posted September 19, 2021 Share Posted September 19, 2021 @led24ee look at the updated post Link to comment Share on other sites More sharing options...
led24ee Posted September 19, 2021 Share Posted September 19, 2021 Ok. Will try it. tk is not language, it is another unit what is needed to translate. In english it is piece. Anyway thank You very much for Your time. Link to comment Share on other sites More sharing options...
yaniv14 Posted September 19, 2021 Share Posted September 19, 2021 @led24ee My mistake... yes you are right, you only need to pick a new selector. Link to comment Share on other sites More sharing options...
yaniv14 Posted September 20, 2021 Share Posted September 20, 2021 @led24ee in case you don't have this in every product page you should protect the code a bit. you should wrap it inside a condition. like: window.addEventListener('DOMContentLoaded', (event) => { if (document.querySelector('.unit-price')) { .... rest of code ... } }); Link to comment Share on other sites More sharing options...
led24ee Posted September 20, 2021 Share Posted September 20, 2021 (edited) Why is this necessary ? I mean if there isn't this then what will go wrong or what is not happening ? Edited September 20, 2021 by led24ee typo Link to comment Share on other sites More sharing options...
yaniv14 Posted September 21, 2021 Share Posted September 21, 2021 @led24ee It is necessary because you might get a javascript error. document.querySelector('.unit-price').innerHTML -> "innerHTML" is a property of an object, and if the object does not exists then the property cannot be called. 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