Skip to content

Commit 6b2431e

Browse files
Kiloclaude
andcommitted
fix(i18n): use context-qualified status strings so Bulgarian reads correctly
The queue rendered a single campaign's status as "Завършена" (feminine singular) right next to "Отменени" (plural), because the same msgid served both the badge on one row and the filter links that count many items. Bulgarian and German inflect those two roles differently, so one translation cannot be right for both. Badges, type labels and select options that describe a single item now use _x() with a context ("campaign status", "email status", "campaign type", "subscriber status", "cron status", "table column header"); the plain strings stay with the filter links and stat cards and are now consistently plural in Bulgarian. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 78cd961 commit 6b2431e

14 files changed

Lines changed: 542 additions & 47 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Changed
1414

1515
### Fixed
16+
- **Bulgarian status labels no longer mix singular and plural** — the campaign queue showed a single campaign as "Завършена" (feminine singular) next to "Отменени" (plural), because one string served both the status badge of a single item and the filter links that count many. Status, type and subscriber labels that describe a single row now use context-qualified strings (`_x()`), so Bulgarian can render campaign badges as feminine singular ("Завършена", "Отменена", "Насрочена"), email badges as masculine singular ("Изпратен", "Неуспешен", "Отменен") and the filter links as plural ("Завършени", "Отменени", "Насрочени"). German keeps its existing wording, and the date columns "Sent"/"Opened"/"Scheduled" now read as column headers ("Изпратен на", "Gesendet am") instead of as filter labels.
1617

1718
### Security
1819

admin/partials/dashboard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@
160160
<h3><?php esc_html_e( 'Cron status', 'mail-system' ); ?></h3>
161161
<?php if ( $next_cron ) : ?>
162162
<div class="mskd-stat-info">
163-
<span class="mskd-cron-active"><?php esc_html_e( 'Active', 'mail-system' ); ?></span>
163+
<span class="mskd-cron-active"><?php echo esc_html( _x( 'Active', 'cron status', 'mail-system' ) ); ?></span>
164164
<?php
165165
/* translators: %s: next cron scheduled time */
166166
printf( esc_html__( 'Next run: %s', 'mail-system' ), '<p>' . esc_html( date_i18n( 'd.m.Y H:i:s', $next_cron ) ) . '</p>' );
167167
?>
168168
</div>
169169
<?php else : ?>
170170
<div class="mskd-stat-info">
171-
<span class="mskd-cron-inactive"><?php esc_html_e( 'Inactive', 'mail-system' ); ?></span>
171+
<span class="mskd-cron-inactive"><?php echo esc_html( _x( 'Inactive', 'cron status', 'mail-system' ) ); ?></span>
172172
</div>
173173
<?php endif; ?>
174174
<p class="description">

