Skip to content

Commit 711a0f4

Browse files
committed
better translation strategy for certain strings
1 parent f45bd3b commit 711a0f4

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

index.php

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,30 @@ class="btn btn-primary" disabled
118118
>
119119
<div class="col-4">
120120
<i class="fas fa-file-export fa-fw"></i>&nbsp;<?php
121-
echo _("VALIDATE CALENDAR DATA FOR YEARS FROM 1970 UNTIL");
122-
?>&nbsp;<span class="yearMax"></span>
121+
echo sprintf(
122+
/* translators: %s: <span class="yearMax"></span> */
123+
_("VALIDATE CALENDAR DATA FOR YEARS FROM 1970 UNTIL %s"),
124+
"&nbsp;<span class=\"yearMax\"></span>"
125+
);
126+
?>
123127
</div>
124128
<div class="col-2 text-white p-2 text-center test-results bg-success">
125-
<i class="fas fa-circle-check fa-fw"></i> <?php
129+
<i class="fas fa-circle-check fa-fw"></i>&nbsp;<?php
126130
echo _("Successful tests:");
127-
?> <span id="successfulCalendarDataTestsCount" class="successfulCount">0</span>
131+
?>&nbsp;<span id="successfulCalendarDataTestsCount" class="successfulCount">0</span>
128132
</div>
129133
<div class="col-2 text-white p-2 text-center test-results bg-danger">
130-
<i class="fas fa-circle-xmark fa-fw"></i> <?php
134+
<i class="fas fa-circle-xmark fa-fw"></i>&nbsp;<?php
131135
echo _("Failed tests:");
132-
?> <span id="failedCalendarDataTestsCount" class="failedCount">0</span>
136+
?>&nbsp;<span id="failedCalendarDataTestsCount" class="failedCount">0</span>
133137
</div>
134138
<div class="col-3 text-white p-2 text-center test-results bg-dark">
135-
<i class="fas fa-stopwatch fa-fw"></i> <?php
136-
echo sprintf(_("Total time for %s tests:"), "<span id=\"totalCalendarDataTestsCount\"></span>");
137-
?> <span id="totalCalendarDataTestsTime">0</span>
139+
<i class="fas fa-stopwatch fa-fw"></i>&nbsp;<?php
140+
echo sprintf(
141+
_("Total time for %s tests:"),
142+
"<span id=\"totalCalendarDataTestsCount\"></span>"
143+
);
144+
?>&nbsp;<span id="totalCalendarDataTestsTime">0</span>
138145
</div>
139146
</button>
140147
</h2>
@@ -164,7 +171,11 @@ class="btn btn-primary" disabled
164171
</div>
165172
<div class="col-3 text-white p-2 text-center test-results bg-dark">
166173
<i class="fas fa-stopwatch fa-fw"></i> <?php
167-
echo sprintf(_("Total time for %s tests:"), "<span id=\"totalUnitTestsCount\"></span>");
174+
echo sprintf(
175+
/* translators: %s: <span id="totalUnitTestsCount"></span> */
176+
_("Total time for %s tests:"),
177+
"<span id=\"totalUnitTestsCount\"></span>"
178+
);
168179
?> <span id="totalUnitTestsTime">0</span>
169180
</div>
170181
</button>

0 commit comments

Comments
 (0)