fballiano / magento-full-catalog-translate

Translate all your Magento products catalog automatically (using Google Translate API)
34 stars 8 forks source link

No Translations occuring #11

Open Riz0 opened 9 years ago

Riz0 commented 9 years ago

Hello,

The extension installed without issue and appears in the configuration under services, but no attribute was created as described on your github.

So I manually created the "fb_translate" attribute with these settings:

http://screencast.com/t/mYMGfiaqvwf

http://screencast.com/t/1HwPZ8exv

And this this is how my store views are setup: http://screencast.com/t/thEAfjpknI

Once I mass updated all products in the Spanish store view to have the "fb_translate" attribute as marked "Yes". I ran this command from shell over SSH: php fballiano_full_catalog_translate.php default spanish

It doesn't throw any errors, but it also doesn't do any translating when I refresh the catalog page nothing has changed.

I thought maybe it was my api key but it seems fine.

Do you have any idea how to troubleshoot this further? I'm running Magento EE 1.14.1.0 if it makes any difference.

Thanks in any event, I really appreciate it.

fballiano commented 9 years ago

Hi, the fact that the attribute it's actually really really strange, did you check if the setup script ran? (in the core resource db table)? or, is it possible that someone was browsing the website while you were uploading the module so the resource installation ran before the setup file was actually uploaded?

anyway, i think the problem is just that you didn't set the attribute value (in the products management backend mask) for the store view, but you maybe set it global. from the documentation:

go in your "Catalog -> Manage products" mask in the Magento backend, select the Italian store view (or anyway the one you want to translate), then with the mass action tools selects all the products and "update attributes", now set the "Translate automatically?" attribute to yes. This means that these products for this store view neeed to be translated (we'll see later how and from what language to what language).

if you set it global it won't work let me know.

Riz0 commented 9 years ago

Thanks for the response.

This is the back end mask you're referring to right? http://screencast.com/t/HoEF1ZZru

I set that to the store view I'm interested in translating every time. Anyhow, I went back cleared all the related tables in the db and the attribute to start from scratch.

I reinstalled version 0.4.0 from Magento connect. When installed, it doesn't make an attribute, so I manually created it. Then attempted to run the command (after updating product attribute in the store view) and all I get now is "Terminated". So, I wiped everything again and installed version 0.7.0 from here and this version creates an attribute magically. I re-run the command, but get no response or error like the first time. So, I decide keep the attribute it created in the db, but deleted all the system files and reinstall version 0.4.0. Now when I run the command, I get "Translated this product...ok". Seems great right?

Wrong, no translations were to be found in the catalog.

I have all my locales set according to the store view and run the command based on the format from the documentation. Don't know what else to do, any thoughts?

Riz0 commented 9 years ago

Ok, so I looked at the google app and I found all client errors from "language.translations.list". Here is what the usage looks like:

http://screencast.com/t/frUohmUdgM and http://screencast.com/t/4wU47MIXUMy

So, at least I know it's accessing the API correctly. Is it not able to identify the language code from the store view's locale settings maybe? I changed the codes of my store views to match what I think are the typical language codes so attempting to translate from English to Spanish would use the command: php fballiano_full_catalog_translate.php en es

This is my locale settings for the Spanish store view: http://screencast.com/t/scrC1WDzq And here is the English store view: http://screencast.com/t/o4zRYRVP Any my actual locale folder from app/locale is titled "es_ES"

I've tried changing the default country for the Spanish store view to Spain, but that did nothing. Any idea why the app would be throwing all those errors based on my settings? Thanks again

fballiano commented 9 years ago

"Translated this product...ok", do you read a sku and the locales from and to? it should print "Translating {$row["sku"]} from {$this->language_source} to {$this->language_dest}... "

also ye it seems the connect version is broken (and old). i would delete the attribute, and remove the core_resource entry of the module and make the module reinstall completely before going on.

Riz0 commented 9 years ago

Sorry for not being clear, yes it read as you described with the sku and locales from and to.

Wiping the db of attr and core_resource, and reinstalling from scratch correctly writes the attribute again, but now nothing (no errors/response/google app errors) displays when I run the command.

For whatever reason, downgrading to 0.4.0 connect version (only erasing system files + core_resource not attr) after installing 0.7.0 from current master will make it work in giving me a response as you described, but google app usage errors.

How should I proceed? I feel we're close.

Thanks again, really appreciate it.

fballiano commented 8 years ago

can you please try 0.7.1?

alexander-sibert commented 8 years ago

I tried now and i see following working output:

php_cli fballiano_full_catalog_translate.php de it Translating 21104004 from de to it... OK Terminated

Only one example product but it doesn't translate the fields and in the Magento Backend looks following: (it's now empty)

