Changeset 3355776
- Timestamp:
- 09/04/2025 04:54:50 AM (7 months ago)
- Location:
- perfecty-push-notifications/trunk
- Files:
-
- 1 added
- 2 edited
-
includes/class-perfecty-push-i18n.php (modified) (1 diff)
-
includes/class-perfecty-push.php (modified) (2 diffs)
-
languages/perfecty-push-notifications.pot (added)
Legend:
- Unmodified
- Added
- Removed
-
perfecty-push-notifications/trunk/includes/class-perfecty-push-i18n.php
r2446200 r3355776 35 35 public function load_plugin_textdomain() { 36 36 load_plugin_textdomain( 37 'perfecty-push ',37 'perfecty-push-notifications', 38 38 false, 39 39 dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' 40 40 ); 41 42 // Define text constants after textdomain is loaded 43 $this->define_text_constants(); 44 } 45 46 /** 47 * Define translatable text constants. 48 * 49 * @since 1.6.5 50 */ 51 public function define_text_constants() { 52 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_DIALOG_TITLE' ) ) { 53 define( 54 'PERFECTY_PUSH_OPTIONS_DIALOG_TITLE', 55 esc_html__( 'Do you want to receive notifications?', 'perfecty-push-notifications' ) 56 ); 57 } 58 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_DIALOG_CONTINUE' ) ) { 59 define( 60 'PERFECTY_PUSH_OPTIONS_DIALOG_CONTINUE', 61 esc_html__( 'Continue', 'perfecty-push-notifications' ) 62 ); 63 } 64 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_DIALOG_CANCEL' ) ) { 65 define( 66 'PERFECTY_PUSH_OPTIONS_DIALOG_CANCEL', 67 esc_html__( 'Not now', 'perfecty-push-notifications' ) 68 ); 69 } 70 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_TITLE' ) ) { 71 define( 72 'PERFECTY_PUSH_OPTIONS_SETTINGS_TITLE', 73 esc_html__( 'Notifications preferences', 'perfecty-push-notifications' ) 74 ); 75 } 76 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_OPT_IN' ) ) { 77 define( 78 'PERFECTY_PUSH_OPTIONS_SETTINGS_OPT_IN', 79 esc_html__( 'I want to receive notifications', 'perfecty-push-notifications' ) 80 ); 81 } 82 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_UPDATE_ERROR' ) ) { 83 define( 84 'PERFECTY_PUSH_OPTIONS_SETTINGS_UPDATE_ERROR', 85 esc_html__( 'Could not change the preference, try again', 'perfecty-push-notifications' ) 86 ); 87 } 88 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_WELCOME_MESSAGE' ) ) { 89 define( 90 'PERFECTY_PUSH_OPTIONS_SETTINGS_WELCOME_MESSAGE', 91 esc_html__( 'Congratulations, you\'re now subscribed!', 'perfecty-push-notifications' ) 92 ); 93 } 41 94 } 42 95 -
perfecty-push-notifications/trunk/includes/class-perfecty-push.php
r3355759 r3355776 110 110 } 111 111 112 /* Default control texts */113 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_DIALOG_TITLE' ) ) {114 define(115 'PERFECTY_PUSH_OPTIONS_DIALOG_TITLE',116 esc_html__( 'Do you want to receive notifications?', 'perfecty-push-notifications' )117 );118 }119 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_DIALOG_CONTINUE' ) ) {120 define(121 'PERFECTY_PUSH_OPTIONS_DIALOG_CONTINUE',122 esc_html__( 'Continue', 'perfecty-push-notifications' )123 );124 }125 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_DIALOG_CANCEL' ) ) {126 define(127 'PERFECTY_PUSH_OPTIONS_DIALOG_CANCEL',128 esc_html__( 'Not now', 'perfecty-push-notifications' )129 );130 }131 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_TITLE' ) ) {132 define(133 'PERFECTY_PUSH_OPTIONS_SETTINGS_TITLE',134 esc_html__( 'Notifications preferences', 'perfecty-push-notifications' )135 );136 }137 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_OPT_IN' ) ) {138 define(139 'PERFECTY_PUSH_OPTIONS_SETTINGS_OPT_IN',140 esc_html__( 'I want to receive notifications', 'perfecty-push-notifications' )141 );142 }143 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_UPDATE_ERROR' ) ) {144 define(145 'PERFECTY_PUSH_OPTIONS_SETTINGS_UPDATE_ERROR',146 esc_html__( 'Could not change the preference, try again', 'perfecty-push-notifications' )147 );148 }149 if ( ! defined( 'PERFECTY_PUSH_OPTIONS_SETTINGS_WELCOME_MESSAGE' ) ) {150 define(151 'PERFECTY_PUSH_OPTIONS_SETTINGS_WELCOME_MESSAGE',152 esc_html__( 'Congratulations, you\'re now subscribed!', 'perfecty-push-notifications' )153 );154 }155 112 if ( ! defined( 'PERFECTY_PUSH_UNREGISTER_CONFLICTS_EXPRESSION' ) ) { 156 113 define( … … 260 217 $plugin_i18n = new Perfecty_Push_i18n(); 261 218 262 $this->loader->add_action( ' plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );219 $this->loader->add_action( 'init', $plugin_i18n, 'load_plugin_textdomain' ); 263 220 } 264 221
Note: See TracChangeset
for help on using the changeset viewer.