语言适配

This commit is contained in:
X1627315083
2024-06-21 10:30:09 +08:00
parent dc93403506
commit 8b0af784de
20 changed files with 476 additions and 150 deletions

View File

@@ -194,19 +194,19 @@ let setPubDate = (date)=>{
// 根据时间差的大小返回不同的描述
if (years > 0) {
return `${years} 年前`;
return `${years} years ago`;
} else if (months > 0) {
return `${months} 个月前`;
return `${months} months ago`;
} else if (weeks > 0) {
return `${weeks} 周前`;
return `${weeks} Weeks ago`;
} else if (days > 0) {
return `一天前`;
return `1 days ago`;
} else if (hours > 0) {
return `${hours} 小时前`;
return `${hours} Hours ago`;
} else if (minutes > 0) {
return `${minutes} 分钟前`;
return `${minutes} minutes ago`;
} else {
return `1 分钟前`;
return `1 minute ago`;
}
}