Skip to content

Commit 1e3aea8

Browse files
committed
release: release v2.0.9
1 parent cf0744d commit 1e3aea8

10 files changed

+55
-31
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# 2.0.9
2+
- (fix) vi translation bug.
13
# 2.0.8
2-
34
- Add Vietnam translation [#57](https://github.com/runkids/vue2-timeago/pull/57).
5+
46
# 2.0.7
57

68
- Add Danish translation [#51](https://github.com/runkids/vue2-timeago/pull/51).

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ yarn serve
5050
Get from npm / yarn:
5151

5252
```js
53-
npm i vue2-timeago@2.0.8
53+
npm i vue2-timeago@2.0.9
5454
```
5555

5656
```js
57-
yarn add vue2-timeago@2.0.8
57+
yarn add vue2-timeago@2.0.9
5858
```
5959

60-
or just include [vue2-timeago.umd.min.js](https://cdn.jsdelivr.net/npm/vue2-timeago@2.0.8/dist/vue2-timeago.umd.min.js) to your view like
60+
or just include [vue2-timeago.umd.min.js](https://cdn.jsdelivr.net/npm/vue2-timeago@2.0.9/dist/vue2-timeago.umd.min.js) to your view like
6161

6262
```js
63-
<script src='https://cdn.jsdelivr.net/npm/vue2-timeago@2.0.8/dist/vue2-timeago.umd.min.js'></script>
63+
<script src='https://cdn.jsdelivr.net/npm/vue2-timeago@2.0.9/dist/vue2-timeago.umd.min.js'></script>
6464
```
6565

6666
## Usage
@@ -84,7 +84,7 @@ export default {
8484
import 'vue2-timeago/dist/vue2-timeago.css'
8585
```
8686

87-
or just include [vue2-timeago.css](https://cdn.jsdelivr.net/npm/vue2-timeago@2.0.8/dist/vue2-timeago.css)
87+
or just include [vue2-timeago.css](https://cdn.jsdelivr.net/npm/vue2-timeago@2.0.9/dist/vue2-timeago.css)
8888

8989
##### HTML
9090

dist/vue2-timeago.common.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue2-timeago.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue2-timeago.umd.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue2-timeago.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue2-timeago",
3-
"version": "2.0.8",
3+
"version": "2.0.9",
44
"description": "A vue component used to format date with time ago statement.",
55
"main": "dist/vue2-timeago.common.js",
66
"unpkg": "dist/vue2-timeago.umd.min.js",
@@ -48,7 +48,7 @@
4848
},
4949
"dependencies": {
5050
"v-tooltip": "^2.1.2",
51-
"vue2-timeago": "2.0.8"
51+
"vue2-timeago": "2.0.9"
5252
},
5353
"peerDependencies": {
5454
"v-tooltip": "^2.1.2"

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div id="app" class="container">
3-
<h2>Version 2.0.8</h2>
3+
<h2>Version 2.0.9</h2>
44
<h2>
55
You opened this page
66
<time-ago :locale="locale" :long="longString" class="title" refresh />

src/helpers/lang/countries/vi.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function formatToLongString(time, type) {
2+
return `${time} ${type}${time > 1 ? 'giây' : ''} trước`
3+
}
4+
5+
export default {
6+
short: {
7+
now: 'vừa xong',
8+
sec: 's',
9+
min: 'p',
10+
hour: 'g',
11+
day: 'N',
12+
},
13+
long: {
14+
now: 'Vừa xong',
15+
sec: (time) => formatToLongString(time, 'giây'),
16+
min: (time) => formatToLongString(time, 'phút'),
17+
hour: (time) => formatToLongString(time, 'giờ'),
18+
day: (time) => formatToLongString(time, 'ngày'),
19+
},
20+
}

src/helpers/lang/index.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
import zh_TW from './countries/zh_TW'
2-
import zh_CN from './countries/zh_CN'
1+
import ar from './countries/ar'
2+
import bg from './countries/bg'
3+
import da from './countries/da'
4+
import de from './countries/de'
35
import en from './countries/en'
4-
import jp from './countries/jp'
56
import es from './countries/es'
6-
import pt_BR from './countries/pt_BR'
7-
import ar from './countries/ar'
87
import fr from './countries/fr'
9-
import pl from './countries/pl'
10-
import tr from './countries/tr'
8+
import he from './countries/he'
119
import id from './countries/id'
10+
import jp from './countries/jp'
11+
import ko from './countries/ko'
12+
import nl from './countries/nl'
13+
import no from './countries/no'
14+
import pl from './countries/pl'
15+
import pt_BR from './countries/pt_BR'
1216
import ro from './countries/ro'
1317
import ru from './countries/ru'
14-
import de from './countries/de'
15-
import uk from './countries/uk'
16-
import bg from './countries/bg'
1718
import se from './countries/se'
18-
import nl from './countries/nl'
19-
import he from './countries/he'
20-
import ko from './countries/ko'
2119
import th from './countries/th'
22-
import no from './countries/no'
23-
import da from './countries/da'
20+
import tr from './countries/tr'
21+
import uk from './countries/uk'
22+
import vi from './countries/vi'
23+
import zh_CN from './countries/zh_CN'
24+
import zh_TW from './countries/zh_TW'
2425

2526
export default {
2627
zh_TW,
@@ -46,4 +47,5 @@ export default {
4647
nl, // Dutch / Netherlands
4748
no, // Norwegian
4849
da, // Danish
50+
vi, // Vietnam
4951
}

0 commit comments

Comments
 (0)