Translation Bugs

  • Posts: 95
  • Thank you received: 1
3 years 5 months ago #325832

-- url of the page with the problem -- : geschenkesuchen.com/
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 4.0.0 Beta 5

Hello,

I have same questions for the Hikashop Translation:

1
My categories and products were well translated. After changed some words in the English (second language) and safe it, all translated texts were disappeared. I tried it new and filled out also the German (first language) translation fields (I don't now why exist a translation tool for the native language) – it works for a moment and i could see the product in both languages on the frontend. After add one line more and safe, all translations were deleted once again.

2
When everything worked, I putted also the auth. link for German and English, but by switch the language on the frontside I received always the category and not the translated product site.

3
To edit the e-mails I added a field with the bank information (the costumer need to know that, if the payment is bank transfer). But no exist a possibility of the translation for fields.

4 – nice to have
The translation tool from the categories no have the possibility to change the picture (my would show headers with text in the picture).


Can you help me in this points? The first and second are the most important. Attached you can find a screenshot from my backend product site.

Thanks,
Jonas

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 5 months ago #325841

Hi,

1. First, note that the translations are stored in the translation override of your language. So if you go in the HikaShop configuration under the language tab and click on the edit icon for the language, you'll see the translations of your categories/products on the right side of the screen.
So you can easily backup the translations when you're doing tests which wipe out the translations thanks to that area.
Second, I tried to reproduce the issue on my end, but I'm not able to. When I change the original text of a product, I don't lose the translations of that product.
Are you able to reproduce the issue on your website right now ?
If you are, could you provide a backend access and precise instructions to reproduce the issue so that we can have a look at the situation ?

2. We would need an access to the backend and a link to the product page on your frontend where you don't get the translations you've entered in your backend in order to check on the situation.

3. Are you talking about custom fields ? While there is no interface for the translation of the labels and values of custom fields, you can still translate them via the translation override edition screen I was talking about in point 1.

4. We don't plan on having the possibility to change the image of the product based on the language with the translation tool we have by default on HikaShop. However, if you use the Falang extension instead, it will allow you to translate the images and thus change the path of the image based on the language. So it would be possible to do it with Falang.

If you want to provide backend access, you can use our contact form :
www.hikashop.com/support/contact-us.html
Please make sure you include a link to this thread as reference in your message.

Last edit: 3 years 5 months ago by nicolas.

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

  • Posts: 95
  • Thank you received: 1
3 years 5 months ago #325862

Hi Nicolas,

I sent you an e-mail with backend access.

1
Yes I can see the translated text in the language area. On the backend product site I filled out one line in the second language and clicked on the safe button of the top right. Then I opened otherwise the second language popup and the text disappeared.
After that I had a look to the categories and other products. Everywhere the translation was lost.
Here is one of the products:
geschenkesuchen.com/index.php/de/schmuck...schutzengel-bordeaux

2
please check the e-mail

3
Yes I talked about the custom fields. All the content from the automatic mail (order notification and so on) is always in the right language, but exist a simple way to edit custom fields in two languages, with automatic select?

4
Is nice to have. I'm not use Falang, but probably I will try it.

Thanks,
Jonas

– screenshot from the backend product site attached –

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 5 months ago #326039

Hi,

Thanks for the access.
I check on the situation on your website and the issue comes from the fact that the translation override file is currently invalid there.
It ends with the line:

="index.php/de/schmuck/ohrschmuck/product/ohrhanger-schutzengel-bordeaux"
and thus it's missing something before the equal sign leading to PHP's ini parsing function being unable to parse the translation file.
Now, there are several safety mechanisms in HikaShop regarding that:
- when the text before the equal is empty when HikaShop is adding a new translation override, it is supposed to omit it to avoid such parsing issue
- when you save a product's information and that something changed in one of the fields that can be translated, the system checks the translation file and display an error message if there is a problem parsing it
- when you update / add new translations, a similar check is done
From what I can see on your website, none of these safety mechanisms are working, and I don't know why.
I'm also unable to replicate the issue on my local test website.
So could you also provide a FTP access so that I could check the files of HikaShop and add some debugging to figure out what's happening ?
You can use our contact form for that as you did before for the backend access.

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

  • Posts: 95
  • Thank you received: 1
3 years 5 months ago #326078

Hi,
the debug mode is on and I send an e-mail with the FTP access. I hope you can find something.

Regards,
Jonas

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 5 months ago #326158

Hi,

Thank you for the FTP access.
I found and fixed three issues:
- The error messages that there is a problem in the translation override files was not properly displayed when you were saving a product or a translation.
- I manually fixed the translation override files of your website as there was a problem with it in one line.
- When you would change the text of the main product in a manner that wouldn't change the translation key used for the corresponding translations, it would delete the translations from the translation override file instead of not doing anything.
I've added the patches for both bugs on your website with the FTP access, and I've also added them on our end for others using HikaShop.

I invite you to try again to translate things. And I would still recommend to regularly backend the translation overrides that you can find in the Languages tab of the HikaShop configuration in case something goes wrong again.

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

  • Posts: 95
  • Thank you received: 1
3 years 5 months ago #326172

Hello,
thank you for looking at this. But the problem isn't solved actually. I've translated one product and it worked well. Then I tried to translate a second product and after safe this, all translations from the both products they are gone again.
Today I tried once again and on the translated product site (frontend) I got what you can see in the screenshot. Once a message appeared that the en-GB.override.ini file was not working.
I really have no idea. Maybe you can find something else?

Regards,
Jonas

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 4 months ago #326184

Hi,

Unfortunately, I'm not able to reproduce the problem.
Could you provide a precise step by step of what you do to get the problem ?
Like, for example:
1. I edit the product "Ohrhänger »Schutzengel – Bordeaux«"
2. I add "test" in the "name" field of the translation popup for the english language
3. I click on the save button and the popup closes.
4. Then, if I open the popup of the english language for that product, I still see my translation "test" there.
I would need the same kind of step by step, but for when it's not working in the end.

Similarly, I tried to check on the issue you reported in your screenshot, and I understand it happens when you access the product details page of a product on the frontend. However, if I try to do that ( for example /index.php/de/schmuck/ohrschmuck/product/ohrhanger ) I don't have that error. Could you give the URL of the page with the issue ?

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

  • Posts: 95
  • Thank you received: 1
3 years 4 months ago #326212

Hello,

here my complete working list. It seems that all is OK. Only one or two things are strange.
First: Why it changed the translated (English) Alias?
Second (more important): For which reason I can not switch the language on the product site well – now it shows me the category from the product in the other language instead the translated product site. You can try it on every product site (eG: geschenkesuchen.com/index.php/de/schmuck...fadenohrring-schwarz )

What I did and the screenshoot attached:

1
I added a new product to the category "Schmuck /Ohrschmuck" in German (Fadenohrring "Schwarz"). And saved it twice (with the Auth. URL). – Screenshoot 01 and 02

2
On the backend product site I added the English translation on the popup (only the same fields like in German) and saved it on the top of the popup window with the green button. – Screenshoot 03
After reload the German product site on the frontend I switched to English with the flag-button and received the English category site (not the product site!) – Screenshoot 04 (still not translated all, look at the menu and the browser link)
And I opened the English product site (all is OK) – Screenshoot 05

3
I added a second new product like the first one (same category, same fields). And I set the translation in the same manner (all is OK) – screenshoot 06 - 09

4
I opened the "old" product "Ohrhänger »Schutzengel – Bordeaux«" and added the English translation only in the fields I used in German. Looking on the frontside all is OK. – Screenshoot 10

5
I opened the first new product and saved it. All is OK. But I found in the translation on the backend that the Alias was changed from "fadenohrring-schwarz" to "Thread earring »black«" – Screenshoot 11 (German) and Screenshoot 12 (English).
In the second product the Alias in English wasn't changed. – Screenshoot 13

6
I opened the product "Halskette »Schutzengel – Bordeaux«" and checked the translation. Here was the Alias in English changed by system too. But I could find a mistake in the Auth URL – the reason because I have received the Error page (Screenshot from my last post) – Screenshoot 14

7
To test the function I filled out a field in the English translation that no was filled out in German. The result is logical and no text disappeared like before. – Screenshoot 15 and 16

8
I translated the categories ("Jewellery" and the subcategories), all is OK – Screenshoot 17 and 18


I don't know why its working now. You changed something more?

I hope this is stable now and if you know something about the two things on top I'm happy.

Regards,
Jonas

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

  • Posts: 95
  • Thank you received: 1
3 years 4 months ago #326213

more screenshoots

Last edit: 3 years 4 months ago by Reinsch.

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

  • Posts: 95
  • Thank you received: 1
3 years 4 months ago #326215

last six screenshoots

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

  • Posts: 95
  • Thank you received: 1
3 years 4 months ago #326259

Hi Nicolas,

one more thing about translation: The Options saved like a product with the right translation (screenshoot) no are shown on the frontside product page with the translated headline. Only the option is translated. See the attached screenshoot with the highlighted parts.

thx, Jonas

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 4 months ago #326387

Hi,

I didn't change anything on your website since my post www.hikashop.com/forum/10-translation/90...ion-bugs.html#326158
The only thing I did was to test the translation system on the "Ohrhänger »Schutzengel – Bordeaux«" and since it worked I asked for more information.

So you're talking about an issue with the translation changing. What you need is to understand how the translation system is done:
- the translations are stored in the translation override file that you can see when you edit the language file under the Languages tab of the HikaShop configuration. If you check there you can see that each translation is stored like that:
LABEL="value"
- When you add a translation, it takes the text from the main product, filter out all the non ASCII characters (keeping only letters, numbers and underscores) and use it as "LABEL" and then store the translated text as "value".
- So if you have two products with text similar enough to generate the same LABEL, then they will also share the translation.
For example, If I have product named "My Product" and another one named "myproduct", both will end up with the LABEL "MYPRODUCT" for the translation of the name. So if you modify the translation of the name for one product, you will also see the new translation for the other product.
That's also why, if you reproduce the steps of my previous message, you end up with the translation of the alias of the product filled automatically as the LABEL for the alias and the name are the same.
If you want to avoid that, you can enter different labels in the main information of the product and translate the information in both languages. For example if you enter the "name" "MY_PRODUCT_NAME" and the "alias" "MY_PRODUCT_ALIAS" then you can have a different translation for both the name and the alias in each language.
That also a good way to avoid having similar translations used for different products.

Regarding the translation of the option name, that's indeed something we missed.
Add the code:

if(!empty($element->options)) {
			foreach($element->options as $k => $optionElement) {
				if(!empty($optionElement->product_name))
					$element->options[$k]->product_name = hikashop_translate($optionElement->product_name);
				if(!empty($optionElement->product_description))
					$element->options[$k]->product_description = hikashop_translate($optionElement->product_description);
			}
		}
after the line
$element->options = $database->loadObjectList('product_id');
in the file components/com_hikashop/views/product/view.html.php and it will fix that.
We'll add that patch on our end too for others.

Regarding the last issue:

Second (more important): For which reason I can not switch the language on the product site well – now it shows me the category from the product in the other language instead the translated product site.

That's because the Joomla language switcher doesn't handle it.
Actually, while checking on the issue on your website, I found out that it was possible to add extra code to HikaShop to tell Joomla what to do so that the URL works fine:
docs.joomla.org/J3.x:Multilingual_Associations/Developers
So we'll work on that as an improvement for the next version of HikaShop.

The following user(s) said Thank You: Reinsch

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

  • Posts: 95
  • Thank you received: 1
3 years 4 months ago #326677

Hi,

thank you for for the detailed explanations! I hope that after following you instructions I wouldn't create that mistakes in the translations. On the edited products all is ok.
And thank you for the code to fix the problem with the options. I added the code and the option is right now.

For the last thing I hope that you can develop an improvement. I'm not a programmer and I don't understand the changes on the site from the link.

If I will find more things, I will write you.
Thanks a lot, best regards,
Jonas

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 4 months ago #326684

Hi,

Thanks. The patch is ready for the next version regarding the language switching. We were able to reproduce the issue and validate that the patch was fixing it without creating side effects.
Next release should be ready in one or two months.

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

  • Posts: 95
  • Thank you received: 1
3 years 1 month ago #330901

Joomla 4.0.0 Beta 7 – – Hikashop 4.4.1

Hello,
after the update to the last Hikashop version the translation problem reappears. On all Hikashop-pages like categories- and product-pages isn't possible to switch the language.
All pages have the corresponding link in the backend and are translated! (The pages can also be called up if you change the language on the home page or imprint-page eg and then can you see the translated product pages.) After the update all works fine.

Now it doesn't change the language by click on the language-modul (flags) on the Hikashop-sites, only it will be added "/product/listing" sometimes.

Here the links to test:
home – geschenkesuchen.com/
category eg – geschenkesuchen.com/index.php/de/schmuck
product eg – geschenkesuchen.com/index.php/de/schmuck...ring-zweifarbig-grun

Its very difficult to manage two languages with the shop. I wish it was as easy as the links on the "normal" content pages.

Any idea to solve this problem?

Thanks,
Jonas

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 1 month ago #330934

Hi,

The patch was added in the 4.4.1.
So if you have the problem again, the only thing I can think of is that it's linked to the file components/com_hikashop/helpers/association.php that we've added following the documentation docs.joomla.org/J3.x:Multilingual_Associations/Developers for your second issue.
We've made many tests on our end and it fixed the problem we had been able to reproduce, similar to what you had described.
But maybe it has some side effects.
Try renaming that file in order to deactivate it and see if that helps.

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

  • Posts: 95
  • Thank you received: 1
3 years 1 month ago #330939

Hi,
thanks for the quick answer! I tried renaming the file "association.php" and now the language switch is like before! ;-)

