Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eslint for recent pt-PT commit #2020

Merged
merged 3 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added
- `*`: Added [`eslint`](https://npmjs.com/package/eslint/) to static code analysis, by [@compulim](https://github.com/compulim), in PR [#1970](https://github.com/microsoft/BotFramework-WebChat/pull/1970)
- Added pt-PT language, by [@bodyzatva](https://github.com/bodyzatva) in PR [#2005](https://github.com/microsoft/BotFramework-WebChat/pull/2005)
- Added pt-PT language, by [@bodyzatva](https://github.com/bodyzatva) in PR [#2005](https://github.com/microsoft/BotFramework-WebChat/pull/2005) and PR [#2020](https://github.com/Microsoft/BotFramework-WebChat/pull/2020)

### Changed
- `*`: Bumps to [`lerna@3.13.4`](https://npmjs.com/package/lerna/), by [@corinagum](https://github.com/corinagum), in PR [#1989](https://github.com/Microsoft/BotFramework-WebChat/pull/1989)
Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/da-DK.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/de-DE.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/fr-FR.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/ja-JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/nl-NL.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/pt-BR.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
20 changes: 11 additions & 9 deletions packages/component/src/Localization/pt-PT.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint no-magic-numbers: ["error", { "ignore": [1, 5, 24, 48, 60000, 3600000] }] */

function xMinutesAgo(dateStr) {
const date = new Date(dateStr);
const dateTime = date.getTime();
Expand Down Expand Up @@ -27,16 +29,16 @@ function xMinutesAgo(dateStr) {
return `Ontem`;
} else if (window.Intl) {
return new Intl.DateTimeFormat('pt-PT').format(date);
} else {
return date.toLocaleString('pt-PT', {
day: '2-digit',
hour: '2-digit',
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
});
}

return date.toLocaleString('pt-PT', {
day: '2-digit',
hour: '2-digit',
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric'
});
}

export default {
Expand Down
6 changes: 3 additions & 3 deletions packages/component/src/Localization/ru-RU.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ function xMinutesAgo(dateStr) {
return date.toLocaleString(
'ru-RU',
{
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit'
minute: '2-digit',
month: '2-digit',
year: 'numeric'
}
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/zh-HANS.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/zh-HANT.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Localization/zh-YUE.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function xMinutesAgo(dateStr) {
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric',
year: 'numeric'
});
}

Expand Down