From cff8069ef956d337d5ad343a1b05808422e40e79 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 4 Jun 2021 15:03:17 +1000 Subject: [PATCH] remove 'flag ' prefix from flag names --- ftl/core/actions.ftl | 20 ++++++++++++-------- qt/aqt/flags.py | 14 +++++++------- qt/aqt/forms/browser.ui | 14 +++++++------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/ftl/core/actions.ftl b/ftl/core/actions.ftl index b6d04bfc0..97e238b1e 100644 --- a/ftl/core/actions.ftl +++ b/ftl/core/actions.ftl @@ -42,17 +42,21 @@ 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 actions-update-config = Update Config -actions-red-flag = Red Flag -actions-orange-flag = Orange Flag -actions-green-flag = Green Flag -actions-blue-flag = Blue Flag -actions-pink-flag = Pink Flag -actions-turquoise-flag = Turquoise Flag -actions-purple-flag = Purple Flag + +## Flags + +actions-flag-number = Flag { $number } +actions-flag-red = Red +actions-flag-orange = Orange +actions-flag-green = Green +actions-flag-blue = Blue +actions-flag-pink = Pink +actions-flag-turquoise = Turquoise +actions-flag-purple = Purple +actions-set-flag = Set Flag diff --git a/qt/aqt/flags.py b/qt/aqt/flags.py index af01570d4..3d1780a13 100644 --- a/qt/aqt/flags.py +++ b/qt/aqt/flags.py @@ -39,49 +39,49 @@ def load_flags(col: Collection) -> List[Flag]: return [ Flag( 1, - labels["1"] if "1" in labels else tr.actions_red_flag(), + labels["1"] if "1" in labels else tr.actions_flag_red(), icon.with_color(colors.FLAG1_FG), SearchNode(flag=SearchNode.FLAG_RED), "actionRed_Flag", ), Flag( 2, - labels["2"] if "2" in labels else tr.actions_orange_flag(), + labels["2"] if "2" in labels else tr.actions_flag_orange(), icon.with_color(colors.FLAG2_FG), SearchNode(flag=SearchNode.FLAG_ORANGE), "actionOrange_Flag", ), Flag( 3, - labels["3"] if "3" in labels else tr.actions_green_flag(), + labels["3"] if "3" in labels else tr.actions_flag_green(), icon.with_color(colors.FLAG3_FG), SearchNode(flag=SearchNode.FLAG_GREEN), "actionGreen_Flag", ), Flag( 4, - labels["4"] if "4" in labels else tr.actions_blue_flag(), + labels["4"] if "4" in labels else tr.actions_flag_blue(), icon.with_color(colors.FLAG4_FG), SearchNode(flag=SearchNode.FLAG_BLUE), "actionBlue_Flag", ), Flag( 5, - labels["5"] if "5" in labels else tr.actions_pink_flag(), + labels["5"] if "5" in labels else tr.actions_flag_pink(), icon.with_color(colors.FLAG5_FG), SearchNode(flag=SearchNode.FLAG_PINK), "actionPink_Flag", ), Flag( 6, - labels["6"] if "6" in labels else tr.actions_turquoise_flag(), + labels["6"] if "6" in labels else tr.actions_flag_turquoise(), icon.with_color(colors.FLAG6_FG), SearchNode(flag=SearchNode.FLAG_TURQUOISE), "actionTurquoise_Flag", ), Flag( 7, - labels["7"] if "7" in labels else tr.actions_purple_flag(), + labels["7"] if "7" in labels else tr.actions_flag_purple(), icon.with_color(colors.FLAG7_FG), SearchNode(flag=SearchNode.FLAG_PURPLE), "actionPurple_Flag", diff --git a/qt/aqt/forms/browser.ui b/qt/aqt/forms/browser.ui index eda2155e6..d5f29ffff 100644 --- a/qt/aqt/forms/browser.ui +++ b/qt/aqt/forms/browser.ui @@ -512,7 +512,7 @@ true - actions_red_flag + actions_flag_red Ctrl+1 @@ -523,7 +523,7 @@ true - actions_orange_flag + actions_flag_orange Ctrl+2 @@ -534,7 +534,7 @@ true - actions_green_flag + actions_flag_green Ctrl+3 @@ -545,7 +545,7 @@ true - actions_blue_flag + actions_flag_blue Ctrl+4 @@ -630,7 +630,7 @@ true - actions_pink_flag + actions_flag_pink Ctrl+5 @@ -641,7 +641,7 @@ true - actions_turquoise_flag + actions_flag_turquoise Ctrl+6 @@ -652,7 +652,7 @@ true - actions_purple_flag + actions_flag_purple Ctrl+7