Skip to content

Commit eea1168

Browse files
Small textual change on bulk compress page, and show compression/compressions based on the actual number of compressions.
1 parent ac98b98 commit eea1168

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/class-tiny-plugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public function enqueue_scripts($hook) {
8989
'L10nAllDone' => __('All images are processed', 'tiny-compress-images'),
9090
'L10nBulkAction' => __('Optimize Images', 'tiny-compress-images'),
9191
'L10nCompressing' => __('Compressing', 'tiny-compress-images'),
92+
'L10nCompression' => __('compression', 'tiny-compress-images'),
9293
'L10nCompressions' => __('compressions', 'tiny-compress-images'),
9394
'L10nError' => __('Error', 'tiny-compress-images'),
9495
'L10nInternalError' => __('Internal error', 'tiny-compress-images'),
@@ -238,7 +239,7 @@ public function bulk_compress_page() {
238239
esc_html_e('Use this tool to compress all images in your media library. Only images that have not been compressed will be compressed.', 'tiny-compress-images');
239240
echo '</p>';
240241
echo '<p>';
241-
echo sprintf(esc_html__('We have found %d images in your media library and for each image %d sizes will be compressed.', 'tiny-compress-images'),
242+
echo sprintf(esc_html__('We have found %d images in your media library and for each image a maximum of %d sizes will be compressed.', 'tiny-compress-images'),
242243
$image_count, $sizes_count) . ' ';
243244
echo sprintf(esc_html__('This results in %d compressions at most.', 'tiny-compress-images'), $image_count * $sizes_count);
244245
echo '</p>';

src/scripts/admin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@
8080
} else if (data.failed > 0) {
8181
status.addClass('failed')
8282
row.find('.bar').css('width', '100%')
83-
row.find('.percent').html(data.success + " " + tinyCompress.L10nCompressions)
83+
row.find('.percent').html(data.success + " " + (data.success == 1 ? tinyCompress.L10nCompression : tinyCompress.L10nCompressions))
8484
row.find('.progress').attr("title", data.message)
8585
} else {
8686
status.addClass('success')
8787
row.find('.bar').css('width', '100%')
88-
row.find('.percent').html(data.success + " " + tinyCompress.L10nCompressions)
88+
row.find('.percent').html(data.success + " " + (data.success == 1 ? tinyCompress.L10nCompression : tinyCompress.L10nCompressions))
8989
}
9090

9191
if (data.status) {

0 commit comments

Comments
 (0)