admin/partials/queue-detail.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@
169169
<span class="mskd-status mskd-status-<?php echo esc_attr( $campaign->status ); ?>">
170170
<?php
171171
$statuses = array(
172-
'pending' => __( 'Pending', 'mail-system' ),
173-
'processing' => __( 'Processing', 'mail-system' ),
174-
'completed' => __( 'Completed', 'mail-system' ),
175-
'cancelled' => __( 'Cancelled', 'mail-system' ),
172+
'pending' => _x( 'Pending', 'campaign status', 'mail-system' ),
173+
'processing' => _x( 'Processing', 'campaign status', 'mail-system' ),
174+
'completed' => _x( 'Completed', 'campaign status', 'mail-system' ),
175+
'cancelled' => _x( 'Cancelled', 'campaign status', 'mail-system' ),
176176
);
177177
echo esc_html( $statuses[ $campaign->status ] ?? $campaign->status );
178178
?>
179179
</span>
180180
<?php if ( $campaign->type === 'one_time' ) : ?>
181-
<span class="mskd-badge mskd-badge-onetime"><?php _e( 'One-time', 'mail-system' ); ?></span>
181+
<span class="mskd-badge mskd-badge-onetime"><?php echo esc_html( _x( 'One-time', 'campaign type', 'mail-system' ) ); ?></span>
182182
<?php else : ?>
183183
<span class="mskd-badge mskd-badge-campaign"><?php _e( 'Campaign', 'mail-system' ); ?></span>
184184
<?php endif; ?>
@@ -413,8 +413,8 @@ class="<?php echo $status_filter === 'cancelled' ? 'current' : ''; ?>">
413413
<th scope="col"><?php _e( 'Recipient', 'mail-system' ); ?></th>
414414
<th scope="col" style="width: 100px;"><?php _e( 'Status', 'mail-system' ); ?></th>
415415
<th scope="col" style="width: 80px;"><?php _e( 'Attempts', 'mail-system' ); ?></th>
416-
<th scope="col" style="width: 140px;"><?php _e( 'Sent', 'mail-system' ); ?></th>
417-
<th scope="col" style="width: 160px;"><?php _e( 'Opened', 'mail-system' ); ?></th>
416+
<th scope="col" style="width: 140px;"><?php echo esc_html( _x( 'Sent', 'table column header', 'mail-system' ) ); ?></th>
417+
<th scope="col" style="width: 160px;"><?php echo esc_html( _x( 'Opened', 'table column header', 'mail-system' ) ); ?></th>
418418
<th scope="col" style="width: 180px;"><?php _e( 'Clicks', 'mail-system' ); ?></th>
419419
<th scope="col"><?php _e( 'Error', 'mail-system' ); ?></th>
420420
<th scope="col" style="width: 80px;"><?php _e( 'Actions', 'mail-system' ); ?></th>
@@ -456,11 +456,11 @@ class="<?php echo $status_filter === 'cancelled' ? 'current' : ''; ?>">
456456
<span class="mskd-status mskd-status-<?php echo esc_attr( $item->status ); ?>">
457457
<?php
458458
$item_statuses = array(
459-
'pending' => __( 'Pending', 'mail-system' ),
460-
'processing' => __( 'Processing', 'mail-system' ),
461-
'sent' => __( 'Sent', 'mail-system' ),
462-
'failed' => __( 'Failed', 'mail-system' ),
463-
'cancelled' => __( 'Cancelled', 'mail-system' ),
459+
'pending' => _x( 'Pending', 'email status', 'mail-system' ),
460+
'processing' => _x( 'Processing', 'email status', 'mail-system' ),
461+
'sent' => _x( 'Sent', 'email status', 'mail-system' ),
462+
'failed' => _x( 'Failed', 'email status', 'mail-system' ),
463+
'cancelled' => _x( 'Cancelled', 'email status', 'mail-system' ),
464464
);
465465
echo esc_html( $item_statuses[ $item->status ] ?? $item->status );
466466
?>

admin/partials/queue-legacy.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ class="<?php echo $status_filter === 'cancelled' ? 'current' : ''; ?>">
123123
<th scope="col" class="mskd-col-subject"><?php esc_html_e( 'Subject', 'mail-system' ); ?></th>
124124
<th scope="col" style="width: 100px;"><?php esc_html_e( 'Status', 'mail-system' ); ?></th>
125125
<th scope="col" style="width: 80px;"><?php esc_html_e( 'Attempts', 'mail-system' ); ?></th>
126-
<th scope="col"><?php esc_html_e( 'Scheduled', 'mail-system' ); ?></th>
127-
<th scope="col"><?php esc_html_e( 'Sent', 'mail-system' ); ?></th>
126+
<th scope="col"><?php echo esc_html( _x( 'Scheduled', 'table column header', 'mail-system' ) ); ?></th>
127+
<th scope="col"><?php echo esc_html( _x( 'Sent', 'table column header', 'mail-system' ) ); ?></th>
128128
<th scope="col" style="width: 100px;"><?php esc_html_e( 'Actions', 'mail-system' ); ?></th>
129129
</tr>
130130
</thead>
@@ -167,17 +167,17 @@ class="<?php echo $status_filter === 'cancelled' ? 'current' : ''; ?>">
167167
<span class="mskd-status mskd-status-<?php echo esc_attr( $item->status ); ?>">
168168
<?php
169169
$statuses = array(
170-
'pending' => __( 'Pending', 'mail-system' ),
171-
'processing' => __( 'Processing', 'mail-system' ),
172-
'sent' => __( 'Sent', 'mail-system' ),
173-
'failed' => __( 'Failed', 'mail-system' ),
174-
'cancelled' => __( 'Cancelled', 'mail-system' ),
170+
'pending' => _x( 'Pending', 'email status', 'mail-system' ),
171+
'processing' => _x( 'Processing', 'email status', 'mail-system' ),
172+
'sent' => _x( 'Sent', 'email status', 'mail-system' ),
173+
'failed' => _x( 'Failed', 'email status', 'mail-system' ),
174+
'cancelled' => _x( 'Cancelled', 'email status', 'mail-system' ),
175175
);
176176
echo esc_html( $statuses[ $item->status ] ?? $item->status );
177177
?>
178178
</span>
179179
<?php if ( $is_future_scheduled && $item->status === 'pending' ) : ?>
180-
<br><small class="mskd-scheduled-badge"><?php esc_html_e( 'Scheduled', 'mail-system' ); ?></small>
180+
<br><small class="mskd-scheduled-badge"><?php echo esc_html( _x( 'Scheduled', 'email status', 'mail-system' ) ); ?></small>
181181
<?php endif; ?>
182182
<?php if ( $item->status === 'failed' && $item->error_message ) : ?>
183183
<br><small class="mskd-error-msg"><?php echo esc_html( $item->error_message ); ?></small>

