File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,8 @@ protected function load_messages(array $post_meta = [])
296
296
$ message_text = $ post_meta [ 'text_ ' . $ key ][0 ];
297
297
}
298
298
299
- $ messages [ $ key ] = $ message_text ;
299
+ // run final value through gettext filter to allow translation of stored setting values
300
+ $ messages [ $ key ] = __ ($ message_text , 'mailchimp-for-wp ' );
300
301
}
301
302
302
303
return $ messages ;
Original file line number Diff line number Diff line change @@ -175,6 +175,11 @@ public function get_label_text()
175
175
$ label = $ default_options ['label ' ];
176
176
}
177
177
178
+ // run saved value through gettext filter
179
+ // this allows people to use a plugin like Loco Translate to translate this message
180
+ // without updating the setting itself
181
+ $ label = __ ($ label , 'mailchimp-for-wp ' );
182
+
178
183
/**
179
184
* Filters the checkbox label
180
185
*
You can’t perform that action at this time.
0 commit comments