Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
Conflicts:
	Bark/en.lproj/Localizable.strings
	Bark/tr.lproj/Localizable.strings
	Bark/zh-Hans.lproj/Localizable.strings
  • Loading branch information
Finb committed Sep 18, 2023
2 parents 6841869 + f627e74 commit 7c38dba
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
6 changes: 6 additions & 0 deletions Bark/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ ciphertextComment = "URL encoding the ciphertext, there may be special character
consoleComment = "The console will print";
keyComment = "Must be %d bit long";

removeMessage = "Remove";
timeJustNow = "Just now";
timeMinAgo = "%1$@ minute ago";
timeHourAgo = "%1$@ hour ago";
timeMinHourAgo = "%1$@ hour %2$@ minutes ago";

crashed = "Crashed!";
copyCrashLog = "Copy Crash Log";
crashContent = "If the app keeps crashing repeatedly, you can try to uncheck Bark in System Settings -> iCloud -> Apps Using iCloud. (The path may vary slightly depending on the system version.)
Expand Down
6 changes: 6 additions & 0 deletions Bark/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ ciphertextComment = "URL şifreli metni kodlarken özel karakterler olabilir.";
consoleComment = "Konsola şunları yazdırır";
keyComment = "%d bit uzunluğunda olmalıdır";

removeMessage = "Sil";
timeJustNow = "Az önce";
timeMinAgo = "%1$@ dakika önce";
timeHourAgo = "%1$@ saat önce";
timeMinHourAgo = "%1$@ saat %2$@ dakika önce";

crashed = "Crashed!";
copyCrashLog = "Copy Crash Log";
crashContent = "If the app keeps crashing repeatedly, you can try to uncheck Bark in System Settings -> iCloud -> Apps Using iCloud. (The path may vary slightly depending on the system version.)
Expand Down
9 changes: 6 additions & 3 deletions Bark/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,12 @@ viewAllSounds = "查看所有铃声";

service = "服务器";


lastHour = "过去一小时";
today = "今天";
todayAndYesterday = "昨天和今天";
allTime = "所有时间";

clearFrom = "清除以下时间段的历史消息:";

clear = "清除";

group = "群组";
Expand Down Expand Up @@ -113,7 +111,6 @@ badgeNotice = "可以为推送设置角标,角标可以是任意数字。";

deviceTokenInfo = "苹果推送的真实设备 Token ,请勿泄露,点击可复制到剪切板。";


serverList = "服务器列表";
copyAddressAndKey = "复制地址和Key";
resetKey = "重置或还原Key";
Expand Down Expand Up @@ -153,6 +150,12 @@ ciphertextComment = "密文可能有特殊字符,所以记得 URL 编码一下
consoleComment = "控制台将打印";
keyComment = "必须%d位";

removeMessage = "删除";
timeJustNow = "刚刚";
timeMinAgo = "%1$@分钟前";
timeHourAgo = "%1$@小时前";
timeMinHourAgo = "%1$@小时%2$@分钟前";

crashed = "好像闪退了!";
copyCrashLog = "复制闪退日志";
crashContent = "如果一直重复闪退,你可以尝试在 系统设置 -> iCloud -> 使用iCloud的APP -> 取消勾选Bark。(不同系统版本可能设置路径略有差异)
Expand Down
9 changes: 6 additions & 3 deletions Common/Date+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ extension Date {
return formatString(format: "HH:mm")
}
if hour > 0 {
return "\(hour)小时" + (minute > 0 ? "\(minute)分钟" : "") + ""
if minute > 0 {
return String(format: NSLocalizedString("timeMinHourAgo"), hour, minute)
}
return String(format: NSLocalizedString("timeHourAgo"), hour)
}
if minute > 1 {
return "\(minute)分钟前"
return String(format: NSLocalizedString("timeMinAgo"), minute)
}
return "刚刚"
return NSLocalizedString("timeJustNow")
}
}

Expand Down
2 changes: 1 addition & 1 deletion Controller/MessageListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class MessageListViewController: BaseViewController<MessageListViewModel> {

extension MessageListViewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
let action = UIContextualAction(style: .destructive, title: "删除") { [weak self] _, _, actionPerformed in
let action = UIContextualAction(style: .destructive, title: NSLocalizedString("removeMessage")) { [weak self] _, _, actionPerformed in
self?.tableView.dataSource?.tableView?(self!.tableView, commit: .delete, forRowAt: indexPath)
actionPerformed(true)
}
Expand Down

0 comments on commit 7c38dba

Please sign in to comment.