Skip to content

Commit

Permalink
perf(UI): add build number to about view
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry23011 committed Nov 3, 2024
1 parent 6c19318 commit eeecc36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions VirusTotal/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,24 @@
}
}
},
"about.current.version %@" : {
"about.current.version %@ (%@)" : {
"localizations" : {
"cs" : {
"stringUnit" : {
"state" : "translated",
"value" : "Verze %@"
"value" : "Verze %1$@ (%2$@)"
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Version %@"
"value" : "Version %1$@ (%2$@)"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "版本 %@"
"value" : "版本 %1$@ (%2$@)"
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion VirusTotal/Views/Internal/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct AboutView: View {
Text(appName)
.font(.system(size: 35, weight: .medium))

Text("about.current.version \(version)")
Text("about.current.version \(version) (\(buildNumber))")
.font(.system(size: 13))
.foregroundColor(.gray)

Expand Down Expand Up @@ -100,6 +100,9 @@ struct AboutView: View {
private var version: String {
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
}
private var buildNumber: String {
Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? ""
}
private var copyrightInfo: String {
Bundle.main.localizedString(
forKey: "NSHumanReadableCopyright",
Expand Down

0 comments on commit eeecc36

Please sign in to comment.