Skip to content

Commit 37f091b

Browse files
committed
[Editor] Fix l10n issues
Remove the strings containing only a variable.
1 parent 501da85 commit 37f091b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

l10n/en-US/viewer.ftl

-3
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,6 @@ pdfjs-editor-new-alt-text-error-close-button = Close
447447
# $downloadedSize (Number) - the downloaded size (in MB) of the AI model.
448448
# $percent (Number) - the percentage of the downloaded size.
449449
pdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)
450-
.aria-valuemin = 0
451-
.aria-valuemax = { $totalSize }
452-
.aria-valuenow = { $downloadedSize }
453450
.aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)
454451
455452
# This is a button that users can click to edit the alt text they have already added.

web/new_alt_text_manager.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,13 @@ class NewAltTextManager {
299299
totalLoaded = Math.min(0.99 * total, totalLoaded);
300300

301301
// Update the progress.
302+
const totalSize = (this.#downloadModelDescription.ariaValueMax =
303+
Math.round(total / ONE_MEGA_BYTES));
304+
const downloadedSize = (this.#downloadModelDescription.ariaValueNow =
305+
Math.round(totalLoaded / ONE_MEGA_BYTES));
302306
this.#downloadModelDescription.setAttribute(
303307
"data-l10n-args",
304-
`{"totalSize": ${Math.round(total / ONE_MEGA_BYTES)}, "downloadedSize": ${Math.round(totalLoaded / ONE_MEGA_BYTES)}}`
308+
`{"totalSize": ${totalSize}, "downloadedSize": ${downloadedSize}}`
305309
);
306310
if (!finished) {
307311
return;

web/viewer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@
576576
<label for="newAltTextCreateAutomaticallyButton" class="togglerLabel" data-l10n-id="pdfjs-editor-new-alt-text-create-automatically-button-label">Create alt text automatically</label>
577577
</div>
578578
<div id="newAltTextDownloadModel" class="hidden">
579-
<span id="newAltTextDownloadModelDescription" data-l10n-id="pdfjs-editor-new-alt-text-ai-model-downloading-progress" data-l10n-args='{ "totalSize": 0, "downloadedSize": 0 }'>Downloading alt text AI model (0 of 0 MB)</span>
579+
<span id="newAltTextDownloadModelDescription" data-l10n-id="pdfjs-editor-new-alt-text-ai-model-downloading-progress" aria-valuemin="0" data-l10n-args='{ "totalSize": 0, "downloadedSize": 0 }'>Downloading alt text AI model (0 of 0 MB)</span>
580580
</div>
581581
</div>
582582
<div id="newAltTextImagePreview"></div>

0 commit comments

Comments
 (0)