Added a "Continues a thread" label to status rows (#1704)

This commit is contained in:
Thomas Durand 2023-12-03 13:54:57 +01:00 committed by GitHub
parent 56360ae821
commit ad2adadf87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 167 additions and 40 deletions

View file

@ -65749,6 +65749,125 @@
} }
} }
}, },
"status.row.is-thread" : {
"extractionState" : "manual",
"localizations" : {
"be" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"ca" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"de" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Continues a thread"
}
},
"en-GB" : {
"stringUnit" : {
"state" : "translated",
"value" : "Continues a thread"
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Complète un fil"
}
},
"it" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"ja" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"ko" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"nb" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"nl" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"pl" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"pt-BR" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"tr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"uk" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Continues a thread"
}
}
}
},
"status.row.was-boosted" : { "status.row.was-boosted" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@ -65868,121 +65987,121 @@
} }
} }
}, },
"status.row.was-reply" : { "status.row.was-reply %@" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
"be" : { "be" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Адказаў" "value" : "Адказаў %@"
} }
}, },
"ca" : { "ca" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Ha respost a" "value" : "Ha respost a %@"
} }
}, },
"de" : { "de" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Antwort auf" "value" : "Antwort auf %@"
} }
}, },
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Replied to" "value" : "Replied to %@"
} }
}, },
"en-GB" : { "en-GB" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Replied to" "value" : "Replied to %@"
} }
}, },
"es" : { "es" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Respuesta a" "value" : "Respuesta a %@"
} }
}, },
"eu" : { "eu" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Honi erantzunez:" "value" : "Honi erantzunez: %@"
} }
}, },
"fr" : { "fr" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Répondu à" "value" : "Répondu à %@"
} }
}, },
"it" : { "it" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Risposta per" "value" : "Risposta per %@"
} }
}, },
"ja" : { "ja" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "返信" "value" : "返信 %@"
} }
}, },
"ko" : { "ko" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "답글:" "value" : "답글: %@"
} }
}, },
"nb" : { "nb" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Svar til" "value" : "Svar til %@"
} }
}, },
"nl" : { "nl" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Geantwoord op" "value" : "Geantwoord op %@"
} }
}, },
"pl" : { "pl" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Odpowiedział(a) do" "value" : "Odpowiedział(a) do %@"
} }
}, },
"pt-BR" : { "pt-BR" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Respondeu a" "value" : "Respondeu a %@"
} }
}, },
"tr" : { "tr" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Şuna cevap verildi" "value" : "Şuna cevap verildi %@"
} }
}, },
"uk" : { "uk" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Відповідь для" "value" : "Відповідь для %@"
} }
}, },
"zh-Hans" : { "zh-Hans" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "回复给" "value" : "回复给 %@"
} }
}, },
"zh-Hant" : { "zh-Hant" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "回覆給" "value" : "回覆給 %@"
} }
} }
} }
@ -71601,4 +71720,4 @@
} }
}, },
"version" : "1.0" "version" : "1.0"
} }

View file

@ -5,26 +5,34 @@ struct StatusRowReplyView: View {
let viewModel: StatusRowViewModel let viewModel: StatusRowViewModel
var body: some View { var body: some View {
if let accountId = viewModel.status.inReplyToAccountId, Group {
let mention = viewModel.status.mentions.first(where: { $0.id == accountId }) if let accountId = viewModel.status.inReplyToAccountId {
{ if let mention = viewModel.status.mentions.first(where: { $0.id == accountId }) {
HStack(spacing: 2) { HStack(spacing: 2) {
Image(systemName: "arrowshape.turn.up.left.fill") Image(systemName: "arrowshape.turn.up.left.fill")
Text("status.row.was-reply") Text("status.row.was-reply \(mention.username)")
Text(mention.username) }
} .accessibilityElement(children: .combine)
.accessibilityElement(children: .combine) .accessibilityLabel(
.accessibilityLabel( Text("status.row.was-reply \(mention.username)")
Text("status.row.was-reply") )
+ Text(" ") .onTapGesture {
+ Text(mention.username) viewModel.navigateToMention(mention: mention)
) }
.font(.scaledFootnote) } else if viewModel.isThread && accountId == viewModel.status.account.id {
.foregroundColor(.gray) HStack(spacing: 2) {
.fontWeight(.semibold) Image(systemName: "quote.opening")
.onTapGesture { Text("status.row.is-thread")
viewModel.navigateToMention(mention: mention) }
.accessibilityElement(children: .combine)
.accessibilityLabel(
Text("status.row.is-thread")
)
}
} }
} }
.font(.scaledFootnote)
.foregroundColor(.gray)
.fontWeight(.semibold)
} }
} }