Genesis Translations - Version 2.0.3.1

Version Description

  • Updated Dutch translation
Download this release

Release Info

Developer DeFries
Plugin Icon 128x128 Genesis Translations
Version 2.0.3.1
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.3.1

Files changed (5) hide show
  1. genesis-translations.php +26 -22
  2. genesis20/nl_NL.mo +0 -0
  3. genesis20/nl_NL.po +6 -6
  4. readme.md +6 -35
  5. readme.txt +14 -2
genesis-translations.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin URI: http://remkusdevries.com/plugins/genesis-translations/
10
  * Description: This plugin translates the Genesis Framework into one of the available languages.
11
  * Author: Remkus de Vries
12
- * Version: 2.0.1
13
  * Author URI: http://remkusdevries.com/
14
  * License: GPLv2
15
  * Text Domain: genesis-translations
@@ -21,7 +21,7 @@
21
  *
22
  */
23
  define( 'GENTRANS_FILE', 'genesis-translations/genesis-translations.php' );
24
- define( 'GENTRANS_VERSION', '2.0.0' );
25
 
26
  /**
27
  * The text domain for the plugin
@@ -49,17 +49,7 @@ load_plugin_textdomain( 'genesis-translations', false, 'genesis-translations/lan
49
  * @param string $length Any whole integer
50
  * @return string
51
  */
52
- function fst_genesis_translations_version_check( $str, $length=10 ) {
53
 
54
- if ( strlen( $str ) > $length ) {
55
- return substr( $str, 0, $length );
56
-
57
- } else {
58
- $res = $str;
59
- }
60
-
61
- return $res;
62
- }
63
 
64
  register_activation_hook( __FILE__, 'fst_genesis_translations_activation_check' );
65
  /**
@@ -68,22 +58,27 @@ register_activation_hook( __FILE__, 'fst_genesis_translations_activation_check'
68
  * @author Nathan Rice, Remkus de Vries
69
  * @uses fst_genesis_translations_activation_check()
70
  * @since 1.0
71
- * @version 1.0
72
  */
