Skip to content

Commit

Permalink
Global Styles: Use context when translating entries in theme.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Jan 15, 2021
1 parent 0bb4f49 commit dbe6b90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ private static function translate_presets( &$theme_json_structure, $domain = 'de
if ( empty( $item_to_translate[ $translatable_key ] ) ) {
continue;
}
// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain
$item_to_translate[ $translatable_key ] = translate( $item_to_translate[ $translatable_key ], $domain );
// phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralContext,WordPress.WP.I18n.NonSingularStringLiteralDomain
$item_to_translate[ $translatable_key ] = translate_with_gettext_context( $item_to_translate[ $translatable_key ], sprintf( 'theme %s %s', $path, $translatable_key ), $domain );
// phpcs:enable
}
}
Expand Down

0 comments on commit dbe6b90

Please sign in to comment.