diff --git a/locales/it.po b/locales/it.po index 11efa30e..f3b8a31f 100644 --- a/locales/it.po +++ b/locales/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: sozi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-25 02:21:+0000\n" +"POT-Creation-Date: 2022-07-19 11:05:+0000\n" "PO-Revision-Date: 2022-05-28 13:18+0100\n" "Last-Translator: Albano Battistella \n" "Language-Team: Italian 0) { + + for (let i = 0; i <= currentFrame.index - 1; i++) { + const frame = this.presentation.frames[i]; + duration += frame['timeoutMs'] + frame['transitionDurationMs']; + } + const minutes = Math.floor(duration / 60000); + const secondsString = ((duration % 60000) / 1000).toFixed(0); + const seconds = +secondsString; + let millis = (duration % 60000) / 1000; + if (millis > seconds) { + millis = (duration % 60000) - (seconds * 1000); + } else { + millis = '000'; + } + const padding = seconds < 10 ? '0' : ''; + const inMinutesAndSeconds = seconds === 60 ? + (minutes + 1) + ':00' : + minutes + ':' + padding + seconds + ':' + millis; + return [ '' + inMinutesAndSeconds ]; + } else { + return [ '0:00:000' ]; + } + } + /** Get a property of the selected layers in the selected frames. * * This method is used in the {@linkcode module:view/Properties.Properties|Properties} view to assign getters diff --git a/src/js/view/Properties.js b/src/js/view/Properties.js index 5bc39388..0d7e3dc8 100644 --- a/src/js/view/Properties.js +++ b/src/js/view/Properties.js @@ -213,6 +213,9 @@ export class Properties extends VirtualDOMView { ]), this.renderNumberField("timeoutMs", timeoutMsDisabled, controller.getFrameProperty, controller.setFrameProperty, false, 0.1, 1000), + h("label", { for: "field-elapsedMs"}, _("Elapsed time")), + this.renderTextField("elapsedMs", true, controller.getFrameDuration, function () {}, false), + h("h1", _("Layer")), h("div.btn-group", [