Skip to content

Commit 1933a0c

Browse files
committed
调整版本号样式
1 parent 3558069 commit 1933a0c

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

Bark/Localizable.xcstrings

+24-1
Original file line numberDiff line numberDiff line change
@@ -3059,6 +3059,29 @@
30593059
}
30603060
}
30613061
},
3062+
"version" : {
3063+
"extractionState" : "manual",
3064+
"localizations" : {
3065+
"en" : {
3066+
"stringUnit" : {
3067+
"state" : "translated",
3068+
"value" : "Version"
3069+
}
3070+
},
3071+
"tr" : {
3072+
"stringUnit" : {
3073+
"state" : "translated",
3074+
"value" : "Sürüm"
3075+
}
3076+
},
3077+
"zh-Hans" : {
3078+
"stringUnit" : {
3079+
"state" : "translated",
3080+
"value" : "版本"
3081+
}
3082+
}
3083+
}
3084+
},
30623085
"viewAllSounds" : {
30633086
"extractionState" : "manual",
30643087
"localizations" : {
@@ -3084,4 +3107,4 @@
30843107
}
30853108
},
30863109
"version" : "1.0"
3087-
}
3110+
}

Common/Client.swift

-10
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ class Client: NSObject {
3636
}
3737
}
3838

39-
let appVersion: String = {
40-
var version = "0.0.0"
41-
if let infoDict = Bundle.main.infoDictionary {
42-
if let appVersion = infoDict["CFBundleVersion"] as? String {
43-
version = appVersion
44-
}
45-
}
46-
return version
47-
}()
48-
4939
enum ClienState: Int, Codable {
5040
case ok
5141
case unRegister

View/MessageSettingFooter.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MessageSettingFooter: UITextView, UITextViewDelegate {
2020
// build号
2121
let buildVersion = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? ""
2222

23-
let attr = NSMutableAttributedString(string: "Version \(appVersion) (Build \(buildVersion))\n", attributes: [.font: UIFont.preferredFont(ofSize: 12), .foregroundColor: BKColor.grey.darken1])
23+
let attr = NSMutableAttributedString(string: "\(NSLocalizedString("version")) \(appVersion) (\(buildVersion))\n", attributes: [.font: UIFont.preferredFont(ofSize: 12), .foregroundColor: BKColor.grey.darken1])
2424
attr.append(NSAttributedString(string: NSLocalizedString("privacyPolicy"), attributes: [.link: "privacyPolicy"]))
2525
attr.append(NSAttributedString(string: " · "))
2626
attr.append(NSAttributedString(string: NSLocalizedString("userAgreement"), attributes: [.link: "userAgreement"]))
@@ -32,7 +32,7 @@ class MessageSettingFooter: UITextView, UITextViewDelegate {
3232
attr.addAttribute(.paragraphStyle, value: style, range: NSRange(location: 0, length: attr.length))
3333

3434
self.attributedText = attr
35-
self.linkTextAttributes = [.foregroundColor: BKColor.grey.darken1, .underlineStyle: NSUnderlineStyle.single.rawValue]
35+
self.linkTextAttributes = [.foregroundColor: BKColor.grey.darken1, .underlineStyle: NSUnderlineStyle.single.rawValue, .font: UIFont.preferredFont(ofSize: 12)]
3636
self.textAlignment = .center
3737
}
3838

0 commit comments

Comments
 (0)