bildschirmfoto 2016-01-29 um 21 42 26
fballiano commented 8 years ago

try to use the -debug to check better

alexander-sibert commented 8 years ago
https://www.googleapis.com/language/translate/v2?key=***&target=it&source=de&q=%3Cp%3E%3Cspan+style%3D%22font-size%3A+medium%3B%22%3E10+Papier-Anh%26auml%3Bnger+in+Stern-Form+%288+cm%29+mit+ca.+2%2C7+m+Jute-Kordel.%3C%2Fspan%3E%3C%2Fp%3E
[description] [<p><span style="font-size: medium;">10 Papier-Anh&auml;nger in Stern-Form (8 cm) mit ca. 2,7 m Jute-Kordel.</span></p>] -> []
https://www.googleapis.com/language/translate/v2?key=***&target=it&source=de&q=Geschenkanh%C3%A4nger+bei+miomodo.de+%E2%9C%93+Geschenkanh%C3%A4nger%2C+blanko%2C+Kraftpapier%2C+rund%2C+gewellt+%E2%9C%93+Gro%C3%9Fe+Auswahl+an+Geschenkanh%C3%A4ngern+im+miomodo+Online-Shop%21+%E2%9C%93+Versandkostenfrei+ab+40%E2%82%AC
[meta_description] [Geschenkanhänger bei miomodo.de ✓ Geschenkanhänger, blanko, Kraftpapier, rund, gewellt ✓ Große Auswahl an Geschenkanhängern im miomodo Online-Shop! ✓ Versandkostenfrei ab 40€] -> []
https://www.googleapis.com/language/translate/v2?key=***&target=it&source=de&q=Anh%C3%A4nger%2C+Stern%2C+paper+tag%2C+
[meta_keyword] [Anhänger, Stern, paper tag, ] -> []
[meta_title] [] -> []
https://www.googleapis.com/language/translate/v2?key=***&target=it&source=de&q=10+Geschenkanh%C3%A4nger+%22Stern%22+mit+Jute-Kordel
[name] [10 Geschenkanhänger "Stern" mit Jute-Kordel] -> []
[short_description] [] -> []

OK Terminated

alexander-sibert commented 8 years ago

Kommando zurück! It works, it seems it was my failure, Google needed my billing address and now it seems to work.

alexander-sibert commented 8 years ago

Hmm, another thing it works if i translate only one article but if i execute the command for about 1k articles then it translate nothing.

fballiano commented 8 years ago

what happens if you add the "-debug" to the translation shell command?

alexander-sibert commented 8 years ago

Yes but I saw nothing is translating. Only if I select one item for translate it works but if I select all 1.000 products then it doesn't translate.

Von meinem Smartphone gesendet

Am 01.02.2016 um 11:13 schrieb Fabrizio Balliano notifications@github.com:

what happens if you add the "-debug" to the translation shell command?

— Reply to this email directly or view it on GitHub.

ghost commented 8 years ago

I also seem to have the same issue with individual translations working but when I set it to do a batch then it simply leaves a blank box in the short description and description fields. Any ideas?

Krapulat commented 8 years ago

I have the same problem, if I want to translate large amount of products, it starts well but suddenly it stops translating. Do you know what can be the problem @fballiano ?

EDIT: I think it's for the quota: the limit on request characters per second.

fballiano commented 8 years ago

Guys I'm really sorry for the delay :(

I see that Google Translate has a default limit of 10000chars every 100seconds. that's a very low limit... I may try to add a check like: if the translation didn't return anything, wait some (how much) time and retry... but that's not the way I'd like. what do you think?

I think it was introduces after I tested the extension cause the customer was translating his entire DB without problems.