| @@ -10,8 +10,9 @@ | ||
| 10 | 10 | |
| 11 | 11 | require SRFM_DIR . 'modules/gutenberg/classes/class-spec-gb-helper.php'; |
| 12 | 12 | |
| 13 | 13 | use Spec_Gb_Helper; |
| 14 | +use SRFM\Inc\Compatibility\Multilingual\String_Translator; | |
| 14 | 15 | use SRFM\Inc\Helper; |
| 15 | 16 | use SRFM\Inc\Smart_Tags; |
| 16 | 17 | |
| 17 | 18 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -102,11 +103,14 @@ | ||
| 102 | 103 | } elseif ( ! empty( $original_placeholder ) ) { |
| 103 | 104 | $this->placeholder = $original_placeholder; |
| 104 | 105 | } |
| 105 | 106 | |
| 106 | - // Translate the default placeholder text for frontend display. | |
| 107 | + // Translate the default placeholder text for frontend display. Routed through | |
| 108 | + // the multilingual provider (not just the textdomain) so it is translated on | |
| 109 | + // WPML/Polylang sites too — the default placeholder is not serialized into | |
| 110 | + // block markup, so it never reaches the per-form string package. | |
| 107 | 111 | if ( 'Select an option' === $this->placeholder ) { |
| 108 | - $this->placeholder = __( 'Select an option', 'sureforms' ); | |
| 112 | + $this->placeholder = String_Translator::get_instance()->translate_validation_message( 'srfm_dropdown_placeholder', __( 'Select an option', 'sureforms' ) ); | |
| 109 | 113 | } |
| 110 | 114 | |
| 111 | 115 | $this->show_values = apply_filters( 'srfm_show_options_values', false, $attributes['showValues'] ?? false ); |
| 112 | 116 | |