Skip to content

Commit 84a3a6a

Browse files
committed
Removed HIG typography hints from comments
This was a misguided attempt to encourage following the GNOME HIG typography guidelines in translations (https://developer.gnome.org/hig/guidelines/typography.html#take-advantage-of-unicode). For example, with some strings I'd have a message about using a U+2026 ellipsis (…) over three dots (...), or using a U+2014 em dash (—) over the minus sign (-). But different languages follow different conventions anyway, so providing Unicode hints from guidelines written for US English is a bit ignorant on my part.
1 parent 64ee9e2 commit 84a3a6a

7 files changed

Lines changed: 11 additions & 42 deletions

File tree

src/attempt_fail_box.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ def __init__(
7575
# {vid_br_unit} represents a bitrate unit, like 'kbps'.
7676
# {extra_details} will either display resolution/FPS and audio quality
7777
# details, or just resolution/FPS if the video has no audio streams.
78-
# Please use U+202F Narrow no-break space (' ') between video bitrate
79-
# and unit.
8078
target_str = _("{vid_br} {vid_br_unit} ({extra_details})").format(
8179
vid_br = f'{str(vid_bitrate // 1000)}',
8280
# TRANSLATORS: This is the SI unit for 'kilobits per second'.
@@ -90,8 +88,7 @@ def __init__(
9088
if compressed_size_bytes >= target_size_bytes:
9189
self.failure_icon.set_from_icon_name('arrow2-up-symbolic')
9290
# TRANSLATORS: {size} represents an integer. {unit} represents a
93-
# file size unit like 'MB'. Please use U+202F Narrow no-break space
94-
# (' ') between size and unit.
91+
# file size unit like 'MiB'.
9592
fail_msg = _('Compressed file size was too large ({size} {unit})').format(
9693
size = f'{compressed_size_mb}',
9794
# TRANSLATORS: this is the SI unit for 'mebibyte'.
@@ -101,8 +98,7 @@ def __init__(
10198
else:
10299
self.failure_icon.set_from_icon_name('arrow2-down-symbolic')
103100
# TRANSLATORS: {size} represents an integer. {unit} represents a
104-
# file size unit like 'MB'. Please use U+202F Narrow no-break space
105-
# (' ') between size and unit.
101+
# file size unit like 'MiB'.
106102
fail_msg = _('Compressed file size was too small ({size} {unit})').format(
107103
size = f'{compressed_size_mb}',
108104
# TRANSLATORS: this is the SI unit for 'mebibyte'.

src/current_attempt_box.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ def set_attempt_details(
8989
# {vid_br_unit} represents a bitrate unit, like 'kbps'.
9090
# {extra_details} will either display resolution/FPS and audio quality
9191
# details, or just resolution/FPS if the video has no audio streams.
92-
# Please use U+202F Narrow no-break space (' ') between video bitrate
93-
# and unit.
9492
target_str = _('Compressing to {vid_br} {vid_br_unit} ({extra_details})').format(
9593
vid_br = f'{vid_bitrate // 1000}',
9694
# TRANSLATORS: This is the SI unit for 'kilobits per second'.
@@ -121,15 +119,12 @@ def set_progress(
121119
# https://gitlab.gnome.org/GNOME/nautilus/-/blob/af7e419eaa7e167ecbc059d51e06e72e11a2f1c8/src/nautilus-file-operations.c
122120

123121
# TRANSLATORS: {} represents the progress percentage value.
124-
# Please use U+202F Narrow no-break space (' ') between {} and %, if
125-
# applicable to your language.
126122
percentage_text = _('{} %').format(progress_percent)
127123

128124
if seconds_left is None:
129125
progress_text = percentage_text
130126
elif seconds_left == -1:
131127
# TRANSLATORS: {} represents the progress percentage.
132-
# Please use U+2014 em dash ('—'), if applicable to your language.
133128
progress_text = _('{} — Almost done').format(percentage_text)
134129
else:
135130
time_shown = ''
@@ -139,7 +134,6 @@ def set_progress(
139134
# Used as part of a larger string, like:
140135
# '5% -- About 30 seconds left'
141136
time_shown = ngettext('{} second', '{} seconds', seconds_left).format(seconds_left)
142-
# time_shown.format(seconds_left)
143137
elif seconds_left < (60 * 60):
144138
minutes = seconds_left // 60
145139

@@ -174,7 +168,6 @@ def set_progress(
174168
# TRANSLATORS: {percentage} represents the progress percentage.
175169
# {time_shown} represents a string showing the estimated time to
176170
# completion (like '50 minutes').
177-
# Please use U+2014 em dash ('—'), if applicable to your language.
178171
progress_text = _('{percentage} — About {time_shown} left').format(
179172
percentage = percentage_text,
180173
time_shown = time_shown

src/error_dialog.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ def __init__(
4343

4444
self.preference_page.set_description(
4545
# TRANSLATORS: {} represents the filename of the video with the
46-
# error. Please use “” instead of "", if applicable to your
47-
# language.
46+
# error.
4847
_('There was a problem compressing “{}”').format(safe_video_name)
4948
)
5049
buffer = self.text_view.get_buffer()

src/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ def on_about_action(self, *args: Any) -> None:
181181

182182
about.add_acknowledgement_section(
183183
# TRANSLATORS: Braces represent the name of the repository (e.g. 8mb)
184-
# Please use ‘’ characters instead of '', if applicable to your language.
185184
_('‘{}’ repository by').format('8mb'),
186185
[
187186
'Matthew Baggett https://github.com/matthewbaggett/',

src/sources_row.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,7 @@ def set_complete(
491491
update_ui(
492492
self.complete_label.set_label,
493493
# TRANSLATORS: {size} represents a file size value in MB.
494-
# {unit} represents a file size unit, like 'MB'. Please use U+202F
495-
# narrow no-break space (' ') between size and unit.
494+
# {unit} represents a file size unit, like 'MiB'.
496495
_('Video compressed to {size} {unit}.').format(
497496
size = compressed_size_mb,
498497
# TRANSLATORS: this is the SI unit for 'mebibyte'.
@@ -520,8 +519,7 @@ def refresh_state(
520519
self.set_warning(
521520
# TRANSLATORS: {original_size} and {target_size} represent
522521
# integers. {unit_original} and {unit_target} represent file
523-
# size units, like 'MB'. Please use U+202F Narrow no-break
524-
# space (' ') between values and units.
522+
# size units, like 'MB'.
525523
_('Video file size ({original_size} {unit_original}) already meets the target size ({target_size} {unit_target}).')
526524
.format(
527525
original_size = size_mb,
@@ -542,8 +540,6 @@ def refresh_state(
542540
self.set_incompatible(
543541
# TRANSLATORS: {size} represents an integer. {unit} represents
544542
# a file size unit like 'MB'.
545-
# Please use U+202F Narrow no-break space (' ') between value
546-
# and unit.
547543
_('Target size ({size} {unit}) is too low for this file.')
548544
# TRANSLATORS: this is the SI unit for 'mebibyte'.
549545
.format(size = target_size, unit = _('MiB')),

src/window.blp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ template $ConstrictWindow: Adw.ApplicationWindow {
7575
title: _("Compress Videos");
7676
description: _("Drag and drop videos here");
7777
child: Button {
78-
// TRANSLATORS: please use U+2026 Horizontal ellipsis (…) instead of '...', if applicable to your language
7978
label: _("_Open…");
8079
use-underline: true;
8180
action-name: "win.open";
@@ -272,7 +271,6 @@ template $ConstrictWindow: Adw.ApplicationWindow {
272271
orientation: vertical;
273272

274273
Adw.Banner warning_banner {
275-
// TRANSLATORS: Please use U+2014 em dash ('—') instead of '-', if applicable to your language.
276274
title: _("Issues with video sources — fix before compressing");
277275
}
278276

@@ -324,7 +322,6 @@ template $ConstrictWindow: Adw.ApplicationWindow {
324322
ActionBar export_bar {
325323
[center]
326324
Button export_button {
327-
// TRANSLATORS: please use U+2026 Horizontal ellipsis (…) instead of '...', if applicable to your language
328325
label: _("_Export To…");
329326
use-underline: true;
330327
action-name: "win.export";
@@ -341,7 +338,6 @@ template $ConstrictWindow: Adw.ApplicationWindow {
341338

342339
[center]
343340
Button cancel_button {
344-
// TRANSLATORS: please use U+2026 Horizontal ellipsis (…) instead of '...', if applicable to your language
345341
label: _("_Cancel…");
346342
use-underline: true;
347343
action-name: "win.cancel";

src/window.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -221,25 +221,22 @@ def __init__(self, **kwargs: Any) -> None:
221221

222222
# TRANSLATORS: 'FPS' meaning 'frames per second'.
223223
# {} represents the FPS value, for example 30 or 60.
224-
# Please use U+202F Narrow no-break space (' ') between value and unit.
225224
fps_label = _('{} FPS')
226225

227226
self.clear_row.set_title(fps_label.format('_30'))
228227
self.smooth_row.set_title(fps_label.format('_60'))
229228

230229
self.fps_help_label.set_label(
231230
# TRANSLATORS: FPS meaning 'frames per second'. {} represents an
232-
# integer. Please use U+202F narrow no-break space (' ') between
233-
# the {} and translated equivalent of 'FPS'.
231+
# integer.
234232
_('Videos compressed to low bitrates may be capped to {} FPS, regardless of the option set.')
235233
.format('24')
236234
)
237235

238236
default_tolerance = self.settings.get_default_value('tolerance')
239237

240238
self.adv_options_help_label.set_label(
241-
# TRANSLATORS: {} represents an integer. Please use U+202F Narrow
242-
# no-break space (' ') between {} and '%'.
239+
# TRANSLATORS: {} represents an integer.
243240
# xgettext:no-python-format
244241
_('Decreasing the tolerance maximizes image quality by reducing how much compressed file sizes can be under target. However, this can increase the number of attempts needed to meet the target, increasing compression time. A tolerance of {} % or more is recommended.')
245242
.format(default_tolerance)
@@ -364,8 +361,7 @@ def set_compressing_title(self, current_index: int, export_dir: str):
364361
if len(sources) == 1:
365362
file_name = sources[0].display_name
366363
# TRANSLATORS: {} represents the filename of the video currently
367-
# being processed. Please use “” instead of "", if applicable to
368-
# your language.
364+
# being processed.
369365
self.set_title(_('Processing “{}”').format(file_name))
370366
else:
371367
self.set_title(
@@ -396,8 +392,7 @@ def set_queued_title(self, daemon: bool) -> None:
396392
elif len(sources) == 1:
397393
vid_name = sources[0].display_name
398394
# TRANSLATORS: {} represents the filename of the video currently
399-
# queued. Please use “” instead of '', if applicable to your
400-
# language.
395+
# queued.
401396
self.set_title(_('“{}” Queued').format(vid_name))
402397
else:
403398
vid_count = len(sources)
@@ -537,8 +532,7 @@ def show_cancel_dialog(self, quit_on_stop: bool) -> None:
537532
dialog = Adw.AlertDialog.new(
538533
_('Stop Compression?'),
539534
# TRANSLATORS: {} represents the filename of the video currently
540-
# being compressed. Please use “” instead of "", if applicable to
541-
# your language.
535+
# being compressed.
542536
_('Progress made compressing “{}” will be permanently lost')
543537
.format(self.currently_processed)
544538
)
@@ -607,7 +601,6 @@ def send_complete_notification(
607601
video_name = sources_list[0].display_name
608602
# TRANSLATORS: {} represents the filename of the video that has
609603
# been processed.
610-
# Please use “” instead of "", if applicable to your language.
611604
notification.set_body(_('“{}” processed').format(video_name))
612605
else:
613606
notification.set_body(
@@ -724,8 +717,6 @@ def bulk_compress(self, destination_dir: str) -> None:
724717

725718
def update_progress(fraction, seconds_left):
726719
if fraction == 0.0 and codec == VideoCodec.VP9:
727-
# TRANSLATORS: please use U+2026 Horizontal ellipsis (…)
728-
# instead of '...', if applicable to your language
729720
progress_box.set_progress_text(_('Analyzing…'), daemon)
730721
video.enable_spinner(True, daemon)
731722
progress_box.pulse_progress(daemon)
@@ -820,8 +811,7 @@ def trash_video():
820811

821812
toast = Adw.Toast.new(
822813
# TRANSLATORS: {} represents the filename of the video with
823-
# the error. Please use “” instead of "", if applicable to
824-
# your language.
814+
# the error.
825815
_('Error compressing “{}”').format(video.display_name)
826816
)
827817
toast.set_use_markup(False)

0 commit comments

Comments
 (0)