admin/partials/queue.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class="<?php echo $type_filter === 'campaign' ? 'current' : ''; ?>">
281281
</td>
282282
<td>
283283
<?php if ( $campaign->type === 'one_time' ) : ?>
284-
<span class="mskd-badge mskd-badge-onetime"><?php esc_html_e( 'One-time', 'mail-system' ); ?></span>
284+
<span class="mskd-badge mskd-badge-onetime"><?php echo esc_html( _x( 'One-time', 'campaign type', 'mail-system' ) ); ?></span>
285285
<?php else : ?>
286286
<span class="mskd-badge mskd-badge-campaign"><?php esc_html_e( 'Campaign', 'mail-system' ); ?></span>
287287
<?php endif; ?>
@@ -337,16 +337,16 @@ class="<?php echo $type_filter === 'campaign' ? 'current' : ''; ?>">
337337
<span class="mskd-status mskd-status-<?php echo esc_attr( $campaign->status ); ?>">
338338
<?php
339339
$statuses = array(
340-
'pending' => __( 'Pending', 'mail-system' ),
341-
'processing' => __( 'Processing', 'mail-system' ),
342-
'completed' => __( 'Completed', 'mail-system' ),
343-
'cancelled' => __( 'Cancelled', 'mail-system' ),
340+
'pending' => _x( 'Pending', 'campaign status', 'mail-system' ),
341+
'processing' => _x( 'Processing', 'campaign status', 'mail-system' ),
342+
'completed' => _x( 'Completed', 'campaign status', 'mail-system' ),
343+
'cancelled' => _x( 'Cancelled', 'campaign status', 'mail-system' ),
344344
);
345345
echo esc_html( $statuses[ $campaign->status ] ?? $campaign->status );
346346
?>
347347
</span>
348348
<?php if ( $is_future_scheduled && $campaign->status === 'pending' ) : ?>
349-
<br><small class="mskd-scheduled-badge"><?php esc_html_e( 'Scheduled', 'mail-system' ); ?></small>
349+
<br><small class="mskd-scheduled-badge"><?php echo esc_html( _x( 'Scheduled', 'campaign status', 'mail-system' ) ); ?></small>
350350
<?php endif; ?>
351351
</td>
352352
<td>

