Skip to content

Commit a18e59a

Browse files
committed
Use reverse-DNS key in share extension editor attachment actions
1 parent b6cd1d6 commit a18e59a

File tree

1 file changed

+31
-15
lines changed

1 file changed

+31
-15
lines changed

WordPress/WordPressShareExtension/ShareExtensionEditorViewController.swift

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -944,23 +944,39 @@ extension ShareExtensionEditorViewController {
944944

945945
func displayActions(forAttachment attachment: MediaAttachment, position: CGPoint) {
946946
let mediaID = attachment.identifier
947-
let title: String = AppLocalizedString("Media Options", comment: "Title for action sheet with media options.")
947+
let title: String = AppLocalizedString(
948+
"shareExtension.editor.attachmentActions.title",
949+
value: "Media Options",
950+
comment: "Title for action sheet with media options."
951+
)
948952
let alertController = UIAlertController(title: title, message: nil, preferredStyle: .actionSheet)
949-
alertController.addActionWithTitle(AppLocalizedString("Dismiss", comment: "User action to dismiss media options."),
950-
style: .cancel,
951-
handler: { (action) in
952-
if attachment == self.currentSelectedAttachment {
953-
self.currentSelectedAttachment = nil
954-
self.resetMediaAttachmentOverlay(attachment)
955-
self.richTextView.refresh(attachment)
956-
}
957-
})
953+
alertController.addActionWithTitle(
954+
AppLocalizedString(
955+
"shareExtension.editor.attachmentActions.dismiss",
956+
value: "Dismiss",
957+
comment: "User action to dismiss media options."
958+
),
959+
style: .cancel,
960+
handler: { (action) in
961+
if attachment == self.currentSelectedAttachment {
962+
self.currentSelectedAttachment = nil
963+
self.resetMediaAttachmentOverlay(attachment)
964+
self.richTextView.refresh(attachment)
965+
}
966+
}
967+
)
958968
if attachment is ImageAttachment {
959-
alertController.addActionWithTitle(AppLocalizedString("Remove", comment: "User action to remove media."),
960-
style: .destructive,
961-
handler: { (action) in
962-
self.richTextView.remove(attachmentID: mediaID)
963-
})
969+
alertController.addActionWithTitle(
970+
AppLocalizedString(
971+
"shareExtension.editor.attachmentActions.remove",
972+
value: "Remove",
973+
comment: "User action to remove media."
974+
),
975+
style: .destructive,
976+
handler: { (action) in
977+
self.richTextView.remove(attachmentID: mediaID)
978+
}
979+
)
964980
}
965981

966982
alertController.title = title

0 commit comments

Comments
 (0)