Skip to content

Commit

Permalink
Improved: make "recommended" translatable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Apr 30, 2024
1 parent 72c86ba commit b0399c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Settings extends Admin {
* Option values for (multi)selects.
*/
const OMGF_FONT_DISPLAY_OPTIONS = [
'swap' => 'Swap (recommended)',
'swap' => 'Swap',
'auto' => 'Auto',
'block' => 'Block',
'fallback' => 'Fallback',
Expand Down
5 changes: 4 additions & 1 deletion src/Admin/Settings/Optimize.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,13 @@ public function close_task_manager() {
*
*/
public function do_display_option() {
$options = Settings::OMGF_FONT_DISPLAY_OPTIONS;
$options[ 'swap' ] .= ' (' . __( 'recommended', 'host-webfonts-local' ) . ')';

$this->do_select(
__( 'Font-Display Option', 'host-webfonts-local' ),
Settings::OMGF_OPTIMIZE_SETTING_DISPLAY_OPTION,
Settings::OMGF_FONT_DISPLAY_OPTIONS,
$options,
OMGF::get_option( Settings::OMGF_OPTIMIZE_SETTING_DISPLAY_OPTION ),
__(
'Select which value to set the font-display attribute to. Defaults to Swap (recommended).',
Expand Down

0 comments on commit b0399c3

Please sign in to comment.