diff --git a/includes/class-wc-language-pack-upgrader.php b/includes/class-wc-language-pack-upgrader.php index 47b817ea110..cd2c28c4906 100644 --- a/includes/class-wc-language-pack-upgrader.php +++ b/includes/class-wc-language-pack-upgrader.php @@ -21,7 +21,7 @@ class WC_Language_Pack_Upgrader { * * @var string */ - protected $repo = 'https://github.com/woothemes/woocommerce-language-packs/blob/v'; + protected $repo = 'https://github.com/woothemes/woocommerce-language-packs/raw/v'; /** * Initialize the language pack upgrader @@ -50,7 +50,7 @@ class WC_Language_Pack_Upgrader { * @return string */ public function get_language_package_uri() { - return $this->repo . '/' . WC_VERSION . '/' . $this->get_language() . '.zip'; + return $this->repo . WC_VERSION . '/packages/' . $this->get_language() . '.zip'; } /** diff --git a/woocommerce.php b/woocommerce.php index a88674d7b20..2af2b61a1d3 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -408,16 +408,17 @@ final class WooCommerce { */ public function load_plugin_textdomain() { $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' ); + $dir = trailingslashit( WP_LANG_DIR ); // Admin Locale if ( is_admin() ) { - load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-admin-$locale.mo" ); - load_textdomain( 'woocommerce', dirname( __FILE__ ) . "/i18n/languages/woocommerce-admin-$locale.mo" ); + load_textdomain( 'woocommerce', $dir . 'woocommerce/woocommerce-admin-' . $locale . '.mo' ); + load_textdomain( 'woocommerce', $dir . 'plugins/woocommerce-admin-' . $locale . '.mo' ); } // Global + Frontend Locale - load_textdomain( 'woocommerce', WP_LANG_DIR . "/woocommerce/woocommerce-$locale.mo" ); - load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( __FILE__ ) ) . "/i18n/languages" ); + load_textdomain( 'woocommerce', $dir . 'woocommerce/woocommerce-' . $locale . '.mo' ); + load_plugin_textdomain( 'woocommerce', false, $dir . 'plugins' ); } /**