Skip to content

Commit

Permalink
hints for Shortcut extract
Browse files Browse the repository at this point in the history
  • Loading branch information
stoecker committed Apr 28, 2023
1 parent c329ad3 commit aca2686
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class IgnoreAction extends JosmAction {
*/
public IgnoreAction(IgnoreType type) {
super(tr(type.getButtonText()), "dialogs/fix", tr(type.getButtonText()),
Shortcut.registerShortcut("maproulette:ignore." + type.name().toLowerCase(Locale.ROOT),
Shortcut.registerShortcut(/* NO-SHORTCUT */ "maproulette:ignore." + type.name().toLowerCase(Locale.ROOT),
tr("MapRoulette: {0}", tr(type.getButtonText())), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false);
this.type = type;
Expand Down Expand Up @@ -67,7 +67,10 @@ public void actionPerformed(ActionEvent e) {
* The ignore type
*/
public enum IgnoreType {
IGNORE_TASK(marktr("Ignore Task")), IGNORE_CHALLENGE(marktr("Ignore Challenge"));
/* SHORTCUT("maproulette:ignore.task", "MapRoulette: Ignore Task", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
IGNORE_TASK(marktr("Ignore Task")),
/* SHORTCUT("maproulette:ignore.challenge", "MapRoulette: Ignore Challenge", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
IGNORE_CHALLENGE(marktr("Ignore Challenge"));

private final String buttonText;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ public enum TaskStatus {
public String description() {
return switch (this) {
case CREATED -> tr("Created");
/* SHORTCUT("maproulette:fixed", "MapRoulette: Fixed", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
case FIXED -> tr("Fixed");
case DELETED -> tr("Deleted");
/* SHORTCUT("maproulette:skipped", "MapRoulette: Skipped", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
case SKIPPED -> tr("Skipped");
case ANSWERED -> tr("Answered");
case DISABLED -> tr("Disabled");
/* SHORTCUT("maproulette:too_hard", "MapRoulette: Too Hard / Cannot see", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
case TOO_HARD -> tr("Too Hard / Cannot see");
case VALIDATED -> tr("Validated");
/* SHORTCUT("maproulette:already_fixed", "MapRoulette: Mark Task as Already Fixed / Not an Issue", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
case ALREADY_FIXED -> tr("Already Fixed / Not an Issue");
/* SHORTCUT("maproulette:false_positive", "MapRoulette: Mark Task as False Positive", KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) */
case FALSE_POSITIVE -> tr("False Positive");
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class TaskStatusAction extends CurrentTaskPanel.InnerAction {
TaskStatusAction(TaskStatus status, Supplier<Task> currentTaskProvider,
Supplier<HTMLDocument> currentDocumentProvider) {
super(status.description(), getIconName(status), status.description(),
Shortcut.registerShortcut("maproulette:" + status.name().toLowerCase(Locale.ENGLISH),
Shortcut.registerShortcut(/* NO-SHORTCUT */ "maproulette:" + status.name().toLowerCase(Locale.ENGLISH),
tr("MapRoulette: Mark Task as {0}", status.description()), KeyEvent.CHAR_UNDEFINED,
Shortcut.NONE),
false);
Expand Down

0 comments on commit aca2686

Please sign in to comment.