admin/partials/subscribers.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@
105105
<td>
106106
<select name="status" id="status">
107107
<option value="active" <?php selected( $subscriber ? $subscriber->status : 'active', 'active' ); ?>>
108-
<?php esc_html_e( 'Active', 'mail-system' ); ?>
108+
<?php echo esc_html( _x( 'Active', 'subscriber status', 'mail-system' ) ); ?>
109109
</option>
110110
<option value="inactive" <?php selected( $subscriber ? $subscriber->status : '', 'inactive' ); ?>>
111-
<?php esc_html_e( 'Inactive', 'mail-system' ); ?>
111+
<?php echo esc_html( _x( 'Inactive', 'subscriber status', 'mail-system' ) ); ?>
112112
</option>
113113
<option value="unsubscribed" <?php selected( $subscriber ? $subscriber->status : '', 'unsubscribed' ); ?>>
114-
<?php esc_html_e( 'Unsubscribed', 'mail-system' ); ?>
114+
<?php echo esc_html( _x( 'Unsubscribed', 'subscriber status', 'mail-system' ) ); ?>
115115
</option>
116116
</select>
117117
</td>
@@ -386,9 +386,9 @@ class="<?php echo 'unsubscribed' === $status_filter ? 'current' : ''; ?>">
386386
<span class="mskd-status mskd-status-<?php echo esc_attr( $sub->status ); ?>">
387387
<?php
388388
$statuses = array(
389-
'active' => esc_html__( 'Active', 'mail-system' ),
390-
'inactive' => esc_html__( 'Inactive', 'mail-system' ),
391-
'unsubscribed' => esc_html__( 'Unsubscribed', 'mail-system' ),
389+
'active' => _x( 'Active', 'subscriber status', 'mail-system' ),
390+
'inactive' => _x( 'Inactive', 'subscriber status', 'mail-system' ),
391+
'unsubscribed' => _x( 'Unsubscribed', 'subscriber status', 'mail-system' ),
392392
);
393393
echo esc_html( $statuses[ $sub->status ] ?? $sub->status );
394394
?>

includes/Admin/class-admin-assets.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ private function get_localized_strings(): array {
173173
'copy_error' => __( 'Copy failed', 'mail-system' ),
174174
'no_subscribers_selected' => __( 'No subscribers selected.', 'mail-system' ),
175175
'no_lists_selected' => __( 'No lists selected.', 'mail-system' ),
176-
'status_active' => __( 'Active', 'mail-system' ),
177-
'status_inactive' => __( 'Inactive', 'mail-system' ),
176+
'status_active' => _x( 'Active', 'subscriber status', 'mail-system' ),
177+
'status_inactive' => _x( 'Inactive', 'subscriber status', 'mail-system' ),
178178
);
179179
}
180180
}

languages/mail-system-bg_BG.mo

1.13 KB
Binary file not shown.

languages/mail-system-bg_BG.po

Lines changed: 106 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,15 @@ msgstr "Cron статус"
327327

328328
#: admin/partials/dashboard.php
329329
msgid "Active"
330-
msgstr "Активен"
330+
msgstr "Активни"
331331

332332
#: admin/partials/dashboard.php
333333
msgid "Next run: %s"
334334
msgstr "Следващо изпълнение: %s"
335335

336336
#: admin/partials/dashboard.php
337337
msgid "Inactive"
338-
msgstr "Неактивен"
338+
msgstr "Неактивни"
339339

340340
#: admin/partials/dashboard.php
341341
msgid "Sending: %d emails/min"
@@ -367,7 +367,7 @@ msgstr "Статус"
367367

368368
#: admin/partials/subscribers.php
369369
msgid "Unsubscribed"
370-
msgstr "Отписан"
370+
msgstr "Отписани"
371371

372372
#: admin/partials/subscribers.php
373373
msgid "No lists created."
@@ -546,11 +546,11 @@ msgstr "%d имейла/мин"
546546

547547
#: admin/partials/queue.php
548548
msgid "Scheduled"
549-
msgstr "Насрочен"
549+
msgstr "Насрочени"
550550

551551
#: admin/partials/queue.php
552552
msgid "Pending"
553-
msgstr "Чакащ"
553+
msgstr "Чакащи"
554554

555555
#: admin/partials/queue.php
556556
msgid "Processing"
@@ -1154,7 +1154,7 @@ msgstr ""
11541154

11551155
#: admin/partials/queue.php
11561156
msgid "Completed"
1157-
msgstr "Завършена"
1157+
msgstr "Завършени"
11581158

