Permalink
Browse files

Unified textdomains to 'pods', added missing textdomains, refined tex…

…tdomain loading call, added languages folder plus default .pot file for translators
  • Loading branch information...
1 parent df01851 commit 446e1d0f7e0e7fadabb6a1140aca61b7525dd9fb @deckerweb deckerweb committed Sep 22, 2012
View
@@ -4850,7 +4850,7 @@ public function validate_package ( $data = false, $output = false ) {
echo '<ul class="pretty"><li>' . implode( '</li><li>', $warnings[ 'templates' ] ) . '</li></ul>';
}
if ( isset( $warnings[ 'pod_pages' ] ) ) {
- echo '<h4>' . __( 'Pod Page(s)' ) . '</h4>';
+ echo '<h4>' . __( 'Pod Page(s)', 'pods' ) . '</h4>';
echo '<ul class="pretty"><li>' . implode( '</li><li>', $warnings[ 'pod_pages' ] ) . '</li></ul>';
}
if ( isset( $warnings[ 'helpers' ] ) ) {
View
@@ -252,45 +252,45 @@ public function admin_menu () {
$admin_menus = array(
'pods' => array(
- 'label' => 'Setup',
+ 'label' => __( 'Setup', 'pods' ),
'function' => array( $this, 'admin_setup' ),
'access' => 'pods'
),
'pods-components' => array(
- 'label' => 'Components',
+ 'label' => __( 'Components', 'pods' ),
'function' => array( $this, 'admin_components' ),
'access' => 'pods_components'
),
'pods-settings' => array(
- 'label' => 'Settings',
+ 'label' => __( 'Settings', 'pods' ),
'function' => array( $this, 'admin_settings' ),
'access' => 'pods_settings'
),
'pods-help' => array(
- 'label' => 'Help',
+ 'label' => __( 'Help', 'pods' ),
'function' => array( $this, 'admin_help' )
)
);
if ( defined( 'PODS_DEVELOPER' ) && PODS_DEVELOPER ) {
$admin_menus = array(
'pods' => array(
- 'label' => 'Setup',
+ 'label' => __( 'Setup', 'pods' ),
'function' => array( $this, 'admin_setup' ),
'access' => 'pods'
),
'pods-components' => array(
- 'label' => 'Components',
+ 'label' => __( 'Components', 'pods' ),
'function' => array( $this, 'admin_components' ),
'access' => 'pods_components'
),
'pods-settings' => array(
- 'label' => 'Settings',
+ 'label' => __( 'Settings', 'pods' ),
'function' => array( $this, 'admin_settings' ),
'access' => 'pods_settings'
),
'pods-help' => array(
- 'label' => 'Help',
+ 'label' => __( 'Help', 'pods' ),
'function' => array( $this, 'admin_help' )
)
);
@@ -299,16 +299,16 @@ public function admin_menu () {
if ( !empty( $old_pods ) && 1 != $upgraded ) {
$admin_menus = array(
'pods-upgrade' => array(
- 'label' => 'Upgrade',
+ 'label' => __( 'Upgrade', 'pods' ),
'function' => array( $this, 'admin_upgrade' )
),
'pods-settings' => array(
- 'label' => 'Settings',
+ 'label' => __( 'Settings', 'pods' ),
'function' => array( $this, 'admin_settings' ),
'access' => 'pods_settings'
),
'pods-help' => array(
- 'label' => 'Help',
+ 'label' => __( 'Help', 'pods' ),
'function' => array( $this, 'admin_help' )
)
);
@@ -1295,4 +1295,4 @@ public function admin_ajax_relationship () {
die(); // KBAI!
}
-}
+}
@@ -70,7 +70,7 @@ function init () {
if ( ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || false === headers_sent() ) && '' == session_id() && ( !defined( 'PODS_SESSION_AUTO_START' ) || PODS_SESSION_AUTO_START ) )
@session_start();
- load_plugin_textdomain( 'pods', false, basename( plugin_basename( __FILE__ ) ) . '/languages/' );
+ load_plugin_textdomain( 'pods', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
add_shortcode( 'pods', 'pods_shortcode' );
@@ -43,7 +43,7 @@
<div id="minor-publishing">
<div id="major-publishing-actions">
<div id="publishing-action">
- <input type="submit" name="publish" id="publish" class="button-primary" value="<?php _e( 'Save' ); ?>" accesskey="p" />
+ <input type="submit" name="publish" id="publish" class="button-primary" value="<?php _e( 'Save', 'pods' ); ?>" accesskey="p" />
</div>
<!-- /#publishing-action -->
@@ -74,8 +74,8 @@ function editor( $content, $editor_id, $settings = array(), $media_buttons = tru
$tmce_class = 'active ';
}
- $toolbar .= '<a id="' . $id . '-html" class="' . $html_class . 'hide-if-no-js wp-switch-editor" onclick="wpEditor.s(this);return false;">' . __('HTML') . "</a>\n";
- $toolbar .= '<a id="' . $id . '-tmce" class="' . $tmce_class . 'hide-if-no-js wp-switch-editor" onclick="wpEditor.s(this);return false;">' . __('Visual') . "</a>\n";
+ $toolbar .= '<a id="' . $id . '-html" class="' . $html_class . 'hide-if-no-js wp-switch-editor" onclick="wpEditor.s(this);return false;">' . __( 'HTML', 'pods' ) . "</a>\n";
+ $toolbar .= '<a id="' . $id . '-tmce" class="' . $tmce_class . 'hide-if-no-js wp-switch-editor" onclick="wpEditor.s(this);return false;">' . __( 'Visual', 'pods' ) . "</a>\n";
}
if ( $media_buttons ) {
View
@@ -3,9 +3,11 @@
Plugin Name: Pods Framework
Plugin URI: http://podsframework.org/
Description: Create / Manage / Develop / Extend content types: Posts, Pages, Media, Custom Post Types, Categories, Tags, Custom Taxonomy, Comments, Users, Custom Content Types, and Custom Tables
-Version: 2.0.0 RC 1
+Version: 2.0.0
Author: Pods Framework Team
Author URI: http://podsframework.org/about/
+Text Domain: pods
+Domain Path: /languages/
Copyright 2009-2012 The Pods Framework Team (email : contact@podsframework.org)
@@ -30,7 +32,7 @@
// Prevent conflicts with Pods 1.x
if ( !defined( 'PODS_VERSION' ) && !defined( 'PODS_DIR' ) ) {
- define( 'PODS_VERSION', '2.0.0-rc-1' );
+ define( 'PODS_VERSION', '2.0.0' );
if ( !defined( 'PODS_WP_VERSION_MINIMUM' ) )
define( 'PODS_WP_VERSION_MINIMUM', '3.4' );
@@ -111,3 +113,12 @@ function pods_deactivate_1_x () {
add_action( 'init', 'pods_deactivate_1_x' );
}
+
+
+add_action( 'init', 'pods_load_plugin_textdomain', 1 );
+/**
+ * Load plugin's textdomain on 'init' and as early as possible.
+ */
+function pods_load_plugin_textdomain() {
+ load_plugin_textdomain( 'pods', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
+}
Oops, something went wrong. Retry.

0 comments on commit 446e1d0

Please sign in to comment.