#141 – translation

Posted in ‘weeblrAMP’
This is a public ticket. Everybody will be able to see its contents. Only enter usernames, passwords or any other sensitive information in the Private information field.
Tuesday, 12 March 2019 15:10 UTC
VladAgata
 How to translate a plugin into other languages?
The site uses Polylang and Loco Translate, but that doesn't help
Tuesday, 12 March 2019 15:36 UTC
wb_weeblrpress
Hi

the translation should be done with Loco Translate, for the weeblrAMP plugin (not for the weeblrAMP WooCommerce add-on).

I think the View cart string might have a problem though, it looks like it's reading from "WooCommerce" instead of WeeblrAMP". I'll look into it now.

Best regards
 
Tuesday, 12 March 2019 17:16 UTC
wb_weeblrpress
HI

I have made some changes to the strings so that weeblrAMP uses more of WooCommerce language strings. So if you have an already translated version of WC, you might not even have to translate anything.

Please download the updated version from the development versions download area. You need to update both weeblrAMP AND the weeblrAMP WooCommerce add-on.

Note this version also has a fix for the other issue, where your product attribute had a - in the name.

Best regards
 
Tuesday, 12 March 2019 20:23 UTC
VladAgata
Thank you for help!
I downloaded the update and installed it.
And indeed, part of the lines received the correct translation automatically from the finished translation files.
Thank!

But some lines are not translated.
Even if they are in the official translation. for example Wocommerce
translated to 100%, and the necessary lines are in this translation.
But for some reason they are not used in your plugin.

Also part of the text
"items in cart:" is also not translated.
This line is found in the Loco Translate, I enter the correct translation into it, but the translation does not appear on the - page.

Thank!
Wednesday, 13 March 2019 11:12 UTC
wb_weeblrpress
Hi

- Translate-1: Found the cause
- Translate-2: Found the cause
- Translate 3: sorry, this product is unavailable...: did not find any issue there. made a change to use the WooCommerce version but it should have worked with adding the translation into the weeblrAMP translation file.
- Translate 4: items in cart: should be translate in the weeblramp-theme-wc translation file
- translate 5 : see translate-3

I have made an updated version with the few changes mentioned above. You can download it from the development versions download area. Be sure to add the translation for ..items in cart.. to the correct plugin translation file using Loco translate.

Best regards
 
Wednesday, 13 March 2019 13:18 UTC
VladAgata
Thanks for the quick reply!
There is one more question.

When you first load a page with a variation of goods, a message appears that product can not be ordered.

"Product is not available select another variation"

Such an inscription puts the visitor in a difficult position. This can be understood as the fact that there is no item and can not be ordered.

If you choose a variation, then a message appears that the product is available, and the buy button becomes active.

But if I set the default variation (option 01), then the first page load will show that the product can not be ordered.

In the product settings, the first variation is set by default. The product should be active and the button to buy too.
Wednesday, 13 March 2019 13:31 UTC
wb_weeblrpress
Hi

Yes, we currently do not support auto select of default values for attributes. I'll look into adding this feature and let you know if it can be done quickly.

Best regards
 
Wednesday, 13 March 2019 13:42 UTC
VladAgata
Thank!

While I just changed the inscription.

But the question with the translation remains.

  "items in cart:"
This line is only in the weeblrAMP plugin WooCommerce theme

I entered the necessary line feed, but it did not help.
Thursday, 14 March 2019 07:53 UTC
wb_weeblrpress
Hi

So you should be able to translate items in cart now, the language was not loaded from the correct plugin name. Also I have solved the issue with the "product not available" message: it was a simple bug introduced in last version when we accounted for the - instead of _ issue.

So if you download now the latest dev version, you should be good (from the development versions download area)

Best regards
 
Thursday, 14 March 2019 12:16 UTC
VladAgata
Hello!

Works great!
Thank!

There is one more question.
There is an error on the page with the variable product

The attribute 'type' in tag 'input' is set to the invalid value 'button'.

What does it mean?

On the pages with a simple product there is no such error.
Thursday, 14 March 2019 12:19 UTC
wb_weeblrpress
Hi

Can't say without the full page, please provide a link.

Best regards
 
