Skip to content

Commit 627eef2

Browse files
author
Jacob Middag
committed
Replace <?= and add domains to translations
1 parent eea1168 commit 627eef2

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/class-tiny-settings.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function admin_init() {
7575

7676
$field = self::get_prefixed_name('savings');
7777
register_setting('media', $field);
78-
add_settings_field($field, __('Savings'), $this->get_method('render_pending_savings'), 'media', $section);
78+
add_settings_field($field, __('Savings', 'tiny-compress-images'), $this->get_method('render_pending_savings'), 'media', $section);
7979

8080
$field = self::get_prefixed_name('preserve_data');
8181
register_setting('media', $field);
@@ -288,8 +288,7 @@ public function render_image_sizes_notice($active_image_sizes_count, $resize_ori
288288
esc_html_e('With these settings no images will be compressed.', 'tiny-compress-images');
289289
} else {
290290
$free_images_per_month = floor( Tiny_Config::MONTHLY_FREE_COMPRESSIONS / $active_image_sizes_count );
291-
printf(__('With these settings you can compress <strong> at least %s images </strong> for free each month.',
292-
'tiny-compress-images'), $free_images_per_month);
291+
printf(__('With these settings you can compress <strong> at least %s images </strong> for free each month.', 'tiny-compress-images'), $free_images_per_month);
293292
}
294293
echo '</p>';
295294
}

src/views/compress-details-processing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div class="details">
33
<span class="icon spinner"></span>
44
<span class="message">
5-
<strong><?= $compressing ?></strong>
6-
<span><?= _n('size being compressed', 'sizes being compressed', $compressing, 'tiny-compress-images') ?></span>
5+
<strong><?php echo $compressing ?></strong>
6+
<span><?php echo _n('size being compressed', 'sizes being compressed', $compressing, 'tiny-compress-images') ?></span>
77
</span>
88
</div>
99
</div>

src/views/compress-details.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@
1616
<span class="message">
1717
<strong><?php echo $tiny_metadata->get_compressed_count() ?></strong>
1818
<span>
19-
<?= htmlspecialchars(_n('size compressed', 'sizes compressed', $tiny_metadata->get_compressed_count(), 'tiny-compress-images')) ?>
19+
<?php echo htmlspecialchars(_n('size compressed', 'sizes compressed', $tiny_metadata->get_compressed_count(), 'tiny-compress-images')) ?>
2020
</span>
2121
</span>
2222
<br/>
2323
<?php } ?>
2424

2525
<?php if ($not_compressed_active > 0) { ?>
2626
<span class="message">
27-
<?= htmlspecialchars(sprintf(_n('%d size not compressed', '%d sizes not compressed', $not_compressed_active), $not_compressed_active)) ?>
27+
<?php echo htmlspecialchars(sprintf(_n('%d size not compressed', '%d sizes not compressed', $not_compressed_active, 'tiny-compress-images'), $not_compressed_active)) ?>
2828
</span>
2929
<br />
3030
<?php } ?>
3131

3232
<?php if ($missing > 0) { ?>
3333
<span class="message">
34-
<?= htmlspecialchars(sprintf(_n('%d file removed', '%d files removed', $missing), $missing)) ?>
34+
<?php echo htmlspecialchars(sprintf(_n('%d file removed', '%d files removed', $missing, 'tiny-compress-images'), $missing)) ?>
3535
</span>
3636
<br />
3737
<?php } ?>
3838

3939
<?php if ($modified > 0) { ?>
4040
<span class="message">
41-
<?= htmlspecialchars(sprintf(_n('%d file modified after compression', '%d files modified after compression', $modified), $modified)) ?>
41+
<?php echo htmlspecialchars(sprintf(_n('%d file modified after compression', '%d files modified after compression', $modified, 'tiny-compress-images'), $modified)) ?>
4242
</span>
4343
<br />
4444
<?php } ?>
@@ -52,7 +52,7 @@
5252

5353
<?php if ($error) { ?>
5454
<span class="message error_message">
55-
<?= esc_html__('Latest error', 'tiny-compress-images') . ': '. esc_html__($error, 'tiny-compress-images') ?>
55+
<?php echo esc_html__('Latest error', 'tiny-compress-images') . ': '. esc_html__($error, 'tiny-compress-images') ?>
5656
</span>
5757
<br/>
5858
<?php } ?>
@@ -65,7 +65,7 @@
6565

6666
<?php if ($tiny_metadata->can_be_compressed() && count($uncompressed) > 0) { ?>
6767
<button type="button" class="tiny-compress button button-small button-primary" data-id="<?php echo $tiny_metadata->get_id() ?>">
68-
<?= esc_html__('Compress', 'tiny-compress-images') ?>
68+
<?php echo esc_html__('Compress', 'tiny-compress-images') ?>
6969
</button>
7070
<?php } ?>
7171
</div>
@@ -82,9 +82,9 @@
8282
<th><?php esc_html_e('Compressed', 'tiny-compress-images') ?></th>
8383
<th><?php esc_html_e('Date', 'tiny-compress-images') ?></th>
8484
</tr>
85-
<?php $i = 0; ?>
85+
<?php $i = 0 ?>
8686
<?php foreach ($tiny_metadata->get_compressed_sizes() as $size) { ?>
87-
<?php $meta = $tiny_metadata->get_value($size); ?>
87+
<?php $meta = $tiny_metadata->get_value($size) ?>
8888
<tr class="<?php echo ($i % 2 == 0) ? 'even' : 'odd' ?>">
8989
<td>
9090
<?php
@@ -106,7 +106,7 @@
106106
<td><?php echo size_format($meta["output"]["size"], 1) ?></td>
107107
<td><?php echo human_time_diff($tiny_metadata->get_end_time($size)) . ' ' . esc_html__('ago', 'tiny-compress-images') ?></td>
108108
</tr>
109-
<?php $i++; ?>
109+
<?php $i++ ?>
110110
<?php } ?>
111111
<?php if ($savings['count'] > 0) { ?>
112112
<tfoot>

0 commit comments

Comments
 (0)