PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 2.12.8
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v2.12.8
2.12.8 2.12.7 2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 All 98 releases
← All changes | inc/compatibility/multilingual/string-collector.php +12 -6 2.12.6 → 2.12.8 View file →
@@ -280,23 +280,29 @@
280 280
281 281 // reply_to is an email address (or a smart tag resolving to one), not
282 282 // human-readable copy, so it is intentionally excluded from the
283 283 // translatable set. from_name can legitimately be a localized display name.
284 + // [ meta key, label, editor type ]. The string name stays keyed on
285 + // 'body' for continuity, but the value has to be read from
286 + // `email_body` - that is what _srfm_email_notification's sanitize
287 + // callback stores, so reading 'body' always found nothing and the
288 + // message body was never registered for translation at all.
284 289 $fields = [
285 - 'subject' => [ __( 'Subject', 'sureforms' ), 'LINE' ],
286 - 'body' => [ __( 'Message body', 'sureforms' ), 'AREA' ],
287 - 'from_name' => [ __( '"From" name', 'sureforms' ), 'LINE' ],
290 + 'subject' => [ 'subject', __( 'Subject', 'sureforms' ), 'LINE' ],
291 + 'body' => [ 'email_body', __( 'Message body', 'sureforms' ), 'AREA' ],
292 + 'from_name' => [ 'from_name', __( '"From" name', 'sureforms' ), 'LINE' ],
288 293 ];
289 294 /* translators: %d is the notification number. */
290 295 $notification_group = __( 'Notifications', 'sureforms' ) . '/' . sprintf( __( 'Notification #%d', 'sureforms' ), (int) $index + 1 );
291 296 foreach ( $fields as $field => $meta ) {
292 - $value = isset( $notification[ $field ] ) ? Helper::get_string_value( $notification[ $field ] ) : '';
297 + $meta_key = $meta[0];
298 + $value = isset( $notification[ $meta_key ] ) ? Helper::get_string_value( $notification[ $meta_key ] ) : '';
293 299 $this->register_form_string(
294 300 $form_id,
295 301 String_Translator::notification_name( (int) $index, $field ),
296 302 $value,
297 - $notification_group . ': ' . $meta[0],
298 - $meta[1]
303 + $notification_group . ': ' . $meta[1],
304 + $meta[2]
299 305 );
300 306 }
301 307 }
302 308