Thursday, 14 March 2019 12:30 UTC
VladAgata
https://dini-test.tk/product/pomada/amp
чт, 14 мар. 2019 г., 14:19 WeeblrPress <[email protected]>:

Thursday, 14 March 2019 13:00 UTC
wb_weeblrpress
HI

It's coming from those + and - buttons on the side of the main input field:



That's not a standard WooCommerce output. Is this coming from your theme? If so, you should disable your theme on AMP pages (see this page in documentation).

Best regards
 
Friday, 15 March 2019 07:56 UTC
VladAgata
Hello!

Thanks for the answer!

I think that the theme settings have nothing to do with it.

In a simple product it is not.
The problem is only in the variable product.

The theme settings are the same.

Friday, 15 March 2019 08:53 UTC
wb_weeblrpress
Hi

I think that the theme settings have nothing to do with it.
I suggested to disable the theme on AMP pages because this does not happen on a standard install of WooCommerce. So the additional code is provided by your theme most likely and as such the first thing to do is disable your theme.

The theme settings are the same.
I am not talking about your theme settings. I am talking about disabling your theme on AMP page:



Best regards
 
Friday, 15 March 2019 09:10 UTC
VladAgata
Sorry, I misunderstood you.

Now I have disabled amp settings for amp.
But it did not help.
Friday, 15 March 2019 10:08 UTC
wb_weeblrpress
Hi

Yet those +/- buttons do not exist on a standard install so they are coming either:

- from your theme
- from some plugin you have on the site
- from some custom code running in your theme functions.php

Can you please disable on AMP pages the other plugins that may cause this?



Best regards

 
Friday, 15 March 2019 10:09 UTC
wb_weeblrpress
Hi again

Also, can you switch temporarily to another theme? just to be sure it is the theme doing this?

Be sure to clear any cache system you use when doing all your tests.

Best regards
 
Friday, 15 March 2019 10:37 UTC
VladAgata
Did as you advised.
Disable all plugins.
I reset the cache. And disabled the caching plugin.

Did not help.

Established another topic - Storefront.
It's okay
No buttons.

So the problem is in the subject.

But how to disable it for amp?

And the second question.
Why is everything normal for simple products?
Friday, 15 March 2019 10:54 UTC
wb_weeblrpress
Hi

So the problem is in the subject.
The problem is in the theme.

Why is everything normal for simple products?
I don't know. The code in weeblrAMP is nearly the same for single and variable products. On variable products, we just insert the AMP code to allow selectors.

We never remove the plus/minus buttons. If they are not displayed on the single product, then it's because the theme does not insert them. it's not weeblrAMP removing them.

We can spend much time on this without finding the real reason so I would like to propose a faster alternative. If you can install the Duplicator plugin on the site, do a site backup and upload the backup files to this online private folder, we can install a copy on a local machine and debug the PHP directly. We are sure to find the source of the problem quickly and decide what can be done to fix it.

Best regards
 
Friday, 15 March 2019 12:42 UTC
VladAgata
Files uploaded to the specified folder
Friday, 15 March 2019 17:51 UTC
wb_weeblrpress
Hi

OK, sorry, I should have tried that before going through the backup thing. The problem here is that of URLs. The URL you use to access that page is not correct because it's missing the trailing slash.

The standard URL is :

https://dini-test.tk/product/pomada/

and so the AMP URL is:

https://dini-test.tk/product/pomada/amp/

Currently you are using the "Development" mode and so you type the URL manually. When in "Normal" mode, weeblrAMP will create the URL for the AMP page and it will all work fine.

The source of the problem is:

- because the trailing slash is not there, weeblrAMP does not recognize the page as AMP
- because it does not think this is an AMP page, it does not disable the theme
- and the theme is indeed adding the +/- buttons which cause the problem.

So basically as long as you disable the theme on AMP pages, you will be good when you switch to normal mode. Search engines and others will find the correct URL and they will be valid.



Best regards

 
Friday, 15 March 2019 18:24 UTC
wb_weeblrpress
Hi again,

I have made a new version which will be more tolerant to that missing trailing slash, you can get it from the development versions download area.

Best regards
 
Friday, 15 March 2019 19:04 UTC
VladAgata
Thank!
Installed update.

Everything works great!

Thanks again!
Successes!
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.