That means – as I already described – if I change the language on a product-site its jumping to his category-site in the desired language. On all other pages and categories and subcategories works fine. Thats not the best solution, but I think it's logical for the end-users.

I found something more after the update.
If the user had to select product variants it's duplicating the headline from a added module (the module is added on the end of the description from the product – the variants do not have descriptions with a tag like {loadmoduleid 139} ). This happens after select color and size, eG on this site:
geschenkesuchen.com/index.php/en/clothes...product/t-shirt-miau
(html code on screenshoot)

Do you have any idea where this is coming from now?

Thanks, best regards,
Jonas

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
3 years 1 month ago #330971

Hi,

We've made a patch to the association.php file which should fix the problem.
Download again the install package on our website and install it on yours and it will put back the association.php file with the patch.
If you still have an issue there, you can directly rename the file but I hope it will work fine.

Regarding your issue with the module title, I would say it's a bug of the replacing plugin because the tag is many times on the page.
However, there is an easy way to circumvent the issue since you have the same description for all the variants.
Remove the code:

<div id="hikashop_product_description_<?php echo $variant_name; ?>" style="display:none;"><?php
			echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$variant->product_description));
		?></div>
from the file product / show.php for your frontend template via the menu Display>Views in HikaShop and that will avoid the description area from being refreshed when you change the variant selection and thus will avoid the issue.

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

  • Posts: 95
  • Thank you received: 1
3 years 1 month ago #330983

Hi Nicolas,

I have installed the new version with patch. Now if I want switch the language from English to German on a product site it shows me that link:
geschenkesuchen.com/index.php/en/kleidun...product/t-shirt-miau
--> After index.php remains "en" and then figures the german word from the category "kleidung" ---> the site not exist!
The same happens on the category-sites.
You can test it here: geschenkesuchen.com/index.php/de/schmuck

To the second issue:
I have the "same" descriptions in the variants, means all variants have an empty description, the main-description is the only one. After delete this lines you described, all is like before.

Sorry for the trouble. I hope you have an idea more.
Thanks.
Jonas

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

Time to create page: 0.100 seconds
Powered by Kunena Forum