73
  function fst_genesis_translations_activation_check() {
74
 
75
- $latest = '1.7';
 
76
 
77
- $theme_info = get_theme_data( get_template_directory() . '/style.css' );
 
78
 
 
 
 
 
79
  if ( basename( get_template_directory() ) != 'genesis' ) {
80
  deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate ourself
81
  wp_die( sprintf( __( 'Whoa.. the translation this plugin only works, really, when you have installed the %1$sGenesis Framework%2$s', GTRANS_DOMAIN ), '<a href="http://forsitemedia.net/go/genesis/" target="_new">', '</a>' ) );
82
  }
83
 
84
- $version = fst_genesis_translations_version_check( $theme_info['Version'], 3 );
85
-
86
- if ( version_compare( $version, $latest, '<' ) ) {
87
  deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate ourself
88
  wp_die( sprintf( __( 'Uhm, the thing of it is, you kinda need the %1$sGenesis Framework %2$s%3$s or greater for these translations to make any sense.', GTRANS_DOMAIN ), '<a href="http://forsitemedia.net/go/genesis/" target="_new">', $latest, '</a>' ) );
89
  }
@@ -98,16 +93,25 @@ add_action( 'genesis_init', 'fst_set_genesis_language_dir', 1 );
98
  * @author Remkus de Vries, Daan Kortenbach
99
  * @access public
100
  * @return void
 
 
101
  */
102
  function fst_set_genesis_language_dir() {
103
 
104
- $theme_info = get_theme_data( get_template_directory() . '/style.css' );
105
- $version = fst_genesis_translations_version_check( $theme_info['Version'], 3 );
106
- $latest = '1.9.1';
 
 
 
 
 
107
 
 
108
  $fstlang = WP_CONTENT_DIR.'/plugins/' .str_replace( basename( __FILE__ ), "", plugin_basename( __FILE__ ) );
109
 
110
- if ( version_compare( $version, $latest, '>' ) ) {
 
111
  define( 'GENESIS_LANGUAGES_DIR', $fstlang . 'genesis-translations/' );
112
  }
113
  else {
9
  * Plugin URI: http://remkusdevries.com/plugins/genesis-translations/
10
  * Description: This plugin translates the Genesis Framework into one of the available languages.
11
  * Author: Remkus de Vries
12
+ * Version: 2.0.3.1
13
  * Author URI: http://remkusdevries.com/
14
  * License: GPLv2
15
  * Text Domain: genesis-translations
21
  *
22
  */
23
  define( 'GENTRANS_FILE', 'genesis-translations/genesis-translations.php' );
24
+ define( 'GENTRANS_VERSION', '2.0.3.1' );
25
 
26
  /**
27
  * The text domain for the plugin
49
  * @param string $length Any whole integer
50
  * @return string
51
  */
 
52
 
 
 
 
 
 
 
 
 
 
53
 
54
  register_activation_hook( __FILE__, 'fst_genesis_translations_activation_check' );
55
  /**
58
  * @author Nathan Rice, Remkus de Vries
59
  * @uses fst_genesis_translations_activation_check()
60
  * @since 1.0
61
+ * @version 2.0.2
62
  */
63
  function fst_genesis_translations_activation_check() {
64
 
65
+ // Find Genesis Theme Data
66
+ $theme = wp_get_theme( 'genesis' );
67
 
68
+ // Get the version
69
+ $version = $theme->get( 'Version' );
70
 
71
+ // Set what we consider the minimum Genesis version
72
+ $minimum_genesis_version = '1.7';
73
+
74
+ // Restrict activation to only when the Genesis Framework is activated
75
  if ( basename( get_template_directory() ) != 'genesis' ) {
76
  deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate ourself
77
  wp_die( sprintf( __( 'Whoa.. the translation this plugin only works, really, when you have installed the %1$sGenesis Framework%2$s', GTRANS_DOMAIN ), '<a href="http://forsitemedia.net/go/genesis/" target="_new">', '</a>' ) );
78
  }
79
 
80
+ // Set a minimum version of the Genesis Framework to be activated on
81
+ if ( version_compare( $version, $minimum_genesis_version, '<' ) ) {
 
82
  deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate ourself
83
  wp_die( sprintf( __( 'Uhm, the thing of it is, you kinda need the %1$sGenesis Framework %2$s%3$s or greater for these translations to make any sense.', GTRANS_DOMAIN ), '<a href="http://forsitemedia.net/go/genesis/" target="_new">', $latest, '</a>' ) );
84
  }
93
  * @author Remkus de Vries, Daan Kortenbach
94
  * @access public
95
  * @return void
96
+ * @since 1.0
97
+ * @version 2.0.2
98
  */
99
  function fst_set_genesis_language_dir() {
100
 
101
+ // Find Genesis Theme Data
102
+ $theme = wp_get_theme( 'genesis' );
103
+
104
+ // Get the version
105
+ $version = $theme->get( 'Version' );
106
+
107
+ // Set what we consider the old translation version
108
+ $old_translations = '1.9.1';
109
 
110
+ // Get root path to translations
111
  $fstlang = WP_CONTENT_DIR.'/plugins/' .str_replace( basename( __FILE__ ), "", plugin_basename( __FILE__ ) );
112
 
113
+ // Compare Genesis version with what is set as old translation
114
+ if ( version_compare( $version, $old_translations, '>' ) ) {
115
  define( 'GENESIS_LANGUAGES_DIR', $fstlang . 'genesis-translations/' );
116
  }
117
  else {
genesis20/nl_NL.mo CHANGED
Binary file
genesis20/nl_NL.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Genesis 2.0 package.
3
  msgid ""
4
  msgstr ""
5
- "PO-Revision-Date: 2013-12-09 16:33:35+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -82,7 +82,7 @@ msgstr ""
82
 
83
  #: lib/admin/import-export.php:130
84
  msgid "Upload the data file (%s) from your computer and we'll import your settings."
85
- msgstr ""
86
 
87
  #: lib/admin/cpt-archive-settings.php:276
88
  msgid "This lets you select the layout for the archive page. On most of the child themes you'll see these options:"
@@ -130,11 +130,11 @@ msgstr ""
130
 
131
  #: lib/admin/theme-settings.php:259
132
  msgid "The Primary Navigation Extras typically display on the right side of your Primary Navigation menu."
133
- msgstr ""
134
 
135
  #: lib/admin/theme-settings.php:261
136
  msgid "Today's date displays the current date"
137
- msgstr ""
138
 
139
  #: lib/admin/theme-settings.php:262
140
  msgid "RSS feed link displays a link to the RSS feed for your site that a reader can use to subscribe to your site using the feedreader of their choice."
@@ -154,7 +154,7 @@ msgstr ""
154
 
155
  #: lib/functions/upgrade.php:559
156
  msgid "Genesis %s is available. <a href=\"%s\" %s>Check out what's new</a> or <a href=\"%s\" %s>update now.</a>"
157
- msgstr ""
158
 
159
  #: lib/admin/import-export.php:68
160
  msgid "This allows you to import or export Genesis Settings."
@@ -2038,7 +2038,7 @@ msgstr "Saai, maar wel belangrijk"
2038
 
2039
  #: lib/admin/whats-new.php:95
2040
  msgid "Better named loop hooks for HTML5."
2041
- msgstr ""
2042
 
2043
  #: lib/admin/whats-new.php:96
2044
  msgid "Network Upgrade now upgrades the Genesis database for all sites in a network when running WordPress in multisite mode."
2
  # This file is distributed under the same license as the Genesis 2.0 package.
3
  msgid ""
4
  msgstr ""
5
+ "PO-Revision-Date: 2013-12-11 13:05:33+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
82
 
83
  #: lib/admin/import-export.php:130
84
  msgid "Upload the data file (%s) from your computer and we'll import your settings."
85
+ msgstr "Upload het bestand (%s) vanaf je computer en dan importeren we je instellingen."
86
 
87
  #: lib/admin/cpt-archive-settings.php:276
88
  msgid "This lets you select the layout for the archive page. On most of the child themes you'll see these options:"
130
 
131
  #: lib/admin/theme-settings.php:259
132
  msgid "The Primary Navigation Extras typically display on the right side of your Primary Navigation menu."
133
+ msgstr "De Primaire Navigatie Extra's worden normaliter rechts van je Primaire Navigatie getoond."
134
 
135
  #: lib/admin/theme-settings.php:261
136
  msgid "Today's date displays the current date"
137
+ msgstr "Toont de datum van vandaag"
138
 
139
  #: lib/admin/theme-settings.php:262
140
  msgid "RSS feed link displays a link to the RSS feed for your site that a reader can use to subscribe to your site using the feedreader of their choice."
154
 
155
  #: lib/functions/upgrade.php:559
156
  msgid "Genesis %s is available. <a href=\"%s\" %s>Check out what's new</a> or <a href=\"%s\" %s>update now.</a>"
157
+ msgstr "Genesis %s is beschikbaar. <a href=\"%s\" %s>Kijk wat er nieuw is (Engels)</a> of <a href=\"%s\" %s>werk direct bij.</a>"
158
 
159
  #: lib/admin/import-export.php:68
160
  msgid "This allows you to import or export Genesis Settings."
2038
 
2039
  #: lib/admin/whats-new.php:95
2040
  msgid "Better named loop hooks for HTML5."
2041
+ msgstr "Beter benoemde loop hooks voor HMTL5."
2042
 
2043
  #: lib/admin/whats-new.php:96
2044
  msgid "Network Upgrade now upgrades the Genesis database for all sites in a network when running WordPress in multisite mode."
readme.md CHANGED
@@ -3,45 +3,16 @@
3
  * Contributors: DeFries
4
  * Donate link: http://remkusdevries.com/donate/
5
  * Tags: genesis, translations,
6
- * Requires at least: 3.1
7
- * Tested up to: 3.5.
8
- * Stable tag: 1.9.1
9
-
10
  Translate your Genesis Framework powered WordPress site into one of the available languages.
11
 
12
  ## Description
13
 
14
- This plugin translates your Genesis powered WordPress site easily with one of the available languages. No need to fuss about with your `functions.php` file or uploading `.mo` and `.po` files. Just install this plugin et voil&aacute;! If you're curious about the status of your translations you can check out the translations here: http://translate.studiopress.com/ and if you'd like the improve your language you will need to register [here](http://translations.studiopress.com/home/) first.
15
-
16
- Currently the following translations are available for Genesis 1.9.x
17
-
18
- * Afrikaans - Af
19
- * Arabic - Ar
20
- * Croatian - hr
21
- * Danish - da_DK
22
- * Dutch - nl_NL
23
- * Italian - it_IT
24
- * German - de_DE
25
- * Finnish - fi
26
- * Romanian - ro_RO
27
- * Vietnamese - vi_VI
28
- * Bulgarian - bg_BG
29
- * Swedish - sv_SE
30
- * Spanish - es_ES
31
- * French - fr_FR
32
- * Indonesian - id_ID
33
- * Turkish - tr_TR
34
- * Russian - ru_RU
35
- * Norwegian - nb_NO
36
- * Portuguese-Brazilian - pt_BR
37
- * Greek - el_GR
38
- * Hebrew - he_IL
39
- * Polish - pl_PL
40
- * Portuguese - pt_PT
41
- * Hungarian - hu_HU
42
- * Japanese - ja
43
- * Chinese - zh_CN
44
- * Icelandic - is_IS (front-end only)
45
 
46
  So you don't see your language up here and you would like to see it added? [Please contact me](http://forsitemedia.net/contact/ "Please contact me") and we'll get you sorted.
47
 
3
  * Contributors: DeFries
4
  * Donate link: http://remkusdevries.com/donate/
5
  * Tags: genesis, translations,
6
+ * Requires at least: 3.5
7
+ * Tested up to: 3.8-RC2
8
+ * Stable tag: 2.0.1
 
9
  Translate your Genesis Framework powered WordPress site into one of the available languages.
10
 
11
  ## Description
12
 
13
+ This plugin translates the Genesis Framework into one of the available languages. No need to fuss about with your `functions.php` file or uploading `.mo` and `.po` files. Just install this plugin et voil&aacute;! If you're curious about the status of your translations you can check out the translations here: http://translate.studiopress.com/ and if you'd like the improve your language you will need to register [here](http://translations.studiopress.com/home/) first.
14
+
15
+ Check http://translate.studiopress.com to see which languages are currrently supported and how far along the translations are.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  So you don't see your language up here and you would like to see it added? [Please contact me](http://forsitemedia.net/contact/ "Please contact me") and we'll get you sorted.
18
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: DeFries
3
  Donate link: http://remkusdevries.com/donate/
4
  Tags: genesis, translations,
5
- Requires at least: 3.3
6
  Tested up to: 3.8
7
- Stable tag: 2.0.1
8
 
9
  This plugin translates the Genesis Framework into one of the available languages.
10
 
@@ -60,6 +60,14 @@ No screenshots (yet). Let me know if you need some.
60
 
61
  == Changelog ==
62
 
 
 
 
 
 
 
 
 
63
  = 2.0.1 =
64
 
65
  * Fixed notice for $theme_info on L104
@@ -155,6 +163,10 @@ Fixing a typo. It happens.
155
 
156
  == Upgrade Notice ==
157
 
 
 
 
 
158
  = 1.8.1 =
159
 
160
  * Update to reflect changes in Genesis 1.9
2
  Contributors: DeFries
3
  Donate link: http://remkusdevries.com/donate/
4
  Tags: genesis, translations,
5
+ Requires at least: 3.4
6
  Tested up to: 3.8
7
+ Stable tag: 2.0.3.1
8
 
9
  This plugin translates the Genesis Framework into one of the available languages.
10
 
60
 
61
  == Changelog ==
62
 
63
+ = 2.0.3.1 =
64
+
65
+ * Updated Dutch translation
66
+
67
+ = 2.0.2 =
68
+
69
+ * Proper fix for deprecated version check with get_theme_data
70
+
71
  = 2.0.1 =
72
 
73
  * Fixed notice for $theme_info on L104
163
 
164
  == Upgrade Notice ==
165
 
166
+ = 2.0.2 =
167
+
168
+ * Lots of changes in pretty much every single translation file plus some necessary cleanup in functions so there are no notices anymore.
169
+
170
  = 1.8.1 =
171
 
172
  * Update to reflect changes in Genesis 1.9