Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TranslationsDownloader.php #32

Merged
merged 1 commit into from Jul 30, 2016

Conversation

@aixkalur
Copy link
Contributor

commented May 1, 2016

Original repository is deprecated. And while url is not updated we are not able to add languages automatically without using filter "woo-poly.language.repoUrl".

Original repository is deprecated.
@decarvalhoaa

This comment has been minimized.

Copy link
Contributor

commented May 4, 2016

Hi

I'm getting 404 on the new repoUrl for my version 2.5.5

https://downloads.wordpress.org/translation/plugin/woocommerce/2.5.5

@decarvalhoaa

This comment has been minimized.

Copy link
Contributor

commented May 6, 2016

Thanks for the clarification. Can you share how you can test the code? I would like to include you patch in my fork but don't know how to test it...

@aixkalur

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2016

Easiest way to test it would probably be if you create test wordpress site with woocommerce + polylang + woo-poly-integration.

While you have original woo-poly-integration plugin and you try to add new language in Settings > languages. Example you can create new language Suomi (fi). Then you should get download error. When you use patched TranslationsDownloader.php code then language should be downloaded without problems.

I actually use temporary fix in theme side at the moment. Until current issue is fixed in main repository.

add_filter('woo-poly.language.repoUrl', function($url){
        if (substr_count($url, 'https://github.com/woothemes/woocommerce-language-packs/raw/') > 0)
        {
        return 'https://downloads.wordpress.org/translation/plugin/woocommerce/' . WC()->version;
        }
        return $url;
}, 1);
@decarvalhoaa

This comment has been minimized.

Copy link
Contributor

commented May 7, 2016

Thanks for the feedback. I added your fix to my fork also.

@hyyan hyyan merged commit 1c39a9e into hyyan:master Jul 30, 2016
@hyyan hyyan added the bug label Jul 30, 2016
@hyyan hyyan self-assigned this Jul 30, 2016
@hyyan

This comment has been minimized.

Copy link
Owner

commented Jul 30, 2016

@aixkalur thanks for the PR 👍

@aixkalur aixkalur deleted the aixkalur:patch-1 branch Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.