From 57e25cdb740346ed08137fef9acaafbf61d35ee1 Mon Sep 17 00:00:00 2001 From: pedro-mendonca Date: Thu, 4 Oct 2018 11:24:37 +0100 Subject: [PATCH] Change textodomain to wp.org plugin slug --- .../admin/partials/widget-form.php | 2 +- .../includes/class-ipma-widget-i18n.php | 2 +- .../includes/class-ipma-widget.php | 2 +- ipma-weather-widget/ipma-widget.php | 2 +- .../public/class-ipma-widget-public.php | 56 +++++++++---------- .../public/partials/widget.php | 20 +++---- .../widgets/class-meteo-ipma.php | 6 +- 7 files changed, 45 insertions(+), 45 deletions(-) diff --git a/ipma-weather-widget/admin/partials/widget-form.php b/ipma-weather-widget/admin/partials/widget-form.php index e3dc9d3..7357d2d 100644 --- a/ipma-weather-widget/admin/partials/widget-form.php +++ b/ipma-weather-widget/admin/partials/widget-form.php @@ -13,6 +13,6 @@ ?>

- +

diff --git a/ipma-weather-widget/includes/class-ipma-widget-i18n.php b/ipma-weather-widget/includes/class-ipma-widget-i18n.php index 50d9dc9..fe55ab6 100644 --- a/ipma-weather-widget/includes/class-ipma-widget-i18n.php +++ b/ipma-weather-widget/includes/class-ipma-widget-i18n.php @@ -22,7 +22,7 @@ class IPMA_Widget_I18n { public function load_plugin_textdomain() { load_plugin_textdomain( - 'ipma-widget', + 'ipma-weather-widget', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' ); diff --git a/ipma-weather-widget/includes/class-ipma-widget.php b/ipma-weather-widget/includes/class-ipma-widget.php index 652a808..268daf3 100644 --- a/ipma-weather-widget/includes/class-ipma-widget.php +++ b/ipma-weather-widget/includes/class-ipma-widget.php @@ -177,7 +177,7 @@ private function define_public_hooks() { */ public function render_shortcode( $atts, $contents = null ) { $args = array( - 'widget_name' => __( 'Forecast', 'ipma-widget' ), + 'widget_name' => __( 'Forecast', 'ipma-weather-widget' ), 'horizontal' => true, ); ob_start(); diff --git a/ipma-weather-widget/ipma-widget.php b/ipma-weather-widget/ipma-widget.php index 69b31e5..893171a 100644 --- a/ipma-weather-widget/ipma-widget.php +++ b/ipma-weather-widget/ipma-widget.php @@ -14,7 +14,7 @@ * Author URI: http://dipcode.com/ * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt - * Text Domain: ipma-widget + * Text Domain: ipma-weather-widget * Domain Path: /languages */ diff --git a/ipma-weather-widget/public/class-ipma-widget-public.php b/ipma-weather-widget/public/class-ipma-widget-public.php index c5c5d20..b262733 100644 --- a/ipma-weather-widget/public/class-ipma-widget-public.php +++ b/ipma-weather-widget/public/class-ipma-widget-public.php @@ -95,34 +95,34 @@ public function javascript_translations() { * List of all translatable strings to be rendered client-side. */ return array( - 'forecast00' => __( 'Not available', 'ipma-widget' ), - 'forecast01' => __( 'Clear sky', 'ipma-widget' ), - 'forecast02' => __( 'Partly cloudy', 'ipma-widget' ), - 'forecast03' => __( 'Mostly partly cloudy', 'ipma-widget' ), - 'forecast04' => __( 'Cloudy sky', 'ipma-widget' ), - 'forecast05' => __( 'Cloudy (high clouds)', 'ipma-widget' ), - 'forecast06' => __( 'Showers', 'ipma-widget' ), - 'forecast07' => __( 'Light showers', 'ipma-widget' ), - 'forecast08' => __( 'Heavy showers', 'ipma-widget' ), - 'forecast19' => __( 'Rain', 'ipma-widget' ), - 'forecast20' => __( 'Light rain', 'ipma-widget' ), - 'forecast21' => __( 'Heavy rain', 'ipma-widget' ), - 'forecast22' => __( 'Intermittent rain', 'ipma-widget' ), - 'forecast23' => __( 'Light intermittent rain', 'ipma-widget' ), - 'forecast24' => __( 'Heavy intermittent rain', 'ipma-widget' ), - 'forecast25' => __( 'Drizzle', 'ipma-widget' ), - 'forecast26' => __( 'Mist', 'ipma-widget' ), - 'forecast27' => __( 'Fog and low clouds', 'ipma-widget' ), - 'forecast28' => __( 'Snow', 'ipma-widget' ), - 'forecast29' => __( 'Lightning', 'ipma-widget' ), - 'forecast30' => __( 'Intermittent rain and lightning', 'ipma-widget' ), - 'forecast31' => __( 'Hail', 'ipma-widget' ), - 'forecast32' => __( 'Frost', 'ipma-widget' ), - 'forecast33' => __( 'Heavy rain and lightning', 'ipma-widget' ), - 'forecast34' => __( 'Convective clouds', 'ipma-widget' ), - 'forecast35' => __( 'Cloudy sky', 'ipma-widget' ), - 'forecast36' => __( 'Fog', 'ipma-widget' ), - 'forecast37' => __( 'Cloudy sky', 'ipma-widget' ), + 'forecast00' => __( 'Not available', 'ipma-weather-widget' ), + 'forecast01' => __( 'Clear sky', 'ipma-weather-widget' ), + 'forecast02' => __( 'Partly cloudy', 'ipma-weather-widget' ), + 'forecast03' => __( 'Mostly partly cloudy', 'ipma-weather-widget' ), + 'forecast04' => __( 'Cloudy sky', 'ipma-weather-widget' ), + 'forecast05' => __( 'Cloudy (high clouds)', 'ipma-weather-widget' ), + 'forecast06' => __( 'Showers', 'ipma-weather-widget' ), + 'forecast07' => __( 'Light showers', 'ipma-weather-widget' ), + 'forecast08' => __( 'Heavy showers', 'ipma-weather-widget' ), + 'forecast19' => __( 'Rain', 'ipma-weather-widget' ), + 'forecast20' => __( 'Light rain', 'ipma-weather-widget' ), + 'forecast21' => __( 'Heavy rain', 'ipma-weather-widget' ), + 'forecast22' => __( 'Intermittent rain', 'ipma-weather-widget' ), + 'forecast23' => __( 'Light intermittent rain', 'ipma-weather-widget' ), + 'forecast24' => __( 'Heavy intermittent rain', 'ipma-weather-widget' ), + 'forecast25' => __( 'Drizzle', 'ipma-weather-widget' ), + 'forecast26' => __( 'Mist', 'ipma-weather-widget' ), + 'forecast27' => __( 'Fog and low clouds', 'ipma-weather-widget' ), + 'forecast28' => __( 'Snow', 'ipma-weather-widget' ), + 'forecast29' => __( 'Lightning', 'ipma-weather-widget' ), + 'forecast30' => __( 'Intermittent rain and lightning', 'ipma-weather-widget' ), + 'forecast31' => __( 'Hail', 'ipma-weather-widget' ), + 'forecast32' => __( 'Frost', 'ipma-weather-widget' ), + 'forecast33' => __( 'Heavy rain and lightning', 'ipma-weather-widget' ), + 'forecast34' => __( 'Convective clouds', 'ipma-weather-widget' ), + 'forecast35' => __( 'Cloudy sky', 'ipma-weather-widget' ), + 'forecast36' => __( 'Fog', 'ipma-weather-widget' ), + 'forecast37' => __( 'Cloudy sky', 'ipma-weather-widget' ), ); } } diff --git a/ipma-weather-widget/public/partials/widget.php b/ipma-weather-widget/public/partials/widget.php index 84f0081..adf1997 100644 --- a/ipma-weather-widget/public/partials/widget.php +++ b/ipma-weather-widget/public/partials/widget.php @@ -22,8 +22,8 @@ ?>
@@ -31,14 +31,14 @@
diff --git a/ipma-weather-widget/widgets/class-meteo-ipma.php b/ipma-weather-widget/widgets/class-meteo-ipma.php index 705887a..21635d7 100644 --- a/ipma-weather-widget/widgets/class-meteo-ipma.php +++ b/ipma-weather-widget/widgets/class-meteo-ipma.php @@ -35,10 +35,10 @@ class Meteo_IPMA extends WP_Widget { public function __construct() { parent::__construct( $this->get_widget_slug(), - __( 'Weather Forecast in Portugal', 'ipma-widget' ), + __( 'Weather Forecast in Portugal', 'ipma-weather-widget' ), array( 'classname' => 'ipma-widget-class', - 'description' => __( 'Provides a weather forecast for Portuguese regions', 'ipma-widget' ), + 'description' => __( 'Provides a weather forecast for Portuguese regions', 'ipma-weather-widget' ), ) ); } @@ -113,7 +113,7 @@ public function form( $instance ) { (array) $instance ); - $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'New title', 'ipma-widget' ); + $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'New title', 'ipma-weather-widget' ); $title_id = $this->get_field_id( 'title' ); $title_field = $this->get_field_name( 'title' ); include( plugin_dir_path( __DIR__ ) . 'admin/partials/widget-form.php' );