Commit 65ae7041 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Minor fix spelling of formatted

Replaces all frontend occurences of
formated with formatted
parent 1f487606
......@@ -35,10 +35,10 @@ export default {
title() {
const timeago = getTimeago();
const { timeDifference, standardDateFormat } = this;
const formatedDate = standardDateFormat;
const formattedDate = standardDateFormat;
if (timeDifference >= -1 && timeDifference < 7) {
return `${timeago.format(this.issueDueDate)} (${formatedDate})`;
return `${timeago.format(this.issueDueDate)} (${formattedDate})`;
}
return timeago.format(this.issueDueDate);
......
......@@ -159,7 +159,7 @@ export default {
<div role="rowheader" class="table-mobile-header">{{ __('Created') }}</div>
<div class="table-mobile-content text-secondary key-created-at">
<span v-tooltip :title="tooltipTitle(deployKey.created_at)">
<icon name="calendar" /> <span>{{ timeFormated(deployKey.created_at) }}</span>
<icon name="calendar" /> <span>{{ timeFormatted(deployKey.created_at) }}</span>
</span>
</div>
</div>
......
......@@ -56,7 +56,7 @@ export default {
__('Reported %{timeAgo} by %{reportedBy}'),
{
reportedBy: `<strong>${this.error.culprit}</strong>`,
timeAgo: this.timeFormated(this.stacktraceData.date_received),
timeAgo: this.timeFormatted(this.stacktraceData.date_received),
},
false,
);
......@@ -107,7 +107,7 @@ export default {
this.$refs.sentryIssueForm.submit();
},
formatDate(date) {
return `${this.timeFormated(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`;
return `${this.timeFormatted(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`;
},
},
};
......
......@@ -22,7 +22,7 @@ export default {
mixins: [timeAgoMixin],
data() {
return {
lastCommitFormatedAge: null,
lastCommitFormattedAge: null,
};
},
computed: {
......@@ -62,7 +62,7 @@ export default {
},
commitAgeUpdate() {
if (this.lastCommit) {
this.lastCommitFormatedAge = this.timeFormated(this.lastCommit.committed_date);
this.lastCommitFormattedAge = this.timeFormatted(this.lastCommit.committed_date);
}
},
getCommitPath(shortSha) {
......@@ -118,7 +118,7 @@ export default {
:title="tooltipTitle(lastCommit.committed_date)"
data-placement="top"
data-container="body"
>{{ lastCommitFormatedAge }}</time
>{{ lastCommitFormattedAge }}</time
>
</div>
<ide-status-list class="ml-auto" />
......
......@@ -91,7 +91,7 @@ export default {
/>
<gl-tooltip :target="() => $refs.state" placement="bottom">
<span class="d-block">
<span class="bold"> {{ stateTitle }} </span> {{ timeFormated(closedOrCreatedDate) }}
<span class="bold"> {{ stateTitle }} </span> {{ timeFormatted(closedOrCreatedDate) }}
</span>
<span class="text-tertiary">{{ tooltipTitle(closedOrCreatedDate) }}</span>
</gl-tooltip>
......
......@@ -168,13 +168,13 @@ export default {
/>
<detail-row
v-if="job.finished_at"
:value="timeFormated(job.finished_at)"
:value="timeFormatted(job.finished_at)"
class="js-job-finished"
title="Finished"
/>
<detail-row
v-if="job.erased_at"
:value="timeFormated(job.erased_at)"
:value="timeFormatted(job.erased_at)"
class="js-job-erased"
title="Erased"
/>
......
......@@ -114,7 +114,7 @@ export const logLinesParser = (lines = [], accumulator = []) =>
acc.push(parseHeaderLine(line, lineNumber));
} else if (isCollapsibleSection(acc, last, line)) {
// if the object belongs to a nested section, we append it to the new `lines` array of the
// previously formated header
// previously formatted header
last.lines.push(parseLine(line, lineNumber));
} else if (line.section_duration) {
// if the line has section_duration, we look for the correct header to add it
......
......@@ -447,7 +447,7 @@ export const parsePikadayDate = dateString => {
/**
* Used `onSelect` method in pickaday
* @param {Date} date UTC format
* @return {String} Date formated in yyyy-mm-dd
* @return {String} Date formatted in yyyy-mm-dd
*/
export const pikadayToString = date => {
const day = pad(date.getDate());
......@@ -513,8 +513,8 @@ export const stringifyTime = (timeObject, fullNameFormat = false) => {
if (fullNameFormat && isNonZero) {
// Remove traling 's' if unit value is singular
const formatedUnitName = unitValue > 1 ? unitName : unitName.replace(/s$/, '');
return `${memo} ${unitValue} ${formatedUnitName}`;
const formattedUnitName = unitValue > 1 ? unitName : unitName.replace(/s$/, '');
return `${memo} ${unitValue} ${formattedUnitName}`;
}
return isNonZero ? `${memo} ${unitValue}${unitName.charAt(0)}` : memo;
......
......@@ -45,7 +45,7 @@ export default {
return this.mergeRequest.headPipeline && this.mergeRequest.headPipeline.detailedStatus;
},
formattedTime() {
return this.timeFormated(this.mergeRequest.createdAt);
return this.timeFormatted(this.mergeRequest.createdAt);
},
statusBoxClass() {
switch (this.mergeRequest.state) {
......
......@@ -31,7 +31,7 @@ export default {
hasFinishedTime() {
return this.finishedTime !== '';
},
durationFormated() {
durationFormatted() {
const date = new Date(this.duration * 1000);
let hh = date.getUTCHours();
......@@ -59,7 +59,7 @@ export default {
<div class="table-mobile-header" role="rowheader">{{ s__('Pipeline|Duration') }}</div>
<div class="table-mobile-content">
<p v-if="hasDuration" class="duration">
<span v-html="iconTimerSvg"> </span> {{ durationFormated }}
<span v-html="iconTimerSvg"> </span> {{ durationFormatted }}
</p>
<p v-if="hasFinishedTime" class="finished-at d-none d-sm-none d-md-block">
......@@ -71,7 +71,7 @@ export default {
data-placement="top"
data-container="body"
>
{{ timeFormated(finishedTime) }}
{{ timeFormatted(finishedTime) }}
</time>
</p>
</div>
......
......@@ -247,7 +247,7 @@ export default {
<td>
<span v-gl-tooltip.bottom :title="tooltipTitle(item.createdAt)">{{
timeFormated(item.createdAt)
timeFormatted(item.createdAt)
}}</span>
</td>
......
......@@ -48,7 +48,7 @@ export default {
},
releasedTimeAgo() {
return sprintf(__('released %{time}'), {
time: this.timeFormated(this.release.released_at),
time: this.timeFormatted(this.release.released_at),
});
},
userImageAltDescription() {
......
......@@ -50,7 +50,7 @@ export default {
},
computed: {
releasedAtTimeAgo() {
return this.timeFormated(this.releasedAt);
return this.timeFormatted(this.releasedAt);
},
userImageAltDescription() {
return this.author && this.author.username
......
......@@ -41,7 +41,7 @@ export default {
},
computed: {
deployTimeago() {
return this.timeFormated(this.deployment.deployed_at);
return this.timeFormatted(this.deployment.deployed_at);
},
deployedText() {
return this.$options.deployedTextMap[this.computedDeploymentStatus];
......
......@@ -54,7 +54,7 @@ export default {
return timeFor(
this.milestoneDue,
sprintf(__('Expired %{expiredOn}'), {
expiredOn: this.timeFormated(this.milestoneDue),
expiredOn: this.timeFormatted(this.milestoneDue),
}),
);
}
......@@ -62,7 +62,7 @@ export default {
return sprintf(
this.isMilestoneStarted ? __('Started %{startsIn}') : __('Starts %{startsIn}'),
{
startsIn: this.timeFormated(this.milestoneStart),
startsIn: this.timeFormatted(this.milestoneStart),
},
);
}
......
......@@ -64,7 +64,7 @@ export default {
tooltipText(dateType = 'min') {
const defaultText = dateType === 'min' ? __('Start date') : __('Due date');
const date = this[`${dateType}Date`];
const timeAgo = dateType === 'min' ? this.timeFormated(date) : timeFor(date);
const timeAgo = dateType === 'min' ? this.timeFormatted(date) : timeFor(date);
const dateText = date ? [this.dateText(dateType), `(${timeAgo})`].join(' ') : '';
if (date) {
......
......@@ -35,7 +35,7 @@ export default {
v-gl-tooltip.viewport="{ placement: tooltipPlacement }"
:class="cssClass"
:title="tooltipTitle(time)"
v-text="timeFormated(time)"
v-text="timeFormatted(time)"
>
</time>
</template>
......@@ -159,7 +159,7 @@ const mixins = {
return this.displayReference.split(this.pathIdSeparator).pop();
},
createdAtInWords() {
return this.createdAt ? this.timeFormated(this.createdAt) : '';
return this.createdAt ? this.timeFormatted(this.createdAt) : '';
},
createdAtTimestamp() {
return this.createdAt ? formatDate(new Date(this.createdAt)) : '';
......@@ -168,10 +168,10 @@ const mixins = {
return this.mergedAt ? formatDate(new Date(this.mergedAt)) : '';
},
mergedAtInWords() {
return this.mergedAt ? this.timeFormated(this.mergedAt) : '';
return this.mergedAt ? this.timeFormatted(this.mergedAt) : '';
},
closedAtInWords() {
return this.closedAt ? this.timeFormated(this.closedAt) : '';
return this.closedAt ? this.timeFormatted(this.closedAt) : '';
},
closedAtTimestamp() {
return this.closedAt ? formatDate(new Date(this.closedAt)) : '';
......
......@@ -5,7 +5,7 @@ import { formatDate, getTimeago } from '../../lib/utils/datetime_utility';
*/
export default {
methods: {
timeFormated(time) {
timeFormatted(time) {
const timeago = getTimeago();
return timeago.format(time);
......
......@@ -81,7 +81,7 @@ export default {
computed: {
updatedText() {
return sprintf(__('Updated %{updated_at} by %{updated_by}'), {
updated_at: this.timeFormated(this.updatedAt),
updated_at: this.timeFormatted(this.updatedAt),
updated_by: this.updatedBy.name,
});
},
......
......@@ -49,7 +49,7 @@ export default {
class="event-status-timestamp"
data-placement="bottom"
>
({{ timeFormated(timeStamp) }})
({{ timeFormatted(timeStamp) }})
</span>
</template>
<strong v-else> {{ __('Not available') }} </strong>
......
......@@ -13,7 +13,7 @@ export default {
},
statusInfoStaleMessage() {
return sprintf(s__('GeoNodes|Data is out of date from %{timeago}'), {
timeago: this.timeFormated(this.nodeDetails.statusCheckTimestamp),
timeago: this.timeFormatted(this.nodeDetails.statusCheckTimestamp),
});
},
},
......
......@@ -257,7 +257,7 @@ export default {
<template #created="items">
<span v-gl-tooltip :title="tooltipTitle(items.item.created)">{{
timeFormated(items.item.created)
timeFormatted(items.item.created)
}}</span>
</template>
</gl-table>
......
......@@ -60,7 +60,7 @@ export default {
return rawTimestamp ? formatDate(new Date(rawTimestamp)) : '';
},
getTimestampInWords(rawTimestamp) {
return rawTimestamp ? this.timeFormated(rawTimestamp) : '';
return rawTimestamp ? this.timeFormatted(rawTimestamp) : '';
},
},
};
......
......@@ -26,7 +26,7 @@ export default {
return this.tooltipTitle(this.time);
},
formattedTime() {
return this.timeFormated(this.time);
return this.timeFormatted(this.time);
},
},
};
......
......@@ -45,9 +45,9 @@ describe('Environment item', () => {
});
it('should render last deployment date', () => {
const formatedDate = format(environment.last_deployment.deployed_at);
const formattedDate = format(environment.last_deployment.deployed_at);
expect(wrapper.find('.environment-created-date-timeago').text()).toContain(formatedDate);
expect(wrapper.find('.environment-created-date-timeago').text()).toContain(formattedDate);
});
describe('With user information', () => {
......
......@@ -8,7 +8,7 @@ describe('Erased block', () => {
const erasedAt = '2016-11-07T11:11:16.525Z';
const timeago = getTimeago();
const formatedDate = timeago.format(erasedAt);
const formattedDate = timeago.format(erasedAt);
const createComponent = props => {
wrapper = mount(ErasedBlock, {
......@@ -41,7 +41,7 @@ describe('Erased block', () => {
});
it('renders erasedAt', () => {
expect(wrapper.text().trim()).toContain(formatedDate);
expect(wrapper.text().trim()).toContain(formattedDate);
});
});
......@@ -57,7 +57,7 @@ describe('Erased block', () => {
});
it('renders erasedAt', () => {
expect(wrapper.text().trim()).toContain(formatedDate);
expect(wrapper.text().trim()).toContain(formattedDate);
});
});
});
......@@ -68,7 +68,7 @@ describe('table registry', () => {
expect(tds.at(2).html()).toContain(repoPropsData.list[0].shortRevision);
expect(tds.at(3).html()).toContain(repoPropsData.list[0].layers);
expect(tds.at(3).html()).toContain(repoPropsData.list[0].size);
expect(tds.at(4).html()).toContain(wrapper.vm.timeFormated(repoPropsData.list[0].createdAt));
expect(tds.at(4).html()).toContain(wrapper.vm.timeFormatted(repoPropsData.list[0].createdAt));
});
it('should have a label called Image ID', () => {
......
......@@ -8,8 +8,8 @@ import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
jest.mock('~/vue_shared/mixins/timeago', () => ({
methods: {
timeFormated() {
return '7 fortnightes ago';
timeFormatted() {
return '7 fortnights ago';
},
tooltipTitle() {
return 'February 30, 2401';
......@@ -82,7 +82,7 @@ describe('Release block footer', () => {
it('renders the author and creation time info', () => {
expect(trimText(authorDateInfoSection().text())).toBe(
`Created 7 fortnightes ago by ${releaseClone.author.username}`,
`Created 7 fortnights ago by ${releaseClone.author.username}`,
);
});
......@@ -139,7 +139,7 @@ describe('Release block footer', () => {
beforeEach(() => factory({ author: undefined }));
it('renders the release date without the author name', () => {
expect(trimText(authorDateInfoSection().text())).toBe('Created 7 fortnightes ago');
expect(trimText(authorDateInfoSection().text())).toBe('Created 7 fortnights ago');
});
});
......
......@@ -68,7 +68,7 @@ describe('Release block', () => {
});
it('renders release date', () => {
expect(wrapper.text()).toContain(timeagoMixin.methods.timeFormated(release.released_at));
expect(wrapper.text()).toContain(timeagoMixin.methods.timeFormatted(release.released_at));
});
it('renders number of assets provided', () => {
......
......@@ -90,11 +90,11 @@ describe('RelatedIssuableItem', () => {
it('renders state title', () => {
const stateTitle = tokenState.attributes('title');
const formatedCreateDate = formatDate(props.createdAt);
const formattedCreateDate = formatDate(props.createdAt);
expect(stateTitle).toContain('<span class="bold">Opened</span>');
expect(stateTitle).toContain(`<span class="text-tertiary">${formatedCreateDate}</span>`);
expect(stateTitle).toContain(`<span class="text-tertiary">${formattedCreateDate}</span>`);
});
it('renders aria label', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment