Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Update TranslationsDownloader.php #32

Merged
merged 1 commit into from Jul 30, 2016
Merged

Update TranslationsDownloader.php #32

merged 1 commit into from Jul 30, 2016

Conversation

aixkalur
Copy link
Contributor

@aixkalur aixkalur 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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

aixkalur 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
Copy link
Contributor

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
Copy link
Owner

hyyan commented Jul 30, 2016

@aixkalur thanks for the PR 👍

@aixkalur aixkalur deleted the patch-1 branch August 8, 2016 05:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants