move action names out of undo.ftl into actions.ftl

This commit is contained in:
Damien Elmes 2021-05-08 17:11:54 +10:00
parent 4be5d08559
commit e9e1edc64d
3 changed files with 31 additions and 34 deletions

View file

@ -37,3 +37,18 @@ actions-shortcut-key = Shortcut key: { $val }
actions-suspend-card = Suspend Card
actions-set-due-date = Set Due Date
actions-forget = Forget
actions-answer-card = Answer Card
actions-unbury-unsuspend = Unbury/Unsuspend
actions-add-deck = Add Deck
actions-add-note = Add Note
actions-update-tag = Update Tag
actions-update-note = Update Note
actions-update-card = Update Card
actions-update-deck = Update Deck
actions-forget-card = Forget Card
actions-set-flag = Set Flag
actions-build-filtered-deck = Build Deck
actions-expand-collapse = Expand/Collapse
actions-add-notetype = Add Notetype
actions-remove-notetype = Remove Notetype
actions-update-notetype = Update Notetype

View file

@ -9,21 +9,3 @@ undo-undo-action = Undo { $val }
undo-action-undone = { $action } undone
undo-redo-action = Redo { $action }
undo-action-redone = { $action } redone
## Action that can be undone
undo-answer-card = Answer Card
undo-unbury-unsuspend = Unbury/Unsuspend
undo-add-deck = Add Deck
undo-add-note = Add Note
undo-update-tag = Update Tag
undo-update-note = Update Note
undo-update-card = Update Card
undo-update-deck = Update Deck
undo-forget-card = Forget Card
undo-set-flag = Set Flag
undo-build-filtered-deck = Build Deck
undo-expand-collapse = Expand/Collapse
undo-add-notetype = Add Notetype
undo-remove-notetype = Remove Notetype
undo-update-notetype = Update Notetype

View file

@ -45,24 +45,24 @@ pub enum Op {
impl Op {
pub fn describe(&self, tr: &I18n) -> String {
match self {
Op::AddDeck => tr.undo_add_deck(),
Op::AddNote => tr.undo_add_note(),
Op::AnswerCard => tr.undo_answer_card(),
Op::AddDeck => tr.actions_add_deck(),
Op::AddNote => tr.actions_add_note(),
Op::AnswerCard => tr.actions_answer_card(),
Op::Bury => tr.studying_bury(),
Op::RemoveDeck => tr.decks_delete_deck(),
Op::RemoveNote => tr.studying_delete_note(),
Op::RenameDeck => tr.actions_rename_deck(),
Op::ScheduleAsNew => tr.undo_forget_card(),
Op::ScheduleAsNew => tr.actions_forget_card(),
Op::SetDueDate => tr.actions_set_due_date(),
Op::Suspend => tr.studying_suspend(),
Op::UnburyUnsuspend => tr.undo_unbury_unsuspend(),
Op::UpdateCard => tr.undo_update_card(),
Op::UpdateDeck => tr.undo_update_deck(),
Op::UpdateNote => tr.undo_update_note(),
Op::UnburyUnsuspend => tr.actions_unbury_unsuspend(),
Op::UpdateCard => tr.actions_update_card(),
Op::UpdateDeck => tr.actions_update_deck(),
Op::UpdateNote => tr.actions_update_note(),
Op::UpdatePreferences => tr.preferences_preferences(),
Op::UpdateTag => tr.undo_update_tag(),
Op::UpdateTag => tr.actions_update_tag(),
Op::SetCardDeck => tr.browsing_change_deck(),
Op::SetFlag => tr.undo_set_flag(),
Op::SetFlag => tr.actions_set_flag(),
Op::FindAndReplace => tr.browsing_find_and_replace(),
Op::ClearUnusedTags => tr.browsing_clear_unused_tags(),
Op::SortCards => tr.browsing_reschedule(),
@ -70,15 +70,15 @@ impl Op {
Op::RemoveTag => tr.actions_remove_tag(),
Op::ReparentTag => tr.actions_rename_tag(),
Op::ReparentDeck => tr.actions_rename_deck(),
Op::BuildFilteredDeck => tr.undo_build_filtered_deck(),
Op::RebuildFilteredDeck => tr.undo_build_filtered_deck(),
Op::BuildFilteredDeck => tr.actions_build_filtered_deck(),
Op::RebuildFilteredDeck => tr.actions_build_filtered_deck(),
Op::EmptyFilteredDeck => tr.studying_empty(),
Op::ExpandCollapse => tr.undo_expand_collapse(),
Op::ExpandCollapse => tr.actions_expand_collapse(),
Op::SetCurrentDeck => tr.browsing_change_deck(),
Op::UpdateDeckConfig => tr.deck_config_title(),
Op::AddNotetype => tr.undo_add_notetype(),
Op::RemoveNotetype => tr.undo_remove_notetype(),
Op::UpdateNotetype => tr.undo_update_notetype(),
Op::AddNotetype => tr.actions_add_notetype(),
Op::RemoveNotetype => tr.actions_remove_notetype(),
Op::UpdateNotetype => tr.actions_update_notetype(),
Op::Custom(name) => name.into(),
}
.into()