Skip to content

Commit

Permalink
Fixed translation loading
Browse files Browse the repository at this point in the history
  • Loading branch information
bekarice committed Feb 6, 2015
1 parent 858b12f commit 5227014
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
36 changes: 18 additions & 18 deletions i18n/languages/woocommerce-extra-product-sorting-options.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is distributed under the GNU General Public License v3.0.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Extra Product Sorting Options 2.1.0\n"
"Project-Id-Version: WooCommerce Extra Product Sorting Options 2.1.1\n"
"Report-Msgid-Bugs-To: "
"https://github.com/skyverge/woocommerce-extra-product-sorting-options/"
"issues\n"
Expand All @@ -15,94 +15,94 @@ msgstr ""
"Language-Team: LANGUAGE <LL@li.org>\n"

#: build/woocommerce-extra-product-sorting-options.php:79
#: woocommerce-extra-product-sorting-options.php:79
#: woocommerce-extra-product-sorting-options.php:94
msgid "New Default Sorting Label"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:83
#: woocommerce-extra-product-sorting-options.php:83
#: woocommerce-extra-product-sorting-options.php:98
msgid ""
"If desired, enter a new name for the default sorting option, e.g., "
"&quot;Our Sorting&quot;"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:86
#: woocommerce-extra-product-sorting-options.php:86
#: woocommerce-extra-product-sorting-options.php:101
msgid "Add Product Sorting:"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:87
#: woocommerce-extra-product-sorting-options.php:87
#: woocommerce-extra-product-sorting-options.php:102
msgid ""
"Select sorting options to add to your shop. \"Available Stock\" sorts "
"products with the most stock first."
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:88
#: woocommerce-extra-product-sorting-options.php:88
#: woocommerce-extra-product-sorting-options.php:103
msgid ""
"&quot;On-sale First&quot; shows simple products on sale first; <a "
"href=\"https://wordpress.org/plugins/woocommerce-extra-product-sorting-"
"options/faq/\" target=\"_blank\">see documentation</a> for more details."
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:93
#: woocommerce-extra-product-sorting-options.php:93
#: woocommerce-extra-product-sorting-options.php:108
msgid "Name: A to Z"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:94
#: woocommerce-extra-product-sorting-options.php:94
#: woocommerce-extra-product-sorting-options.php:109
msgid "Name: Z to A"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:95
#: woocommerce-extra-product-sorting-options.php:95
#: woocommerce-extra-product-sorting-options.php:110
msgid "Available Stock"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:96
#: woocommerce-extra-product-sorting-options.php:96
#: woocommerce-extra-product-sorting-options.php:111
msgid "Featured First"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:97
#: woocommerce-extra-product-sorting-options.php:97
#: woocommerce-extra-product-sorting-options.php:112
msgid "On-sale First"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:98
#: woocommerce-extra-product-sorting-options.php:98
#: woocommerce-extra-product-sorting-options.php:113
msgid "Random"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:134
#: woocommerce-extra-product-sorting-options.php:134
#: woocommerce-extra-product-sorting-options.php:149
msgid "Sort by name: A to Z"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:138
#: woocommerce-extra-product-sorting-options.php:138
#: woocommerce-extra-product-sorting-options.php:153
msgid "Sort by name: Z to A"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:142
#: woocommerce-extra-product-sorting-options.php:142
#: woocommerce-extra-product-sorting-options.php:157
msgid "Sort by availability"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:146
#: woocommerce-extra-product-sorting-options.php:146
#: woocommerce-extra-product-sorting-options.php:161
msgid "Show sale items first"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:150
#: woocommerce-extra-product-sorting-options.php:150
#: woocommerce-extra-product-sorting-options.php:165
msgid "Show featured items first"
msgstr ""

#: build/woocommerce-extra-product-sorting-options.php:154
#: woocommerce-extra-product-sorting-options.php:154
#: woocommerce-extra-product-sorting-options.php:169
msgid "Sort by: random order"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires at least: 3.8
Tested up to: 4.1
Requires WooCommerce at least: 2.1
Tested WooCommerce up to: 2.3
Stable Tag: 2.1.0
Stable Tag: 2.1.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -90,6 +90,9 @@ Yes you can! Join in on our [GitHub repository](https://github.com/bekarice/wooc

== Changelog ==

= 2015.02.06 - version 2.1.1 =
* Fix: bug with loading translations

= 2015.02.03 - version 2.1.0 =
* Misc: WooCommerce 2.3 compatibility

Expand Down
17 changes: 16 additions & 1 deletion woocommerce-extra-product-sorting-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Rename default sorting and optionally extra product sorting options.
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 2.1.0
* Version: 2.1.1
* Text Domain: wc-extra-sorting-options
*
* Copyright: (c) 2012-2015 SkyVerge, Inc. (info@skyverge.com)
Expand All @@ -30,6 +30,8 @@
* Adds sorting by name, on sale, featured, availability, and random to shop pages.
*
*/


class WC_Extra_Sorting_Options {


Expand All @@ -47,6 +49,8 @@ public function __construct() {
// add new product sorting arguments
add_filter( 'woocommerce_get_catalog_ordering_args', array( $this, 'add_new_shop_ordering_args' ) );

// load translations
add_action( 'init', array( $this, 'load_translation' ) );

if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {

Expand All @@ -59,6 +63,17 @@ public function __construct() {
}


/**
* Load Translations
*
* @since 2.1.1
*/
public function load_translation() {
// localization
load_plugin_textdomain( 'wc-extra-sorting-options', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/languages' );
}


/**
*Add Settings to WooCommerce Settings > Products page after "Default Product Sorting" setting
*
Expand Down

0 comments on commit 5227014

Please sign in to comment.