Skip to content

Commit

Permalink
Fix logic inversion in error message
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Birchler <[email protected]>
  • Loading branch information
westonruter and swissspidy authored Aug 22, 2024
1 parent 3a2448b commit 561c018
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/optimization-detective/class-od-url-metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private function validate_data( array $data ): void {
esc_html(
sprintf(
/* translators: 1: current aspect ratio, 2: minimum aspect ratio, 3: maximum aspect ratio */
__( 'Viewport aspect ratio (%1$s) is in the accepted range of %2$s to %3$s.', 'optimization-detective' ),
__( 'Viewport aspect ratio (%1$s) is not in the accepted range of %2$s to %3$s.', 'optimization-detective' ),
$aspect_ratio,
$min_aspect_ratio,
$max_aspect_ratio
Expand Down
2 changes: 1 addition & 1 deletion plugins/optimization-detective/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default async function detect( {
) {
if ( isDebug ) {
warn(
`Viewport aspect ratio (${ aspectRatio }) is in the accepted range of ${ minViewportAspectRatio } to ${ maxViewportAspectRatio }.`
`Viewport aspect ratio (${ aspectRatio }) is not in the accepted range of ${ minViewportAspectRatio } to ${ maxViewportAspectRatio }.`
);
}
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function data_provider(): array {
'timestamp' => microtime( true ),
'elements' => array(),
),
'error' => 'Viewport aspect ratio (0.1) is in the accepted range of 0.4 to 2.5.',
'error' => 'Viewport aspect ratio (0.1) is not in the accepted range of 0.4 to 2.5.',
),
'viewport_aspect_ratio_too_large' => array(
'data' => array(
Expand Down

0 comments on commit 561c018

Please sign in to comment.