Skip to content
Browse files

i18n support with a proper POT file and ensuring we're loading the te…

…xtdomain before registering our post type

Closes #15
  • Loading branch information...
1 parent 3168ad6 commit f18003830096222280a586c42055b56ac50583c8 @danielbachhuber danielbachhuber committed Oct 9, 2012
Showing with 176 additions and 3 deletions.
  1. +173 −0 languages/safe-redirect-manager.pot
  2. +3 −3 safe-redirect-manager.php
View
173 languages/safe-redirect-manager.pot
@@ -0,0 +1,173 @@
+# Copyright (C) 2012 Safe Redirect Manager
+# This file is distributed under the same license as the Safe Redirect Manager package.
+msgid ""
+msgstr ""
+"Project-Id-Version: Safe Redirect Manager 1.4-working\n"
+"Report-Msgid-Bugs-To: http://wordpress.org/tag/safe-redirect-manager\n"
+"POT-Creation-Date: 2012-10-09 23:02:23+00:00\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+
+#: safe-redirect-manager.php:259
+msgid ""
+"Safe Redirect Manager Warning: Possible redirect loops and/or chains have "
+"been created."
+msgstr ""
+
+#: safe-redirect-manager.php:266
+msgid ""
+"Safe Redirect Manager Error: You have reached the maximum allowable number "
+"of redirects"
+msgstr ""
+
+#: safe-redirect-manager.php:367 safe-redirect-manager.php:370
+msgid "Redirect rule updated."
+msgstr ""
+
+#: safe-redirect-manager.php:368
+msgid "Custom field updated."
+msgstr ""
+
+#: safe-redirect-manager.php:369
+msgid "Custom field deleted."
+msgstr ""
+
+#. translators: %s: date and time of the revision
+#: safe-redirect-manager.php:372
+msgid "Redirect rule restored to revision from %s"
+msgstr ""
+
+#: safe-redirect-manager.php:373
+msgid "Redirect rule published."
+msgstr ""
+
+#: safe-redirect-manager.php:374
+msgid "Redirect rule saved."
+msgstr ""
+
+#: safe-redirect-manager.php:375
+msgid "Redirect rule submitted."
+msgstr ""
+
+#: safe-redirect-manager.php:376
+msgid "Redirect rule scheduled for: <strong>%1$s</strong>."
+msgstr ""
+
+#. translators: Publish box date format, see http:php.net/date
+#: safe-redirect-manager.php:378
+msgid "M j, Y @ G:i"
+msgstr ""
+
+#: safe-redirect-manager.php:379
+msgid "Redirect rule draft updated."
+msgstr ""
+
+#: safe-redirect-manager.php:431
+msgid "Redirect To"
+msgstr ""
+
+#: safe-redirect-manager.php:432
+msgid "HTTP Status Code"
+msgstr ""
+
+#: safe-redirect-manager.php:435
+msgid "Redirect From"
+msgstr ""
+
+#: safe-redirect-manager.php:439
+msgid "Date"
+msgstr ""
+
+#: safe-redirect-manager.php:491
+msgctxt "post type general name"
+msgid "Safe Redirect Manager"
+msgstr ""
+
+#: safe-redirect-manager.php:492
+msgctxt "post type singular name"
+msgid "Redirect"
+msgstr ""
+
+#. #-#-#-#-# plugin.pot (Safe Redirect Manager 1.4-working) #-#-#-#-#
+#. Plugin Name of the plugin/theme
+#: safe-redirect-manager.php:494 safe-redirect-manager.php:497
+#: safe-redirect-manager.php:503
+msgid "Safe Redirect Manager"
+msgstr ""
+
+#: safe-redirect-manager.php:495
+msgid "Edit Redirect Rule"
+msgstr ""
+
+#: safe-redirect-manager.php:496
+msgid "New Redirect Rule"
+msgstr ""
+
+#: safe-redirect-manager.php:498
+msgid "View Redirect Rule"
+msgstr ""
+
+#: safe-redirect-manager.php:499
+msgid "Search Redirects"
+msgstr ""
+
+#: safe-redirect-manager.php:500
+msgid "No redirect rules found."
+msgstr ""
+
+#: safe-redirect-manager.php:501
+msgid "No redirect rules found in trash."
+msgstr ""
+
+#: safe-redirect-manager.php:544
+msgid "Redirect Settings"
+msgstr ""
+
+#: safe-redirect-manager.php:565
+msgid "Redirect From:"
+msgstr ""
+
+#: safe-redirect-manager.php:567
+msgid ""
+"This path should be relative to the root of this WordPress installation (or "
+"the sub-site, if you are running a multi-site). Appending a (*) wildcard "
+"character will match all requests with the base."
+msgstr ""
+
+#: safe-redirect-manager.php:571
+msgid "Redirect To:"
+msgstr ""
+
+#: safe-redirect-manager.php:573
+msgid ""
+"This can be a URL or a path relative to the root of your website (not your "
+"WordPress installation). Ending with a (*) wildcard character will append "
+"the request match to the redirect."
+msgstr ""
+
+#: safe-redirect-manager.php:577
+msgid "HTTP Status Code:"
+msgstr ""
+
+#: safe-redirect-manager.php:583
+msgid "If you don't know what this is, leave it as is."
+msgstr ""
+
+#. #-#-#-#-# plugin.pot (Safe Redirect Manager 1.4-working) #-#-#-#-#
+#. Plugin URI of the plugin/theme
+#. #-#-#-#-# plugin.pot (Safe Redirect Manager 1.4-working) #-#-#-#-#
+#. Author URI of the plugin/theme
+msgid "http://www.10up.com"
+msgstr ""
+
+#. Description of the plugin/theme
+msgid "Easily and safely manage HTTP redirects."
+msgstr ""
+
+#. Author of the plugin/theme
+msgid "Taylor Lovett (10up LLC), VentureBeat"
+msgstr ""
View
6 safe-redirect-manager.php
@@ -51,6 +51,7 @@ class SRM_Safe_Redirect_Manager {
* @return object
*/
public function __construct() {
+ add_action( 'init', array( $this, 'action_init' ) );
add_action( 'init', array( $this, 'action_register_post_types' ) );
add_action( 'parse_request', array( $this, 'action_parse_request' ), 0 );
add_action( 'after_theme_setup', array( $this, 'action_load_texthost' ) );
@@ -61,7 +62,6 @@ public function __construct() {
add_filter( 'post_updated_messages', array( $this, 'filter_redirect_updated_messages' ) );
add_action( 'admin_notices', array( $this, 'action_redirect_chain_alert' ) );
add_filter( 'the_title', array( $this, 'filter_admin_title' ), 100, 2 );
- add_action( 'admin_init', array( $this, 'action_admin_init' ) );
add_filter( 'bulk_actions-' . 'edit-redirect_rule', array( $this, 'filter_bulk_actions' ) );
add_action( 'admin_print_styles-edit.php', array( $this, 'action_print_logo_css' ), 10, 1 );
add_action( 'admin_print_styles-post.php', array( $this, 'action_print_logo_css' ), 10, 1 );
@@ -592,8 +592,8 @@ public function redirect_rule_metabox( $post ) {
* @uses load_plugin_textdomain, plugin_basename
* @return void
*/
- public function action_admin_init() {
- load_plugin_textdomain( 'safe-redirect-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/localization/' );
+ public function action_init() {
+ load_plugin_textdomain( 'safe-redirect-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
/**

0 comments on commit f180038

Please sign in to comment.
Something went wrong with that request. Please try again.