fix translation errors

This commit is contained in:
gouguoyin 2021-08-02 10:13:07 +08:00
parent ba58ce5665
commit f347f33561
4 changed files with 47 additions and 49 deletions

View File

@ -219,15 +219,15 @@ func TestLang_Japanese_DiffForHumans(t *testing.T) {
expected string // 期望值
}{
{1, "2020-08-05 13:14:15", "2020-08-05 13:14:15", "たった今"},
{2, "2020-08-05 13:14:15", "2021-08-05 13:14:15", "1 ねん前"},
{3, "2020-08-05 13:14:15", "2019-08-05 13:14:15", "1 ねん後"},
{4, "2020-08-05 13:14:15", "2030-08-05 13:14:15", "10 ねん前"},
{5, "2020-08-05 13:14:15", "2010-08-05 13:14:15", "10 ねん後"},
{2, "2020-08-05 13:14:15", "2021-08-05 13:14:15", "1 前"},
{3, "2020-08-05 13:14:15", "2019-08-05 13:14:15", "1 後"},
{4, "2020-08-05 13:14:15", "2030-08-05 13:14:15", "10 前"},
{5, "2020-08-05 13:14:15", "2010-08-05 13:14:15", "10 後"},
{6, "2020-08-05 13:14:15", "2020-09-05 13:14:15", "1 ヶがつ前"},
{7, "2020-08-05 13:14:15", "2020-07-05 13:14:15", "1 ヶがつ後"},
{8, "2020-08-05 13:14:15", "2021-06-05 13:14:15", "10 ヶがつ前"},
{9, "2020-08-05 13:14:15", "2019-10-05 13:14:15", "10 ヶがつ後"},
{6, "2020-08-05 13:14:15", "2020-09-05 13:14:15", "1 ヶ前"},
{7, "2020-08-05 13:14:15", "2020-07-05 13:14:15", "1 ヶ後"},
{8, "2020-08-05 13:14:15", "2021-06-05 13:14:15", "10 ヶ前"},
{9, "2020-08-05 13:14:15", "2019-10-05 13:14:15", "10 ヶ後"},
{10, "2020-08-05 13:14:15", "2020-08-06 13:14:15", "1 日前"},
{11, "2020-08-05 13:14:15", "2020-08-04 13:14:15", "1 日後"},
@ -239,10 +239,10 @@ func TestLang_Japanese_DiffForHumans(t *testing.T) {
{16, "2020-08-05 13:14:15", "2020-08-05 23:14:15", "10 時間前"},
{17, "2020-08-05 13:14:15", "2020-08-05 03:14:15", "10 時間後"},
{18, "2020-08-05 13:14:15", "2020-08-05 13:15:15", "1 分前"},
{19, "2020-08-05 13:14:15", "2020-08-05 13:13:15", "1 分後"},
{20, "2020-08-05 13:14:15", "2020-08-05 13:24:15", "10 分前"},
{21, "2020-08-05 13:14:15", "2020-08-05 13:04:15", "10 分後"},
{18, "2020-08-05 13:14:15", "2020-08-05 13:15:15", "1 分前"},
{19, "2020-08-05 13:14:15", "2020-08-05 13:13:15", "1 分後"},
{20, "2020-08-05 13:14:15", "2020-08-05 13:24:15", "10 分前"},
{21, "2020-08-05 13:14:15", "2020-08-05 13:04:15", "10 分後"},
{22, "2020-08-05 13:14:15", "2020-08-05 13:14:16", "1 秒前"},
{23, "2020-08-05 13:14:15", "2020-08-05 13:14:14", "1 秒後"},

View File

@ -219,35 +219,35 @@ func TestLang_Korean_DiffForHumans(t *testing.T) {
expected string // 期望值
}{
{1, "2020-08-05 13:14:15", "2020-08-05 13:14:15", "방금"},
{2, "2020-08-05 13:14:15", "2021-08-05 13:14:15", "1 년"},
{3, "2020-08-05 13:14:15", "2019-08-05 13:14:15", "1 년"},
{4, "2020-08-05 13:14:15", "2030-08-05 13:14:15", "10 년"},
{5, "2020-08-05 13:14:15", "2010-08-05 13:14:15", "10 년"},
{2, "2020-08-05 13:14:15", "2021-08-05 13:14:15", "1 년"},
{3, "2020-08-05 13:14:15", "2019-08-05 13:14:15", "1 년"},
{4, "2020-08-05 13:14:15", "2030-08-05 13:14:15", "10 년"},
{5, "2020-08-05 13:14:15", "2010-08-05 13:14:15", "10 년"},
{6, "2020-08-05 13:14:15", "2020-09-05 13:14:15", "1 월앞"},
{7, "2020-08-05 13:14:15", "2020-07-05 13:14:15", "1 월뒤"},
{8, "2020-08-05 13:14:15", "2021-06-05 13:14:15", "10 월앞"},
{9, "2020-08-05 13:14:15", "2019-10-05 13:14:15", "10 월뒤"},
{6, "2020-08-05 13:14:15", "2020-09-05 13:14:15", "1 개월전"},
{7, "2020-08-05 13:14:15", "2020-07-05 13:14:15", "1 개월후"},
{8, "2020-08-05 13:14:15", "2021-06-05 13:14:15", "10 개월전"},
{9, "2020-08-05 13:14:15", "2019-10-05 13:14:15", "10 개월후"},
{10, "2020-08-05 13:14:15", "2020-08-06 13:14:15", "1 일"},
{11, "2020-08-05 13:14:15", "2020-08-04 13:14:15", "1 일"},
{12, "2020-08-05 13:14:15", "2020-08-15 13:14:15", "1 요일앞"},
{13, "2020-08-05 13:14:15", "2020-07-26 13:14:15", "1 요일뒤"},
{10, "2020-08-05 13:14:15", "2020-08-06 13:14:15", "1 일"},
{11, "2020-08-05 13:14:15", "2020-08-04 13:14:15", "1 일"},
{12, "2020-08-05 13:14:15", "2020-08-15 13:14:15", "1 주전"},
{13, "2020-08-05 13:14:15", "2020-07-26 13:14:15", "1 주후"},
{14, "2020-08-05 13:14:15", "2020-08-05 14:14:15", "1 시"},
{15, "2020-08-05 13:14:15", "2020-08-05 12:14:15", "1 시"},
{16, "2020-08-05 13:14:15", "2020-08-05 23:14:15", "10 시"},
{17, "2020-08-05 13:14:15", "2020-08-05 03:14:15", "10 시"},
{14, "2020-08-05 13:14:15", "2020-08-05 14:14:15", "1 시간전"},
{15, "2020-08-05 13:14:15", "2020-08-05 12:14:15", "1 시간후"},
{16, "2020-08-05 13:14:15", "2020-08-05 23:14:15", "10 시간전"},
{17, "2020-08-05 13:14:15", "2020-08-05 03:14:15", "10 시간후"},
{18, "2020-08-05 13:14:15", "2020-08-05 13:15:15", "1 분"},
{19, "2020-08-05 13:14:15", "2020-08-05 13:13:15", "1 분"},
{20, "2020-08-05 13:14:15", "2020-08-05 13:24:15", "10 분"},
{21, "2020-08-05 13:14:15", "2020-08-05 13:04:15", "10 분"},
{18, "2020-08-05 13:14:15", "2020-08-05 13:15:15", "1 분"},
{19, "2020-08-05 13:14:15", "2020-08-05 13:13:15", "1 분"},
{20, "2020-08-05 13:14:15", "2020-08-05 13:24:15", "10 분"},
{21, "2020-08-05 13:14:15", "2020-08-05 13:04:15", "10 분"},
{22, "2020-08-05 13:14:15", "2020-08-05 13:14:16", "1 초"},
{23, "2020-08-05 13:14:15", "2020-08-05 13:14:14", "1 초"},
{24, "2020-08-05 13:14:15", "2020-08-05 13:14:25", "10 초"},
{25, "2020-08-05 13:14:15", "2020-08-05 13:14:05", "10 초"},
{22, "2020-08-05 13:14:15", "2020-08-05 13:14:16", "1 초"},
{23, "2020-08-05 13:14:15", "2020-08-05 13:14:14", "1 초"},
{24, "2020-08-05 13:14:15", "2020-08-05 13:14:25", "10 초"},
{25, "2020-08-05 13:14:15", "2020-08-05 13:14:05", "10 초"},
}
for _, test := range tests {

View File

@ -1,18 +1,17 @@
{
"seasons": "はる|なつ|あき|ふゆ",
"months": "いちがつ|にがつ|さんがつ|しがつ|ごがつ|ろくがつ|しちがつ|はちがつ|くがつ|じゅうがつ|じゅういちがつ|じゅうにがつ",
"months_short": "1がつ|2がつ|3がつ|4がつ|5がつ|6がつ|7がつ|8がつ|9がつ|10がつ|11がつ|12がつ",
"weeks": "げつようび|かようび|すいようび|もくようび|きんようび|どようび|にちようび",
"weeks_short": "週日|週一|週二|週三|週四|週五|週六",
"seasons": "はる|なつ|あき|ふゆ",
"constellations": "おひつじざ|おうしざ|ふたござ|かにざ|ししざ|おとめざ|てんびんざ|さそりざ|いてざ|やぎざ|みずがめざ|うおざ",
"year":"%d ねん",
"month":"%d ヶがつ",
"year":"%d ",
"month":"%d ヶ",
"week":"%d 週間",
"day":"%d 日",
"hour":"%d 時間",
"minute":"%d 分",
"minute":"%d 分",
"second":"%d 秒",
"now": "たった今",
"ago":"%s前",

View File

@ -1,22 +1,21 @@
{
"seasons": "봄|여름|가을|겨울",
"months": "일월|이월|삼월|사월|오월|유월|칠월|팔월|구월|시월|십일월|십이월",
"months_short": "1월|2월|3월|4월|5월|6월|7월|8월|9월|10월|11월|12월",
"weeks": "일요일|월요일|화요일|수요일|목요일|금요일|토요일",
"weeks_short": "일요일|월요일|화요일|수요일|목요일|금요일|토요일",
"seasons": "봄|여름|가을|겨울",
"constellations": "양자리|황소자리|쌍둥이자리|게자리|사자자리|처녀자리|천칭자리|전갈자리|사수자리|염소자리|물병자리|물고기자리",
"year":"%d 년",
"month":"%d 월",
"week":"%d 요일",
"month":"%d 월",
"week":"%d ",
"day":"%d 일",
"hour":"%d 시",
"hour":"%d 시",
"minute":"%d 분",
"second":"%d 초",
"now": "방금",
"ago":"%s앞",
"from_now":"%s",
"before":"%s",
"after":"%s"
"from_now":"%s",
"before":"%s",
"after":"%s"
}