Update reaction notification title and miscellaneous localization fixes
This commit is contained in:
@@ -1153,10 +1153,10 @@ func create_local_notification(profiles: Profiles, notify: LocalNotification) {
|
|||||||
title = String(format: NSLocalizedString("Reposted by %@", comment: "Reposted by heading in local notification"), displayName)
|
title = String(format: NSLocalizedString("Reposted by %@", comment: "Reposted by heading in local notification"), displayName)
|
||||||
identifier = "myBoostNotification"
|
identifier = "myBoostNotification"
|
||||||
case .like:
|
case .like:
|
||||||
title = String(format: NSLocalizedString("Reacted by %@", comment: "Reacted by heading in local notification"), displayName)
|
title = String(format: NSLocalizedString("%@ reacted with %@", comment: "Reacted by heading in local notification"), displayName, notify.event.content)
|
||||||
identifier = "myLikeNotification"
|
identifier = "myLikeNotification"
|
||||||
case .dm:
|
case .dm:
|
||||||
title = String(format: NSLocalizedString("%@", comment: "DM by heading in local notification"), displayName)
|
title = displayName
|
||||||
identifier = "myDMNotification"
|
identifier = "myDMNotification"
|
||||||
case .zap:
|
case .zap:
|
||||||
// not handled here
|
// not handled here
|
||||||
|
|||||||
@@ -26,16 +26,16 @@ struct EventDetailBar: View {
|
|||||||
HStack {
|
HStack {
|
||||||
if bar.boosts > 0 {
|
if bar.boosts > 0 {
|
||||||
NavigationLink(destination: RepostsView(damus_state: state, model: RepostsModel(state: state, target: target))) {
|
NavigationLink(destination: RepostsView(damus_state: state, model: RepostsModel(state: state, target: target))) {
|
||||||
let noun = Text(verbatim: "\(repostsCountString(bar.boosts))").foregroundColor(.gray)
|
let noun = Text(verbatim: repostsCountString(bar.boosts)).foregroundColor(.gray)
|
||||||
Text("\(Text("\(bar.boosts)").font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.")
|
Text("\(Text(verbatim: bar.boosts.formatted()).font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.")
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
}
|
}
|
||||||
|
|
||||||
if bar.likes > 0 && !state.settings.onlyzaps_mode {
|
if bar.likes > 0 && !state.settings.onlyzaps_mode {
|
||||||
NavigationLink(destination: ReactionsView(damus_state: state, model: ReactionsModel(state: state, target: target))) {
|
NavigationLink(destination: ReactionsView(damus_state: state, model: ReactionsModel(state: state, target: target))) {
|
||||||
let noun = Text(verbatim: "\(reactionsCountString(bar.likes))").foregroundColor(.gray)
|
let noun = Text(verbatim: reactionsCountString(bar.likes)).foregroundColor(.gray)
|
||||||
Text("\(Text("\(bar.likes)").font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.")
|
Text("\(Text(verbatim: bar.likes.formatted()).font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.")
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
}
|
}
|
||||||
@@ -43,8 +43,8 @@ struct EventDetailBar: View {
|
|||||||
if bar.zaps > 0 {
|
if bar.zaps > 0 {
|
||||||
let dst = ZapsView(state: state, target: .note(id: target, author: target_pk))
|
let dst = ZapsView(state: state, target: .note(id: target, author: target_pk))
|
||||||
NavigationLink(destination: dst) {
|
NavigationLink(destination: dst) {
|
||||||
let noun = Text(verbatim: "\(zapsCountString(bar.zaps))").foregroundColor(.gray)
|
let noun = Text(verbatim: zapsCountString(bar.zaps)).foregroundColor(.gray)
|
||||||
Text("\(Text("\(bar.zaps)").font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.")
|
Text("\(Text(verbatim: bar.zaps.formatted()).font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.")
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ struct EventGroupView: View {
|
|||||||
return VStack(alignment: .center) {
|
return VStack(alignment: .center) {
|
||||||
Image(systemName: "bolt.fill")
|
Image(systemName: "bolt.fill")
|
||||||
.foregroundColor(.orange)
|
.foregroundColor(.orange)
|
||||||
Text("\(fmt)")
|
Text(verbatim: fmt)
|
||||||
.foregroundColor(Color.orange)
|
.foregroundColor(Color.orange)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -362,8 +362,8 @@ struct ProfileView: View {
|
|||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
} else {
|
} else {
|
||||||
let followerCount = followers.count!
|
let followerCount = followers.count!
|
||||||
let noun_text = Text(verbatim: "\(followersCountString(followerCount))").font(.subheadline).foregroundColor(.gray)
|
let noun_text = Text(verbatim: followersCountString(followerCount)).font(.subheadline).foregroundColor(.gray)
|
||||||
Text("\(Text("\(followerCount)").font(.subheadline.weight(.medium))) \(noun_text)", comment: "Sentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Follower' or 'Followers'.")
|
Text("\(Text(verbatim: followerCount.formatted()).font(.subheadline.weight(.medium))) \(noun_text)", comment: "Sentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Follower' or 'Followers'.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -388,7 +388,7 @@ struct ProfileView: View {
|
|||||||
NavigationLink(destination: FollowingView(damus_state: damus_state, following: following_model, whos: profile.pubkey)) {
|
NavigationLink(destination: FollowingView(damus_state: damus_state, following: following_model, whos: profile.pubkey)) {
|
||||||
HStack {
|
HStack {
|
||||||
let noun_text = Text(verbatim: "\(followingCountString(profile.following))").font(.subheadline).foregroundColor(.gray)
|
let noun_text = Text(verbatim: "\(followingCountString(profile.following))").font(.subheadline).foregroundColor(.gray)
|
||||||
Text("\(Text("\(profile.following)").font(.subheadline.weight(.medium))) \(noun_text)", comment: "Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.")
|
Text("\(Text(verbatim: profile.following.formatted()).font(.subheadline.weight(.medium))) \(noun_text)", comment: "Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
@@ -411,8 +411,8 @@ struct ProfileView: View {
|
|||||||
|
|
||||||
if let relays = profile.relays {
|
if let relays = profile.relays {
|
||||||
// Only open relay config view if the user is logged in with private key and they are looking at their own profile.
|
// Only open relay config view if the user is logged in with private key and they are looking at their own profile.
|
||||||
let noun_text = Text(verbatim: "\(relaysCountString(relays.keys.count))").font(.subheadline).foregroundColor(.gray)
|
let noun_text = Text(verbatim: relaysCountString(relays.keys.count)).font(.subheadline).foregroundColor(.gray)
|
||||||
let relay_text = Text("\(Text("\(relays.keys.count)").font(.subheadline.weight(.medium))) \(noun_text)", comment: "Sentence composed of 2 variables to describe how many relay servers a user is connected. In source English, the first variable is the number of relay servers, and the second variable is 'Relay' or 'Relays'.")
|
let relay_text = Text("\(Text(verbatim: relays.keys.count.formatted()).font(.subheadline.weight(.medium))) \(noun_text)", comment: "Sentence composed of 2 variables to describe how many relay servers a user is connected. In source English, the first variable is the number of relay servers, and the second variable is 'Relay' or 'Relays'.")
|
||||||
if profile.pubkey == damus_state.pubkey && damus_state.is_privkey_user {
|
if profile.pubkey == damus_state.pubkey && damus_state.is_privkey_user {
|
||||||
NavigationLink(destination: RelayConfigView(state: damus_state)) {
|
NavigationLink(destination: RelayConfigView(state: damus_state)) {
|
||||||
relay_text
|
relay_text
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ struct PubkeyView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
let color: Color = id_to_color(pubkey)
|
let color: Color = id_to_color(pubkey)
|
||||||
ZStack {
|
ZStack {
|
||||||
Text(verbatim: "\(abbrev_pubkey(pubkey))")
|
Text(verbatim: abbrev_pubkey(pubkey))
|
||||||
.foregroundColor(color)
|
.foregroundColor(color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<trans-unit id="%@" xml:space="preserve">
|
<trans-unit id="%@" xml:space="preserve">
|
||||||
<source>%@</source>
|
<source>%@</source>
|
||||||
<target>%@</target>
|
<target>%@</target>
|
||||||
<note>DM by heading in local notification</note>
|
<note>No comment provided by engineer.</note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="%@ %@" xml:space="preserve">
|
<trans-unit id="%@ %@" xml:space="preserve">
|
||||||
<source>%@ %@</source>
|
<source>%@ %@</source>
|
||||||
@@ -63,6 +63,11 @@ Sentence composed of 2 variables to describe how many people are following a use
|
|||||||
<target>%@ not found</target>
|
<target>%@ not found</target>
|
||||||
<note>When a note or profile is not found when searching for it via its note id</note>
|
<note>When a note or profile is not found when searching for it via its note id</note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="%@ reacted with %@" xml:space="preserve">
|
||||||
|
<source>%1$@ reacted with %2$@</source>
|
||||||
|
<target>%1$@ reacted with %2$@</target>
|
||||||
|
<note>Reacted by heading in local notification</note>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
|
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
|
||||||
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
|
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
|
||||||
<target>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</target>
|
<target>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</target>
|
||||||
@@ -78,11 +83,6 @@ Sentence composed of 2 variables to describe how many people are following a use
|
|||||||
<target>%@. Tip your friend's posts and stack sats with Bitcoin⚡️, the native currency of the internet.</target>
|
<target>%@. Tip your friend's posts and stack sats with Bitcoin⚡️, the native currency of the internet.</target>
|
||||||
<note>Explanation of what can be done by users to earn money. There is a heading that precedes this explanation which is a variable to this string.</note>
|
<note>Explanation of what can be done by users to earn money. There is a heading that precedes this explanation which is a variable to this string.</note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="%lld" xml:space="preserve">
|
|
||||||
<source>%lld</source>
|
|
||||||
<target>%lld</target>
|
|
||||||
<note>No comment provided by engineer.</note>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="%lld/%lld" xml:space="preserve">
|
<trans-unit id="%lld/%lld" xml:space="preserve">
|
||||||
<source>%lld/%lld</source>
|
<source>%lld/%lld</source>
|
||||||
<target>%lld/%lld</target>
|
<target>%lld/%lld</target>
|
||||||
@@ -983,11 +983,6 @@ Button text to indicate that the zap type is a private zap.</note>
|
|||||||
<target>Quote</target>
|
<target>Quote</target>
|
||||||
<note>Button to compose a quoted note</note>
|
<note>Button to compose a quoted note</note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="Reacted by %@" xml:space="preserve">
|
|
||||||
<source>Reacted by %@</source>
|
|
||||||
<target>Reacted by %@</target>
|
|
||||||
<note>Reacted by heading in local notification</note>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="Reactions" xml:space="preserve">
|
<trans-unit id="Reactions" xml:space="preserve">
|
||||||
<source>Reactions</source>
|
<source>Reactions</source>
|
||||||
<target>Reactions</target>
|
<target>Reactions</target>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user