Skip to content

Commit f6fa4ce

Browse files
committed
fix: i18n
1 parent 71088ea commit f6fa4ce

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ A command line tool for [Hacker News](https://news.ycombinator.com/)、 [Product
2323
- [Hacker News](https://news.ycombinator.com/)
2424
- [Product Hunt](https://www.producthunt.com/)
2525

26+
| Resource | Sub Command | Parameters | Screenshot |
27+
| --- | --- | --- | --- |
28+
| [GitHub](http://github.com/) | `github` | `-l, --lang`<br>`-s, --since` | ![image-20210530161456461](https://mayandev.oss-cn-hangzhou.aliyuncs.com/uPic/image-20210530161456461.png) |
29+
| [Product Hunt](https://www.producthunt.com/) | `product` | `-c, --count`<br>`-p, --past` | ![image-20210530163127103](https://mayandev.oss-cn-hangzhou.aliyuncs.com/uPic/image-20210530163127103.png) |
30+
| [Hacker News](https://news.ycombinator.com/) | `news` | `-t --top` | ![image-20210530163347458](https://mayandev.oss-cn-hangzhou.aliyuncs.com/uPic/image-20210530163347458.png) |
31+
2632
## Language Support
2733

2834
Input sub-command `config` to config cli language.
@@ -43,10 +49,10 @@ Current support:
4349
## TODO
4450
4551
- [x] i18n support
52+
- [x] Accept resouce param
4653
- [ ] Hyper link support
4754
- [ ] Support Translate
48-
- [ ] Accept input param for pagination
49-
- [ ] Add more resource
55+
- [ ] Add more resource(Reddit、V2ex)
5056
5157
## API References
5258

i18n/en.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ const en = {
66
link: 'Link',
77
lang: 'Language',
88
star: 'Stars',
9-
author: '作者',
9+
author: 'Author',
1010
addedStar: {
11-
weekly: 'stars this week',
12-
daily: 'stars this day',
13-
monthly: 'stars this month',
11+
weekly: 'Stars this week',
12+
daily: 'Stars this day',
13+
monthly: 'Stars this month',
1414
},
1515
},
1616
hn: {

utils/fetchGitHub.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ async function fetchGitHubTrending(since = 'daily', language = '') {
113113
chalk.cyan(stars),
114114
` | ${t(`github.addedStar.${since}`)}: `,
115115
chalk.cyan(added_stars),
116-
` | ${t('github.author')}: `,
117-
chalk.cyan(author),
118116
);
119117
desc && console.log(`${t('github.desc')}: `, chalk.green(desc));
120118
console.log(`${t('github.link')}: `, chalk.dim(repo_link));

0 commit comments

Comments
 (0)