Safe way to kill your translations. ALL OF THEM

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320352

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.2.11
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : none

go edit shipments and add translations for several languages. Don't forget to add a description in the editor field. Save & Close. Go to the language management section and look at the translation files. They are all GONE, except the last one which is cut off and holds a broken line at the end with the description you just entered.

Don't worry. This feature has just recently been released, so this is bound to happen every now and then.

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320353

a little more testing: just STAY AWAY from the description. I have configured the default TinyMCE, and this is the editor that is presented for the description, luring you into writing a nice little essay. RESIST THE TEMPTATION, it might cost you hours of work. After all, you're a professional and have afforded yourself the "business" edition of this, ahem, software. You surely have better things to do!

Last edit: 3 years 10 months ago by retiro.

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320354

I have to extend my warning. Whenever you enter a description, whether through an advanced editor like TinyMCE or with no editor, and wherever you enter a description: say Goodbye to your translation files. If you're lucky, just one gets messed up. If you're not, all files are cut off

Last edit: 3 years 10 months ago by retiro.

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320384

Hi,

The fact that we can't reproduce the issue with the current build of the 4.3.0 and what you're describing as "just one gets messed up. If you're not, all files are cut off" since to indicate that you might already have translation overrides made before with escaped double quotes. Someone else actually reported that issue 2 weeks ago and we've added patch for it:
www.hikashop.com/forum/install-update/89...ucciones.html#319786
Note that the translation overrides are not lost. You can edit the translation override file under the Languages tab of the HikaShop configuration and re-escape the double quotes and save your translation override file and your translations will be there again.
Then, supposing that this is indeed the issue, with the addition of the patch as explained on that other thread, you should not be able to reproduce the problem either.

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320401

the languages files are completely lost. The file size (on the SSH command line) is set to zery. There is no way of editing them via the languages tab, the override section (on the right) is empty.

Lately, I have had mostly cases where I lost all files when I edited the description in the translation dialog.

I have no escaped quotes anywhere. You analysis does not sound like it has anything to do with my case

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320405

in case you wanna try reproduce: 3 languages. edit all three, entering title and description. Then pess "Save & Close" on the product. Dont forget to say goodbye to all translation work you did in the past few hours.

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320411

Hi,

I actually just tried to reproduce:
I create a product, enter a name and a description and save.
Then, I edit the translation overrides for the name and description with the popups and save each popup and save the product.
I check the translation override files and they are all fine with the latest build.

I actually do think that your problem comes from not having the patch I was talking about in my previous message.
If your enter a translation override with HTML with double quotes (like it can happen if you add a link with the description editor for example), without the patch, you'll have an invalid translation file. Then, it you edit another translation or the same one and save it again, it won't be able to load the translation file and then it will save an empty translation file.

So the patch I talked about would avoid that unless someone would manually modify the translation override file incorrectly. Now, I've added another patch so that if the system can't load a translation override file because there is a mistake in it, it will leave it be and return an error.

You can download the HikaShop install package on our website and install it on yours so you'll get both patches and it should then work fine for you too.

Sorry for all the troubles you went through with the translation override system and thanks for the additional details on how to reproduce the issue.

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320421

to be clear:
- I had no HTML with double quotes anywhere. I always just entered some blabla, knowing what I had to fear.
- my sequence of actions was always: go into product, enter titles and decritpions for all translations, Save & Close product.

"I've added another patch so that if the system can't load a translation override file because there is a mistake in it, it will leave it be and return an error."
that is a VERY good idea. Congratulations.

However, one question remains unanswered: what happens if I change the default description after saving the translations??

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320433

Hi,

If you change the default description, then the translation overrides won't be connected to the product anymore as we didn't add yet any system to keep track of that.

Now as I recommend here www.hikashop.com/forum/checkout/900077-t...ot-saved.html#320407 you could enter a translation key in the default description field so that you always only change the translation overrides, and not the default description.

Actually, we actually already had the possibility to have translation overrides on these fields by entering the translation key in the default field, and then adding the translation overrides in the transltion override file manually.
The interface we've added in the 4.3.0 only plugs onto this system to make it more simple to add translation overrides.

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
3 years 10 months ago #320453

this "system" is fundamentlly broken. That's all there is to say

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum