From 36c2284dea80d01afb8258b58ad2b9aa328b76c4 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 20 Jun 2022 20:02:05 +0200 Subject: [PATCH] DEV: Fix typos "formated" -> "formatted" (#17156) (nothing in all-the* relies on these) --- .../components/admin-report-table-cell.js | 2 +- .../javascripts/admin/addon/models/report.js | 30 +++--- .../components/admin-report-table-cell.hbs | 2 +- .../components/admin-report-table.hbs | 2 +- .../components/select-kit/host-list-test.js | 2 +- .../tests/unit/models/report-test.js | 22 ++-- .../multi-select/format-selected-content.js | 2 +- .../multi-select/format-selected-content.hbs | 4 +- .../common/select-kit/multi-select.scss | 2 +- app/assets/stylesheets/mobile/compose.scss | 2 +- .../discourse-local-dates-create-form.js | 2 +- .../discourse-local-dates-create-form.hbs | 2 +- .../initializers/discourse-local-dates.js | 4 +- .../javascripts/lib/local-date-builder.js | 16 +-- .../lib/local-date-builder-test.js | 100 +++++++++--------- 15 files changed, 98 insertions(+), 96 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/admin-report-table-cell.js b/app/assets/javascripts/admin/addon/components/admin-report-table-cell.js index 7ef4f7d9c1d..838d8dbe1d4 100644 --- a/app/assets/javascripts/admin/addon/components/admin-report-table-cell.js +++ b/app/assets/javascripts/admin/addon/components/admin-report-table-cell.js @@ -16,6 +16,6 @@ export default Component.extend({ type: alias("label.type"), property: alias("label.mainProperty"), - formatedValue: alias("computedLabel.formatedValue"), + formattedValue: alias("computedLabel.formattedValue"), value: alias("computedLabel.value"), }); diff --git a/app/assets/javascripts/admin/addon/models/report.js b/app/assets/javascripts/admin/addon/models/report.js index 55c1012eb19..9cd68dc7987 100644 --- a/app/assets/javascripts/admin/addon/models/report.js +++ b/app/assets/javascripts/admin/addon/models/report.js @@ -354,7 +354,7 @@ const Report = EmberObject.extend({ value, type, property: mainProperty, - formatedValue: value ? escapeExpression(value) : "—", + formattedValue: value ? escapeExpression(value) : "—", }; }, }; @@ -364,7 +364,7 @@ const Report = EmberObject.extend({ _userLabel(properties, row) { const username = row[properties.username]; - const formatedValue = () => { + const formattedValue = () => { const userId = row[properties.id]; const user = EmberObject.create({ @@ -386,14 +386,14 @@ const Report = EmberObject.extend({ return { value: username, - formatedValue: username ? formatedValue() : "—", + formattedValue: username ? formattedValue() : "—", }; }, _topicLabel(properties, row) { const topicTitle = row[properties.title]; - const formatedValue = () => { + const formattedValue = () => { const topicId = row[properties.id]; const href = getURL(`/t/-/${topicId}`); return `${escapeExpression(topicTitle)}`; @@ -401,7 +401,7 @@ const Report = EmberObject.extend({ return { value: topicTitle, - formatedValue: topicTitle ? formatedValue() : "—", + formattedValue: topicTitle ? formattedValue() : "—", }; }, @@ -414,7 +414,7 @@ const Report = EmberObject.extend({ return { property: properties.title, value: postTitle, - formatedValue: + formattedValue: postTitle && href ? `${escapeExpression(postTitle)}` : "—", @@ -424,14 +424,14 @@ const Report = EmberObject.extend({ _secondsLabel(value) { return { value: toNumber(value), - formatedValue: durationTiny(value), + formattedValue: durationTiny(value), }; }, _percentLabel(value) { return { value: toNumber(value), - formatedValue: value ? `${value}%` : "—", + formattedValue: value ? `${value}%` : "—", }; }, @@ -440,25 +440,25 @@ const Report = EmberObject.extend({ ? true : options.formatNumbers; - const formatedValue = () => (formatNumbers ? number(value) : value); + const formattedValue = () => (formatNumbers ? number(value) : value); return { value: toNumber(value), - formatedValue: value ? formatedValue() : "—", + formattedValue: value ? formattedValue() : "—", }; }, _bytesLabel(value) { return { value: toNumber(value), - formatedValue: I18n.toHumanSize(value), + formattedValue: I18n.toHumanSize(value), }; }, _dateLabel(value, date, format = "LL") { return { value, - formatedValue: value ? date.format(format) : "—", + formattedValue: value ? date.format(format) : "—", }; }, @@ -467,14 +467,14 @@ const Report = EmberObject.extend({ return { value, - formatedValue: value ? escaped : "—", + formattedValue: value ? escaped : "—", }; }, _linkLabel(properties, row) { const property = properties[0]; const value = getURL(row[property]); - const formatedValue = (href, anchor) => { + const formattedValue = (href, anchor) => { return `${escapeExpression( anchor )}`; @@ -482,7 +482,7 @@ const Report = EmberObject.extend({ return { value, - formatedValue: value ? formatedValue(value, row[properties[1]]) : "—", + formattedValue: value ? formattedValue(value, row[properties[1]]) : "—", }; }, diff --git a/app/assets/javascripts/admin/addon/templates/components/admin-report-table-cell.hbs b/app/assets/javascripts/admin/addon/templates/components/admin-report-table-cell.hbs index fb8f2e4cdca..ab2a766612d 100644 --- a/app/assets/javascripts/admin/addon/templates/components/admin-report-table-cell.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/admin-report-table-cell.hbs @@ -1 +1 @@ -{{html-safe formatedValue}} +{{html-safe formattedValue}} diff --git a/app/assets/javascripts/admin/addon/templates/components/admin-report-table.hbs b/app/assets/javascripts/admin/addon/templates/components/admin-report-table.hbs index dca67672988..6ff8b0b3e4b 100644 --- a/app/assets/javascripts/admin/addon/templates/components/admin-report-table.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/admin-report-table.hbs @@ -31,7 +31,7 @@ {{#each totalsForSample as |total|}} - {{total.formatedValue}} + {{total.formattedValue}} {{/each}} diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/host-list-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/host-list-test.js index dbb318176c0..d1da220959c 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/host-list-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/host-list-test.js @@ -22,7 +22,7 @@ discourseModule( async test(assert) { assert.strictEqual( - query(".formated-selection").innerText, + query(".formatted-selection").innerText, "a.com, b.com" ); }, diff --git a/app/assets/javascripts/discourse/tests/unit/models/report-test.js b/app/assets/javascripts/discourse/tests/unit/models/report-test.js index c07323f1421..b88822c1afa 100644 --- a/app/assets/javascripts/discourse/tests/unit/models/report-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/report-test.js @@ -480,7 +480,7 @@ module("Unit | Model | report", function () { assert.strictEqual(usernameLabel.type, "user"); const computedUsernameLabel = usernameLabel.compute(row); assert.strictEqual( - computedUsernameLabel.formatedValue, + computedUsernameLabel.formattedValue, "joffrey" ); assert.strictEqual(computedUsernameLabel.value, "joffrey"); @@ -491,12 +491,12 @@ module("Unit | Model | report", function () { assert.strictEqual(flagCountLabel.title, "Flag count"); assert.strictEqual(flagCountLabel.type, "number"); let computedFlagCountLabel = flagCountLabel.compute(row); - assert.strictEqual(computedFlagCountLabel.formatedValue, "1.9k"); + assert.strictEqual(computedFlagCountLabel.formattedValue, "1.9k"); assert.strictEqual(computedFlagCountLabel.value, 1876); computedFlagCountLabel = flagCountLabel.compute(row, { formatNumbers: false, }); - assert.strictEqual(computedFlagCountLabel.formatedValue, "1876"); + assert.strictEqual(computedFlagCountLabel.formattedValue, "1876"); const timeReadLabel = computedLabels[2]; assert.strictEqual(timeReadLabel.mainProperty, "time_read"); @@ -504,7 +504,7 @@ module("Unit | Model | report", function () { assert.strictEqual(timeReadLabel.title, "Time read"); assert.strictEqual(timeReadLabel.type, "seconds"); const computedTimeReadLabel = timeReadLabel.compute(row); - assert.strictEqual(computedTimeReadLabel.formatedValue, "3d"); + assert.strictEqual(computedTimeReadLabel.formattedValue, "3d"); assert.strictEqual(computedTimeReadLabel.value, 287362); const noteLabel = computedLabels[3]; @@ -513,7 +513,7 @@ module("Unit | Model | report", function () { assert.strictEqual(noteLabel.title, "Note"); assert.strictEqual(noteLabel.type, "text"); const computedNoteLabel = noteLabel.compute(row); - assert.strictEqual(computedNoteLabel.formatedValue, "This is a long note"); + assert.strictEqual(computedNoteLabel.formattedValue, "This is a long note"); assert.strictEqual(computedNoteLabel.value, "This is a long note"); const topicLabel = computedLabels[4]; @@ -523,7 +523,7 @@ module("Unit | Model | report", function () { assert.strictEqual(topicLabel.type, "topic"); const computedTopicLabel = topicLabel.compute(row); assert.strictEqual( - computedTopicLabel.formatedValue, + computedTopicLabel.formattedValue, "Test topic <html>" ); assert.strictEqual(computedTopicLabel.value, "Test topic "); @@ -535,7 +535,7 @@ module("Unit | Model | report", function () { assert.strictEqual(postLabel.type, "post"); const computedPostLabel = postLabel.compute(row); assert.strictEqual( - computedPostLabel.formatedValue, + computedPostLabel.formattedValue, "This is the beginning of <html>" ); assert.strictEqual( @@ -549,25 +549,25 @@ module("Unit | Model | report", function () { assert.strictEqual(filesizeLabel.title, "Filesize"); assert.strictEqual(filesizeLabel.type, "bytes"); const computedFilesizeLabel = filesizeLabel.compute(row); - assert.strictEqual(computedFilesizeLabel.formatedValue, "569.0 KB"); + assert.strictEqual(computedFilesizeLabel.formattedValue, "569.0 KB"); assert.strictEqual(computedFilesizeLabel.value, 582641); // subfolder support setPrefix("/forum"); - const postLink = computedLabels[5].compute(row).formatedValue; + const postLink = computedLabels[5].compute(row).formattedValue; assert.strictEqual( postLink, "This is the beginning of <html>" ); - const topicLink = computedLabels[4].compute(row).formatedValue; + const topicLink = computedLabels[4].compute(row).formattedValue; assert.strictEqual( topicLink, "Test topic <html>" ); - const userLink = computedLabels[0].compute(row).formatedValue; + const userLink = computedLabels[0].compute(row).formattedValue; assert.strictEqual( userLink, "joffrey" diff --git a/app/assets/javascripts/select-kit/addon/components/multi-select/format-selected-content.js b/app/assets/javascripts/select-kit/addon/components/multi-select/format-selected-content.js index c2469d737c3..710122a76b6 100644 --- a/app/assets/javascripts/select-kit/addon/components/multi-select/format-selected-content.js +++ b/app/assets/javascripts/select-kit/addon/components/multi-select/format-selected-content.js @@ -10,7 +10,7 @@ export default Component.extend(UtilsMixin, { content: null, selectKit: null, - formatedContent: computed("content", function () { + formattedContent: computed("content", function () { if (this.content) { return makeArray(this.content) .map((c) => this.getName(c)) diff --git a/app/assets/javascripts/select-kit/addon/templates/components/multi-select/format-selected-content.hbs b/app/assets/javascripts/select-kit/addon/templates/components/multi-select/format-selected-content.hbs index da31085fdf9..3ceb155adb7 100644 --- a/app/assets/javascripts/select-kit/addon/templates/components/multi-select/format-selected-content.hbs +++ b/app/assets/javascripts/select-kit/addon/templates/components/multi-select/format-selected-content.hbs @@ -1,3 +1,3 @@ - - {{formatedContent}} + + {{formattedContent}} diff --git a/app/assets/stylesheets/common/select-kit/multi-select.scss b/app/assets/stylesheets/common/select-kit/multi-select.scss index 3a44bcbee59..4f1ad6f4990 100644 --- a/app/assets/stylesheets/common/select-kit/multi-select.scss +++ b/app/assets/stylesheets/common/select-kit/multi-select.scss @@ -49,7 +49,7 @@ background: var(--secondary); border-color: var(--primary-medium); - .formated-selection { + .formatted-selection { margin: 0; cursor: pointer; @include ellipsis; diff --git a/app/assets/stylesheets/mobile/compose.scss b/app/assets/stylesheets/mobile/compose.scss index f9530d81b11..a3d629c407a 100644 --- a/app/assets/stylesheets/mobile/compose.scss +++ b/app/assets/stylesheets/mobile/compose.scss @@ -203,7 +203,7 @@ } } - .formated-selection { + .formatted-selection { font-size: var(--font-down-1); } } diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js index f14cd730146..de87dabde11 100644 --- a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js +++ b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js @@ -207,7 +207,7 @@ export default Component.extend({ ), @computed("currentUserTimezone") - formatedCurrentUserTimezone(timezone) { + formattedCurrentUserTimezone(timezone) { return timezone.replace("_", " ").replace("Etc/", "").replace("/", ", "); }, diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs b/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs index 025c14372f3..63c4c545b6f 100644 --- a/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs +++ b/plugins/discourse-local-dates/assets/javascripts/discourse/templates/components/discourse-local-dates-create-form.hbs @@ -8,7 +8,7 @@ {{#if timezoneIsDifferentFromUserTimezone}}
{{i18n "discourse_local_dates.create.form.current_timezone"}} - {{formatedCurrentUserTimezone}}{{currentPreview}} + {{formattedCurrentUserTimezone}}{{currentPreview}}
{{/if}} {{else}} diff --git a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js index c7bc834a439..c481b896108 100644 --- a/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js +++ b/plugins/discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js @@ -27,7 +27,7 @@ export function applyLocalDates(dates, siteSettings) { - ${localDateBuilder.formated} + ${localDateBuilder.formatted} ` ); element.setAttribute("aria-label", localDateBuilder.textPreview); @@ -151,7 +151,7 @@ function buildHtmlPreview(element, siteSettings) { const dateTimeNode = document.createElement("span"); dateTimeNode.classList.add("date-time"); - dateTimeNode.innerHTML = preview.formated; + dateTimeNode.innerHTML = preview.formatted; previewNode.appendChild(dateTimeNode); return previewNode; diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js b/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js index d2661343786..2196eabaab9 100644 --- a/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js +++ b/plugins/discourse-local-dates/assets/javascripts/lib/local-date-builder.js @@ -71,7 +71,7 @@ export default class LocalDateBuilder { pastEvent: !this.recurring && moment.tz(this.localTimezone).isAfter(localDate.datetime), - formated: this._applyFormatting(localDate, displayedTimezone), + formatted: this._applyFormatting(localDate, displayedTimezone), previews, textPreview: this._generateTextPreviews(previews), }; @@ -80,8 +80,8 @@ export default class LocalDateBuilder { _generateTextPreviews(previews) { return previews .map((preview) => { - const formatedZone = this._zoneWithoutPrefix(preview.timezone); - return `${formatedZone} ${preview.formated}`; + const formattedZone = this._zoneWithoutPrefix(preview.timezone); + return `${formattedZone} ${preview.formatted}`; }) .join(", "); } @@ -96,7 +96,7 @@ export default class LocalDateBuilder { previewedTimezones.push({ timezone: this._zoneWithoutPrefix(this.localTimezone), current: true, - formated: this._createDateTimeRange( + formatted: this._createDateTimeRange( DateWithZoneHelper.fromDatetime( localDate.datetime, localDate.timezone, @@ -128,7 +128,7 @@ export default class LocalDateBuilder { previewedTimezones.push({ timezone: this._zoneWithoutPrefix(timezone), - formated: this._createDateTimeRange( + formatted: this._createDateTimeRange( DateWithZoneHelper.fromDatetime( localDate.datetime, localDate.timezone, @@ -288,7 +288,9 @@ export default class LocalDateBuilder { } _formatWithZone(localDate, displayedTimezone, format) { - let formated = localDate.datetimeWithZone(displayedTimezone).format(format); - return `${formated} (${this._zoneWithoutPrefix(displayedTimezone)})`; + let formatted = localDate + .datetimeWithZone(displayedTimezone) + .format(format); + return `${formatted} (${this._zoneWithoutPrefix(displayedTimezone)})`; } } diff --git a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js index a95bb74fa5a..8f73b151520 100644 --- a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js +++ b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js @@ -44,10 +44,10 @@ QUnit.assert.buildsCorrectDate = function (options, expected, message) { localTimezone ); - if (expected.formated) { + if (expected.formatted) { this.test.assert.strictEqual( - localDateBuilder.build().formated, - expected.formated, + localDateBuilder.build().formatted, + expected.formatted, message || "it formats the date correctly" ); } @@ -66,7 +66,7 @@ module("lib:local-date-builder", function () { freezeTime({ date: "2020-03-11" }, () => { assert.buildsCorrectDate( { date: "2020-03-22", timezone: PARIS }, - { formated: "March 22, 2020" }, + { formatted: "March 22, 2020" }, "it displays the date without time" ); }); @@ -75,13 +75,13 @@ module("lib:local-date-builder", function () { test("date and time", function (assert) { assert.buildsCorrectDate( { date: "2020-04-11", time: "11:00" }, - { formated: "April 11, 2020 1:00 PM" }, + { formatted: "April 11, 2020 1:00 PM" }, "it displays the date with time" ); assert.buildsCorrectDate( { date: "2020-04-11", time: "11:05:12", format: "LTS" }, - { formated: "1:05:12 PM" }, + { formatted: "1:05:12 PM" }, "it displays full time (hours, minutes, seconds)" ); }); @@ -90,7 +90,7 @@ module("lib:local-date-builder", function () { freezeTime({ date: "2020-03-11" }, () => { assert.buildsCorrectDate( { format: "YYYY" }, - { formated: "2020 (UTC)" }, + { formatted: "2020 (UTC)" }, "it uses custom format" ); }); @@ -100,7 +100,7 @@ module("lib:local-date-builder", function () { freezeTime({}, () => { assert.buildsCorrectDate( { displayedTimezone: SYDNEY }, - { formated: "March 22, 2020 (Sydney)" }, + { formatted: "March 22, 2020 (Sydney)" }, "it displays the timezone if the timezone is different from the date" ); }); @@ -108,7 +108,7 @@ module("lib:local-date-builder", function () { freezeTime({}, () => { assert.buildsCorrectDate( { displayedTimezone: PARIS, timezone: PARIS }, - { formated: "March 22, 2020" }, + { formatted: "March 22, 2020" }, "it doesn't display the timezone if the timezone is the same than the date" ); }); @@ -116,7 +116,7 @@ module("lib:local-date-builder", function () { freezeTime({}, () => { assert.buildsCorrectDate( { timezone: UTC, displayedTimezone: UTC }, - { formated: "March 22, 2020 (UTC)" }, + { formatted: "March 22, 2020 (UTC)" }, "it replaces `Etc/`" ); }); @@ -124,7 +124,7 @@ module("lib:local-date-builder", function () { freezeTime({}, () => { assert.buildsCorrectDate( { timezone: LOS_ANGELES, displayedTimezone: LOS_ANGELES }, - { formated: "March 22, 2020 (Los Angeles)" }, + { formatted: "March 22, 2020 (Los Angeles)" }, "it removes prefix and replaces `_`" ); }); @@ -134,7 +134,7 @@ module("lib:local-date-builder", function () { freezeTime({}, () => { assert.buildsCorrectDate( { timezone: SYDNEY, displayedTimezone: PARIS }, - { formated: "March 21, 2020" }, + { formatted: "March 21, 2020" }, "it correctly parses a date with the given timezone context" ); }); @@ -151,7 +151,7 @@ module("lib:local-date-builder", function () { recurring: "1.weeks", }, { - formated: "April 6, 2020 10:00 AM (Lagos)", + formatted: "April 6, 2020 10:00 AM (Lagos)", }, "it correctly formats a recurring date starting from a !isDST timezone to a isDST timezone date when displayed to a user using a timezone with no DST" ); @@ -168,7 +168,7 @@ module("lib:local-date-builder", function () { displayedTimezone: SYDNEY, }, { - formated: "April 6, 2020 12:00 PM (Sydney)", + formatted: "April 6, 2020 12:00 PM (Sydney)", }, "it correctly formats a recurring date spanning over weeks" ); @@ -183,7 +183,7 @@ module("lib:local-date-builder", function () { timezone: PARIS, }, { - formated: "April 13, 2020 11:00 AM", + formatted: "April 13, 2020 11:00 AM", }, "it correctly adds from a !isDST date to a isDST date" ); @@ -198,7 +198,7 @@ module("lib:local-date-builder", function () { timezone: PARIS, }, { - formated: "Today 11:00 AM", + formatted: "Today 11:00 AM", }, "it works to the minute" ); @@ -213,7 +213,7 @@ module("lib:local-date-builder", function () { timezone: PARIS, }, { - formated: "April 13, 2020 11:00 AM", + formatted: "April 13, 2020 11:00 AM", }, "it works to the minute" ); @@ -228,7 +228,7 @@ module("lib:local-date-builder", function () { timezone: NEW_YORK, }, { - formated: "January 24, 2021 2:30 PM", + formatted: "January 24, 2021 2:30 PM", }, "it works for a future date" ); @@ -243,7 +243,7 @@ module("lib:local-date-builder", function () { timezone: NEW_YORK, }, { - formated: "Today 12:00 PM", + formatted: "Today 12:00 PM", }, "it works with hours" ); @@ -257,7 +257,7 @@ module("lib:local-date-builder", function () { countdown: true, timezone: PARIS, }, - { formated: "a minute" }, + { formatted: "a minute" }, "it shows the time remaining" ); }); @@ -269,7 +269,7 @@ module("lib:local-date-builder", function () { timezone: PARIS, }, { - formated: I18n.t( + formatted: I18n.t( "discourse_local_dates.relative_dates.countdown.passed" ), }, @@ -282,7 +282,7 @@ module("lib:local-date-builder", function () { freezeTime({ date: "2020-03-23 23:00" }, () => { assert.buildsCorrectDate( { date: "2020-03-22", time: "23:59", timezone: PARIS }, - { formated: "Yesterday 11:59 PM" }, + { formatted: "Yesterday 11:59 PM" }, "it drops calendar mode when event date is more than one day before current date" ); }); @@ -290,14 +290,14 @@ module("lib:local-date-builder", function () { freezeTime({ date: "2020-03-20 23:59" }, () => assert.buildsCorrectDate( { date: "2020-03-21", time: "01:00", timezone: PARIS }, - { formated: "Tomorrow 1:00 AM" } + { formatted: "Tomorrow 1:00 AM" } ) ); freezeTime({ date: "2020-03-20 23:59" }, () => assert.buildsCorrectDate( { date: "2020-03-21", time: "00:00", timezone: PARIS }, - { formated: "Saturday" }, + { formatted: "Saturday" }, "it displays the day with no time when the time in the displayed timezone is 00:00" ) ); @@ -305,35 +305,35 @@ module("lib:local-date-builder", function () { freezeTime({ date: "2020-03-20 23:59" }, () => { assert.buildsCorrectDate( { date: "2020-03-21", time: "23:59", timezone: PARIS }, - { formated: "Tomorrow 11:59 PM" } + { formatted: "Tomorrow 11:59 PM" } ); }); freezeTime({ date: "2020-03-21 00:00" }, () => assert.buildsCorrectDate( { date: "2020-03-21", time: "23:00", timezone: PARIS }, - { formated: "Today 11:00 PM" } + { formatted: "Today 11:00 PM" } ) ); freezeTime({ date: "2020-03-22 23:59" }, () => assert.buildsCorrectDate( { date: "2020-03-21", time: "23:59", timezone: PARIS }, - { formated: "Yesterday 11:59 PM" } + { formatted: "Yesterday 11:59 PM" } ) ); freezeTime({ date: "2020-03-22 23:59" }, () => assert.buildsCorrectDate( { date: "2020-03-21", time: "23:59", timezone: PARIS }, - { formated: "Yesterday 11:59 PM" } + { formatted: "Yesterday 11:59 PM" } ) ); freezeTime({ date: "2020-03-22 23:59" }, () => assert.buildsCorrectDate( { calendar: false, date: "2020-03-21", time: "23:59", timezone: PARIS }, - { formated: "March 21, 2020 11:59 PM" }, + { formatted: "March 21, 2020 11:59 PM" }, "it doesn't use calendar when disabled" ) ); @@ -341,7 +341,7 @@ module("lib:local-date-builder", function () { freezeTime({ date: "2020-03-24 01:00" }, () => assert.buildsCorrectDate( { date: "2020-03-21", timezone: PARIS }, - { formated: "March 21, 2020" }, + { formatted: "March 21, 2020" }, "it stops formatting out of calendar range" ) ); @@ -353,7 +353,7 @@ module("lib:local-date-builder", function () { time: "18:00", localTimezone: LOS_ANGELES, }, - { formated: "Tomorrow 11:00 AM" }, + { formatted: "Tomorrow 11:00 AM" }, "it correctly displays a different local timezone" ); }); @@ -367,7 +367,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM", timezone: "Paris", }, @@ -383,12 +383,12 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM", timezone: "Paris", }, { - formated: + formatted: "Sunday, March 22, 2020 10:00 AM → Monday, March 23, 2020 10:00 AM", timezone: "Sydney", }, @@ -404,7 +404,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM", timezone: "Paris", }, @@ -420,7 +420,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM", timezone: "Paris", }, @@ -436,7 +436,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM", timezone: "Paris", }, @@ -452,7 +452,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: 'Sunday, March 22, 2020
12:00 AM → 1:30 AM', timezone: "Paris", }, @@ -468,7 +468,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Sunday, March 22, 2020 12:00 AM → Monday, March 23, 2020 12:00 AM", timezone: "Paris", }, @@ -484,7 +484,7 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: 'Sunday, March 22, 2020
11:34 AM', timezone: "Paris", }, @@ -504,22 +504,22 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: "Tuesday, April 7, 2020 12:00 AM → Wednesday, April 8, 2020 12:00 AM", timezone: "Paris", }, { - formated: + formatted: "Monday, April 6, 2020 11:00 PM → Tuesday, April 7, 2020 11:00 PM", timezone: "London", }, { - formated: + formatted: "Monday, April 6, 2020 11:00 PM → Tuesday, April 7, 2020 11:00 PM", timezone: "Lagos", }, { - formated: + formatted: "Tuesday, April 7, 2020 8:00 AM → Wednesday, April 8, 2020 8:00 AM", timezone: "Sydney", }, @@ -540,22 +540,22 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: 'Tuesday, April 7, 2020
2:54 PM', timezone: "Paris", }, { - formated: + formatted: 'Tuesday, April 7, 2020
1:54 PM', timezone: "London", }, { - formated: + formatted: 'Tuesday, April 7, 2020
1:54 PM', timezone: "Lagos", }, { - formated: + formatted: 'Tuesday, April 7, 2020
10:54 PM', timezone: "Sydney", }, @@ -575,12 +575,12 @@ module("lib:local-date-builder", function () { previews: [ { current: true, - formated: + formatted: 'Wednesday, May 13, 2020
11:00 AM', timezone: "Los Angeles", }, { - formated: + formatted: 'Wednesday, May 13, 2020
6:00 PM', timezone: "UTC", },