11591159
#: admin/partials/queue.php
11601160
msgid "Campaigns"
@@ -2994,3 +2994,103 @@ msgstr "Достъпът за запис изисква обхват за чет
29942994
#: admin/partials/api-access.php:74
29952995
msgid "e.g. Newsletter scheduler"
29962996
msgstr "напр. Планировчик на бюлетини"
2997+
2998+
#: admin/partials/queue.php, admin/partials/queue-detail.php
2999+
msgctxt "campaign status"
3000+
msgid "Pending"
3001+
msgstr "Чакаща"
3002+
3003+
#: admin/partials/queue.php, admin/partials/queue-detail.php
3004+
msgctxt "campaign status"
3005+
msgid "Processing"
3006+
msgstr "В процес"
3007+
3008+
#: admin/partials/queue.php, admin/partials/queue-detail.php
3009+
msgctxt "campaign status"
3010+
msgid "Completed"
3011+
msgstr "Завършена"
3012+
3013+
#: admin/partials/queue.php, admin/partials/queue-detail.php
3014+
msgctxt "campaign status"
3015+
msgid "Cancelled"
3016+
msgstr "Отменена"
3017+
3018+
#: admin/partials/queue.php
3019+
msgctxt "campaign status"
3020+
msgid "Scheduled"
3021+
msgstr "Насрочена"
3022+
3023+
#: admin/partials/queue-detail.php, admin/partials/queue-legacy.php
3024+
msgctxt "email status"
3025+
msgid "Pending"
3026+
msgstr "Чакащ"
3027+
3028+
#: admin/partials/queue-detail.php, admin/partials/queue-legacy.php
3029+
msgctxt "email status"
3030+
msgid "Processing"
3031+
msgstr "В процес"
3032+
3033+
#: admin/partials/queue-detail.php, admin/partials/queue-legacy.php
3034+
msgctxt "email status"
3035+
msgid "Sent"
3036+
msgstr "Изпратен"
3037+
3038+
#: admin/partials/queue-detail.php, admin/partials/queue-legacy.php
3039+
msgctxt "email status"
3040+
msgid "Failed"
3041+
msgstr "Неуспешен"
3042+
3043+
#: admin/partials/queue-detail.php, admin/partials/queue-legacy.php
3044+
msgctxt "email status"
3045+
msgid "Cancelled"
3046+
msgstr "Отменен"
3047+
3048+
#: admin/partials/queue-legacy.php
3049+
msgctxt "email status"
3050+
msgid "Scheduled"
3051+
msgstr "Насрочен"
3052+
3053+
#: admin/partials/queue.php, admin/partials/queue-detail.php
3054+
msgctxt "campaign type"
3055+
msgid "One-time"
3056+
msgstr "Еднократна"
3057+
3058+
#: admin/partials/queue-detail.php, admin/partials/queue-legacy.php
3059+
msgctxt "table column header"
3060+
msgid "Sent"
3061+
msgstr "Изпратен на"
3062+
3063+
#: admin/partials/queue-detail.php
3064+
msgctxt "table column header"
3065+
msgid "Opened"
3066+
msgstr "Отворен на"
3067+
3068+
#: admin/partials/queue-legacy.php
3069+
msgctxt "table column header"
3070+
msgid "Scheduled"
3071+
msgstr "Насрочен за"
3072+
3073+
#: admin/partials/subscribers.php, includes/Admin/class-admin-assets.php
3074+
msgctxt "subscriber status"
3075+
msgid "Active"
3076+
msgstr "Активен"
3077+
3078+
#: admin/partials/subscribers.php, includes/Admin/class-admin-assets.php
3079+
msgctxt "subscriber status"
3080+
msgid "Inactive"
3081+
msgstr "Неактивен"
3082+
3083+
#: admin/partials/subscribers.php
3084+
msgctxt "subscriber status"
3085+
msgid "Unsubscribed"
3086+
msgstr "Отписан"
3087+
3088+
#: admin/partials/dashboard.php
3089+
msgctxt "cron status"
3090+
msgid "Active"
3091+
msgstr "Активен"
3092+
3093+
#: admin/partials/dashboard.php
3094+
msgctxt "cron status"
3095+
msgid "Inactive"
3096+
msgstr "Неактивен"

languages/mail-system-de_DE.mo

1022 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)