recent -> today

'Current deck' has moved, and by removing 'due tomorrow', we can drop
the 'today' suffix on the rest of the items.

The keys of the existing translations have not been changed, so
existing translations will not break, but will need to be manually
updated to make them shorter.
This commit is contained in:
Damien Elmes 2021-02-09 09:50:59 +10:00
parent 13aa6f99e4
commit 180efbc578
4 changed files with 23 additions and 31 deletions

View File

@ -1,10 +1,7 @@
browsing-add-notes = Add Notes... browsing-add-notes = Add Notes...
browsing-add-tags = Add Tags browsing-add-tags = Add Tags
browsing-add-tags2 = Add Tags... browsing-add-tags2 = Add Tags...
browsing-added-today = Added Today
browsing-addon = Add-on browsing-addon = Add-on
browsing-again-today = Again Today
browsing-edited-today = Edited Today
browsing-all-card-types = All Card Types browsing-all-card-types = All Card Types
browsing-all-fields = All Fields browsing-all-fields = All Fields
browsing-answer = Answer browsing-answer = Answer
@ -91,12 +88,10 @@ browsing-sort-field = Sort Field
browsing-sorting-on-this-column-is-not = Sorting on this column is not supported. Please choose another. browsing-sorting-on-this-column-is-not = Sorting on this column is not supported. Please choose another.
browsing-start-position = Start position: browsing-start-position = Start position:
browsing-step = Step: browsing-step = Step:
browsing-studied-today = Studied Today
browsing-suspended = Suspended browsing-suspended = Suspended
browsing-tag-duplicates = Tag Duplicates browsing-tag-duplicates = Tag Duplicates
browsing-tag-rename-warning-empty = You can't rename a tag that has no notes. browsing-tag-rename-warning-empty = You can't rename a tag that has no notes.
browsing-target-field = Target field: browsing-target-field = Target field:
browsing-today = Today
browsing-toggle-mark = Toggle Mark browsing-toggle-mark = Toggle Mark
browsing-toggle-suspend = Toggle Suspend browsing-toggle-suspend = Toggle Suspend
browsing-treat-input-as-regular-expression = Treat input as regular expression browsing-treat-input-as-regular-expression = Treat input as regular expression
@ -127,6 +122,9 @@ browsing-sidebar-saved-searches = Saved Searches
browsing-sidebar-save-current-search = Save Current Search browsing-sidebar-save-current-search = Save Current Search
browsing-sidebar-card-state = Card State browsing-sidebar-card-state = Card State
browsing-sidebar-flags = Flags browsing-sidebar-flags = Flags
browsing-sidebar-recent = Recent browsing-today = Today
browsing-sidebar-due-today = Due Today browsing-studied-today = Studied
browsing-sidebar-due-tomorrow = Due Tomorrow browsing-added-today = Added
browsing-again-today = Again
browsing-edited-today = Edited
browsing-sidebar-due-today = Due

View File

@ -34,8 +34,8 @@ class SidebarItemType(Enum):
ROOT = auto() ROOT = auto()
SAVED_SEARCH_ROOT = auto() SAVED_SEARCH_ROOT = auto()
SAVED_SEARCH = auto() SAVED_SEARCH = auto()
RECENT_ROOT = auto() TODAY_ROOT = auto()
RECENT = auto() TODAY = auto()
CARD_STATE_ROOT = auto() CARD_STATE_ROOT = auto()
CARD_STATE = auto() CARD_STATE = auto()
FLAG_ROOT = auto() FLAG_ROOT = auto()
@ -61,7 +61,7 @@ class SidebarItemType(Enum):
class SidebarStage(Enum): class SidebarStage(Enum):
ROOT = auto() ROOT = auto()
SAVED_SEARCHES = auto() SAVED_SEARCHES = auto()
RECENT = auto() TODAY = auto()
SCHEDULING = auto() SCHEDULING = auto()
FLAGS = auto() FLAGS = auto()
DECKS = auto() DECKS = auto()
@ -517,8 +517,8 @@ class SidebarTreeView(QTreeView):
self._saved_searches_tree(root) self._saved_searches_tree(root)
elif stage is SidebarStage.SCHEDULING: elif stage is SidebarStage.SCHEDULING:
self._card_state_tree(root) self._card_state_tree(root)
elif stage is SidebarStage.RECENT: elif stage is SidebarStage.TODAY:
self._recent_tree(root) self._today_tree(root)
elif stage is SidebarStage.FLAGS: elif stage is SidebarStage.FLAGS:
self._flags_tree(root) self._flags_tree(root)
elif stage is SidebarStage.DECKS: elif stage is SidebarStage.DECKS:
@ -587,19 +587,19 @@ class SidebarTreeView(QTreeView):
) )
root.add_child(item) root.add_child(item)
# Tree: Recent # Tree: Today
########################### ###########################
def _recent_tree(self, root: SidebarItem) -> None: def _today_tree(self, root: SidebarItem) -> None:
icon = ":/icons/clock.svg" icon = ":/icons/clock.svg"
root = self._section_root( root = self._section_root(
root=root, root=root,
name=TR.BROWSING_SIDEBAR_RECENT, name=TR.BROWSING_TODAY,
icon=icon, icon=icon,
collapse_key=Config.Bool.COLLAPSE_RECENT, collapse_key=Config.Bool.COLLAPSE_TODAY,
type=SidebarItemType.RECENT_ROOT, type=SidebarItemType.TODAY_ROOT,
) )
type = SidebarItemType.RECENT type = SidebarItemType.TODAY
search = self._filter_func search = self._filter_func
root.add_simple( root.add_simple(
@ -636,12 +636,6 @@ class SidebarTreeView(QTreeView):
) )
), ),
) )
root.add_simple(
name=TR.BROWSING_SIDEBAR_DUE_TOMORROW,
icon=icon,
type=type,
on_click=search(SearchTerm(due_in_days=1)),
)
# Tree: Card State # Tree: Card State
########################### ###########################

