-
By confirming the migration, you confirm that you have configured your prompt settings on the OneSignal.com dashboard.
-Are you sure you want to mark the plugin as migrated?
+ +From 54b5308b1254acb7e2f6d72a73c5ebbbe80eb6fe Mon Sep 17 00:00:00 2001 From: Jonas <44437149+ShedFlu@users.noreply.github.com> Date: Thu, 6 Nov 2025 02:04:42 +0100 Subject: [PATCH] i18n: add translation support for all user-facing strings --- onesignal.php | 4 +- v2/onesignal-admin.php | 49 +++++++----- v2/onesignal-public.php | 4 +- v2/onesignal-widget.php | 10 +-- v2/views/config.php | 92 +++++++++++----------- v3/onesignal-admin/onesignal-admin.php | 57 ++++++++------ v3/onesignal-metabox/onesignal-metabox.php | 23 +++--- 7 files changed, 134 insertions(+), 105 deletions(-) diff --git a/onesignal.php b/onesignal.php index 1cc539e..8f21ff5 100644 --- a/onesignal.php +++ b/onesignal.php @@ -10,6 +10,8 @@ * Author: OneSignal * Author URI: https://onesignal.com * License: MIT + * Text Domain: onesignal-free-web-push-notifications + * Domain Path: /languages */ // Define plugin constants @@ -69,7 +71,7 @@ function migration_notice() { $screen = get_current_screen(); if ($screen && $screen->id === 'plugins') { echo '
OneSignal Migration Needed: All OneSignal prompt configurations are moving to OneSignal.com. See the plugin page for more info.
+' . esc_html__( 'OneSignal Migration Needed:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html__( 'All OneSignal prompt configurations are moving to OneSignal.com. See the plugin page for more info.', 'onesignal-free-web-push-notifications' ) . '
OneSignal Push: Only administrators are allowed to save plugin settings.
+' . esc_html__( 'OneSignal Push:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html__( 'Only administrators are allowed to save plugin settings.', 'onesignal-free-web-push-notifications' ) . '
OneSignal Push: Your setup is not complete. Please follow the Setup guide to set up web push notifications. Both the App ID and REST API Key fields are required.
+
OneSignal Push: cURL is not installed on this server. cURL is required to send notifications. Please make sure cURL is installed on your server before continuing.
+
OneSignal Push: Please try again in '.$time_to_wait.' seconds. Only one notification can be sent every '.ONESIGNAL_API_RATE_LIMIT_SECONDS.' seconds.
+' . esc_html__( 'OneSignal Push:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html( $error_message ) . '
OneSignal Push: There was a problem sending your notification.
+' . esc_html__( 'OneSignal Push:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html__( 'There was a problem sending your notification.', 'onesignal-free-web-push-notifications' ) . '
OneSignal Push: There was a '.$status.' error sending your notification.
+' . esc_html__( 'OneSignal Push:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html( $error_message ) . '
OneSignal Push: There was an error establishing a network connection. Please make sure outgoing network connections from cURL are allowed.
+' . esc_html__( 'OneSignal Push:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html__( 'There was an error establishing a network connection. Please make sure outgoing network connections from cURL are allowed.', 'onesignal-free-web-push-notifications' ) . '
OneSignal Push: Successfully scheduled a notification.' . $delivery_link_text . '
+' . esc_html__( 'OneSignal Push:', 'onesignal-free-web-push-notifications' ) . ' ' . esc_html__( 'Successfully scheduled a notification.', 'onesignal-free-web-push-notifications' ) . $delivery_link_text . '
-
http://. Please access this page using https:// to enable this option.
+ http://. Please access this page using https:// to enable this option.', 'onesignal-free-web-push-notifications' ) ); ?>
WARNING: Changing this causes all existing subscribers to become unreachable. Please do not change unless instructed to do so!
+