Add label to “Add Option” button

This commit is contained in:
Jed Fox 2023-02-07 16:56:49 -05:00
parent 7d8c40218c
commit 5637056790
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1
4 changed files with 8 additions and 4 deletions

View File

@ -471,6 +471,7 @@
"option_number": "Option %ld",
"the_poll_is_invalid": "The poll is invalid",
"the_poll_has_empty_option": "The poll has empty option",
"add_option": "Add Option",
"remove_option": "Remove Option",
"move_up": "Move Up",
"move_down": "Move Down"

View File

@ -593,6 +593,8 @@ public enum L10n {
public static let photoLibrary = L10n.tr("Localizable", "Scene.Compose.MediaSelection.PhotoLibrary", fallback: "Photo Library")
}
public enum Poll {
/// Add Option
public static let addOption = L10n.tr("Localizable", "Scene.Compose.Poll.AddOption", fallback: "Add Option")
/// Duration: %@
public static func durationTime(_ p1: Any) -> String {
return L10n.tr("Localizable", "Scene.Compose.Poll.DurationTime", String(describing: p1), fallback: "Duration: %@")

View File

@ -211,6 +211,7 @@ uploaded to Mastodon.";
"Scene.Compose.MediaSelection.Browse" = "Browse";
"Scene.Compose.MediaSelection.Camera" = "Take Photo";
"Scene.Compose.MediaSelection.PhotoLibrary" = "Photo Library";
"Scene.Compose.Poll.AddOption" = "Add Option";
"Scene.Compose.Poll.DurationTime" = "Duration: %@";
"Scene.Compose.Poll.MoveDown" = "Move Down";
"Scene.Compose.Poll.MoveUp" = "Move Up";

View File

@ -200,10 +200,10 @@ extension ComposeContentView {
}
}
if viewModel.maxPollOptionLimit != viewModel.pollOptions.count {
PollAddOptionRow()
.onTapGesture {
viewModel.createNewPollOptionIfCould()
}
Button(action: viewModel.createNewPollOptionIfCould) {
PollAddOptionRow()
.accessibilityLabel(L10n.Scene.Compose.Poll.addOption)
}
}
Menu {
Picker(selection: $viewModel.pollExpireConfigurationOption) {