View File

@ -1220,7 +1220,7 @@ message Config {
COLLAPSE_NOTETYPES = 3; COLLAPSE_NOTETYPES = 3;
COLLAPSE_DECKS = 4; COLLAPSE_DECKS = 4;
COLLAPSE_SAVED_SEARCHES = 5; COLLAPSE_SAVED_SEARCHES = 5;
COLLAPSE_RECENT = 6; COLLAPSE_TODAY = 6;
COLLAPSE_CARD_STATE = 7; COLLAPSE_CARD_STATE = 7;
COLLAPSE_FLAGS = 8; COLLAPSE_FLAGS = 8;
} }

View File

@ -47,9 +47,9 @@ pub(crate) enum ConfigKey {
CollapseDecks, CollapseDecks,
CollapseFlags, CollapseFlags,
CollapseNotetypes, CollapseNotetypes,
CollapseRecent,
CollapseSavedSearches, CollapseSavedSearches,
CollapseTags, CollapseTags,
CollapseToday,
CreationOffset, CreationOffset,
CurrentDeckID, CurrentDeckID,
CurrentNoteTypeID, CurrentNoteTypeID,
@ -84,13 +84,13 @@ impl From<ConfigKey> for &'static str {
ConfigKey::BrowserSortKind => "sortType", ConfigKey::BrowserSortKind => "sortType",
ConfigKey::BrowserSortReverse => "sortBackwards", ConfigKey::BrowserSortReverse => "sortBackwards",
ConfigKey::CardCountsSeparateInactive => "cardCountsSeparateInactive", ConfigKey::CardCountsSeparateInactive => "cardCountsSeparateInactive",
ConfigKey::CollapseRecent => "collapseRecent",
ConfigKey::CollapseCardState => "collapseCardState", ConfigKey::CollapseCardState => "collapseCardState",
ConfigKey::CollapseFlags => "collapseFlags",
ConfigKey::CollapseDecks => "collapseDecks", ConfigKey::CollapseDecks => "collapseDecks",
ConfigKey::CollapseSavedSearches => "collapseSavedSearches", ConfigKey::CollapseFlags => "collapseFlags",
ConfigKey::CollapseNotetypes => "collapseNotetypes", ConfigKey::CollapseNotetypes => "collapseNotetypes",
ConfigKey::CollapseSavedSearches => "collapseSavedSearches",
ConfigKey::CollapseTags => "collapseTags", ConfigKey::CollapseTags => "collapseTags",
ConfigKey::CollapseToday => "collapseToday",
ConfigKey::CreationOffset => "creationOffset", ConfigKey::CreationOffset => "creationOffset",
ConfigKey::CurrentDeckID => "curDeck", ConfigKey::CurrentDeckID => "curDeck",
ConfigKey::CurrentNoteTypeID => "curModel", ConfigKey::CurrentNoteTypeID => "curModel",
@ -122,9 +122,9 @@ impl From<BoolKey> for ConfigKey {
BoolKey::CollapseDecks => ConfigKey::CollapseDecks, BoolKey::CollapseDecks => ConfigKey::CollapseDecks,
BoolKey::CollapseFlags => ConfigKey::CollapseFlags, BoolKey::CollapseFlags => ConfigKey::CollapseFlags,
BoolKey::CollapseNotetypes => ConfigKey::CollapseNotetypes, BoolKey::CollapseNotetypes => ConfigKey::CollapseNotetypes,
BoolKey::CollapseRecent => ConfigKey::CollapseRecent,
BoolKey::CollapseSavedSearches => ConfigKey::CollapseSavedSearches, BoolKey::CollapseSavedSearches => ConfigKey::CollapseSavedSearches,
BoolKey::CollapseTags => ConfigKey::CollapseTags, BoolKey::CollapseTags => ConfigKey::CollapseTags,
BoolKey::CollapseToday => ConfigKey::CollapseToday,
BoolKey::PreviewBothSides => ConfigKey::PreviewBothSides, BoolKey::PreviewBothSides => ConfigKey::PreviewBothSides,
} }
} }