1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Change how we handle l10n-args for dates in the DocumentProperties dialog (bug 1922618)

Strangely enough the code works just fine as-is in the GENERIC viewer, so there must be some difference between the Firefox built-in Fluent implementation and the Fluent.js one.

It seems that we can work-around the problem by handling this l10n-arg the same way that we handle dates in the AnnotationLayer, and testing this with the Firefox Devtools it seems that it should work.
This commit is contained in:
Jonas Jenwald 2024-10-04 19:36:30 +02:00
parent e5b6144bfa
commit c681ff25d8

View file

@ -329,7 +329,9 @@ class PDFDocumentProperties {
async #parseDate(inputDate) {
const dateObj = PDFDateString.toDateObject(inputDate);
return dateObj
? this.l10n.get("pdfjs-document-properties-date-time-string", { dateObj })
? this.l10n.get("pdfjs-document-properties-date-time-string", {
dateObj: dateObj.valueOf(),
})
: undefined;
}