diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9066731b..8fce9f2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,3 @@ # Contributing to wiki-tui First of all, thank you for taking the time to contribute! -You can read all of the neccessary information on the wiki-tui website. +You can read all of the necessary information on the wiki-tui website. diff --git a/docs/docs/configuration/api.md b/docs/docs/configuration/api.md index a8526ae9..b22ac1c5 100644 --- a/docs/docs/configuration/api.md +++ b/docs/docs/configuration/api.md @@ -47,7 +47,7 @@ api.search_type = "text" ### Enabling query rewrites [:octicons-tag-24: 0.9.0][release-0.9.0] ยท :octicons-milestone-16: Default `false` -Enable interal query rewriting. Wikipedia can rewrite the query into another which is thought to +Enable intenal query rewriting. Wikipedia can rewrite the query into another which is thought to provide better results by, for instance, correcting spelling errors ```toml diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 32fc6cbc..9b897ec9 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -4,7 +4,7 @@ I'm planning on overhauling the structure of the configuration. This includes but is not limited to: - - Changing the names of varius settings and parameters + - Changing the names of various settings and parameters - Organizing the configuration into a better thought out structure This means that all of this is subject to change, however, it'll take a diff --git a/docs/docs/configuration/keybindings.md b/docs/docs/configuration/keybindings.md index 35fc0c57..31098467 100644 --- a/docs/docs/configuration/keybindings.md +++ b/docs/docs/configuration/keybindings.md @@ -5,7 +5,7 @@ There are certain actions that you can change the Keybindings for. The configura ## Keybinding Configuration !!! tip "Multiple Bindings per Action" - You can also define multiple bindings for one action by putting them into an array (`action = [bidning1, binding2, etc.]`). + You can also define multiple bindings for one action by putting them into an array (`action = [bindning1, binding2, etc.]`). A bindig can be either a keycode or a keycode combined with one or more modifiers for that key. All of the following are a valid way of configuring a binding (where `action` is one of the configurable diff --git a/docs/docs/configuration/logging.md b/docs/docs/configuration/logging.md index bdffdcf0..898f11b5 100644 --- a/docs/docs/configuration/logging.md +++ b/docs/docs/configuration/logging.md @@ -21,7 +21,7 @@ logging.enabled = true When a crash occurs or you encounter a bug, without the log file we cannot do very much if we cannot reproduce it. But even if we can reproduce your bug or crash, we can usually fix it much faster with the logs. - You don't need to have your `log_level` set to `INFO` (altough, we would appreciate it :)). Even if you only have the `log_level` set to `WARN`, it helps us so much more than no logs at all. So please, for you it is only a single file that gets overwritten when you start wiki-tui again. But for us, it means so much more. + You don't need to have your `log_level` set to `INFO` (although, we would appreciate it :)). Even if you only have the `log_level` set to `WARN`, it helps us so much more than no logs at all. So please, for you it is only a single file that gets overwritten when you start wiki-tui again. But for us, it means so much more. ## Adjusting the Log Level diff --git a/src/action.rs b/src/action.rs index 05eedf71..4f6ccc32 100644 --- a/src/action.rs +++ b/src/action.rs @@ -59,7 +59,7 @@ pub enum Action { // Page loading LoadSearchResult(SearchResult), LoadLink(Link), - LoadLangaugeLink(LanguageLink), + LoadLanguageLink(LanguageLink), Search(SearchAction), Page(PageAction), @@ -69,7 +69,7 @@ pub enum Action { #[derive(Debug, Clone, PartialEq, Eq)] pub enum SearchAction { StartSearch(String), - FinshSearch(Search), + FinishSearch(Search), ContinueSearch, ClearSearchResults, OpenSearchResult, diff --git a/src/app.rs b/src/app.rs index 471bc04e..24bf42b5 100644 --- a/src/app.rs +++ b/src/app.rs @@ -18,7 +18,7 @@ use crate::{ message_popup::MessagePopupComponent, page_viewer::PageViewer, search::SearchComponent, - search_bar::{SearchBarComponent, SEARCH_BAR_HEIGTH}, + search_bar::{SearchBarComponent, SEARCH_BAR_HEIGHT}, search_language_popup::SearchLanguageSelectionComponent, Component, }, @@ -67,7 +67,7 @@ impl AppComponent { let chunks = Layout::default() .direction(Direction::Vertical) .constraints([ - Constraint::Min(SEARCH_BAR_HEIGTH), + Constraint::Min(SEARCH_BAR_HEIGHT), Constraint::Percentage(100), ]) .split(area); @@ -205,7 +205,7 @@ impl Component for AppComponent { self.page_loader.as_ref().unwrap().load_search_result(title) } Action::LoadLink(link) => self.page_loader.as_ref().unwrap().load_link(link), - Action::LoadLangaugeLink(link) => { + Action::LoadLanguageLink(link) => { self.page_loader.as_ref().unwrap().load_language_link(link) } diff --git a/src/components/page.rs b/src/components/page.rs index 689c24d4..35852d13 100644 --- a/src/components/page.rs +++ b/src/components/page.rs @@ -689,7 +689,7 @@ impl Component for PageComponent { Action::ScrollToTop => self.scroll_to_y(0), Action::ScrollToBottom => self.scroll_to_bottom(), - Action::Resize(width, heigth) => self.resize(width, heigth), + Action::Resize(width, height) => self.resize(width, height), _ => return ActionResult::Ignored, } ActionResult::consumed() diff --git a/src/components/page_language_popup.rs b/src/components/page_language_popup.rs index fdb08421..13c186fd 100644 --- a/src/components/page_language_popup.rs +++ b/src/components/page_language_popup.rs @@ -75,7 +75,7 @@ impl Component for PageLanguageSelectionComponent { )); } return packet - .action(Action::LoadLangaugeLink(link.to_owned())) + .action(Action::LoadLanguageLink(link.to_owned())) .into(); } return ActionResult::Ignored; diff --git a/src/components/search.rs b/src/components/search.rs index 59833960..399b4128 100644 --- a/src/components/search.rs +++ b/src/components/search.rs @@ -106,7 +106,7 @@ impl SearchComponent { .unwrap(); match search_request.search().await { Ok(search) => tx - .send(Action::Search(SearchAction::FinshSearch(search))) + .send(Action::Search(SearchAction::FinishSearch(search))) .unwrap(), Err(error) => { let error = error.context("Unable to execute the search"); @@ -175,7 +175,7 @@ impl SearchComponent { .unwrap(); match search_request.search().await { Ok(search) => tx - .send(Action::Search(SearchAction::FinshSearch(search))) + .send(Action::Search(SearchAction::FinishSearch(search))) .unwrap(), Err(error) => { let error = error.context("Unable to continue the search"); @@ -284,7 +284,7 @@ impl Component for SearchComponent { match action { Action::Search(search_action) => match search_action { SearchAction::StartSearch(query) => self.start_search(query), - SearchAction::FinshSearch(search) => self.finish_search(search), + SearchAction::FinishSearch(search) => self.finish_search(search), SearchAction::ContinueSearch => self.continue_search(), SearchAction::ClearSearchResults => self.clear_search_results(), SearchAction::OpenSearchResult => self.open_selected_result(), diff --git a/src/components/search_bar.rs b/src/components/search_bar.rs index 1db19b9d..9a7f6ee5 100644 --- a/src/components/search_bar.rs +++ b/src/components/search_bar.rs @@ -20,7 +20,7 @@ use super::Component; const EMPTY_PROMPT: &str = "Search Wikipedia"; const SEARCH_BAR_X: u16 = 50; -pub const SEARCH_BAR_HEIGTH: u16 = 3; +pub const SEARCH_BAR_HEIGHT: u16 = 3; #[derive(Default)] pub struct SearchBarComponent { diff --git a/src/config.rs b/src/config.rs index d7a4f9b8..b6e8380e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -302,7 +302,7 @@ bitflags! { pub enum PaddingConfig { Uniform(u16), Horizontal { horizontal: u16 }, - Vertical { veritical: u16 }, + Vertical { vertical: u16 }, Proportional { proportional: u16 }, Symmetric { symmetric: (u16, u16) }, Custom(u16, u16, u16, u16), @@ -315,7 +315,7 @@ impl Into for PaddingConfig { match self { PaddingConfig::Uniform(val) => Padding::uniform(val), PaddingConfig::Horizontal { horizontal } => Padding::horizontal(horizontal), - PaddingConfig::Vertical { veritical } => Padding::vertical(veritical), + PaddingConfig::Vertical { vertical } => Padding::vertical(vertical), PaddingConfig::Proportional { proportional } => Padding::proportional(proportional), PaddingConfig::Symmetric { symmetric } => Padding::symmetric(symmetric.0, symmetric.1), PaddingConfig::Custom(left, right, top, bottom) => { diff --git a/src/ui/stateful_list.rs b/src/ui/stateful_list.rs index 0116cc07..b03c3cfe 100644 --- a/src/ui/stateful_list.rs +++ b/src/ui/stateful_list.rs @@ -12,7 +12,7 @@ pub enum ScrollBehaviour { pub struct StatefulList { state: ListState, items: Vec, - behvaiour: ScrollBehaviour, + behaviour: ScrollBehaviour, } impl StatefulList { @@ -20,12 +20,12 @@ impl StatefulList { StatefulList { state: ListState::default().with_selected(Some(0)), items, - behvaiour: ScrollBehaviour::default(), + behaviour: ScrollBehaviour::default(), } } pub fn scroll_behavior(mut self, behavior: ScrollBehaviour) -> Self { - self.behvaiour = behavior; + self.behaviour = behavior; self } @@ -45,7 +45,7 @@ impl StatefulList { let i = match self.state.selected() { Some(i) => { if i >= self.items.len().saturating_sub(1) { - match self.behvaiour { + match self.behaviour { ScrollBehaviour::StickToBottom | ScrollBehaviour::StickToEnds => i, ScrollBehaviour::StickToTop | ScrollBehaviour::Circle => 0, } @@ -62,7 +62,7 @@ impl StatefulList { let i = match self.state.selected() { Some(i) => { if i == 0 { - match self.behvaiour { + match self.behaviour { ScrollBehaviour::StickToBottom | ScrollBehaviour::Circle => { self.items.len().saturating_sub(1) } diff --git a/wiki-api-macros/src/lib.rs b/wiki-api-macros/src/lib.rs index db5226ae..b9f2f56f 100644 --- a/wiki-api-macros/src/lib.rs +++ b/wiki-api-macros/src/lib.rs @@ -145,7 +145,7 @@ pub fn parse_languages(input: TokenStream) -> TokenStream { impl std::fmt::Display for ParseLanguageError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.pad( - &format!("error parsing langugage: '{}' is an unknown language", self.0) + &format!("error parsing language: '{}' is an unknown language", self.0) ) } } diff --git a/wiki-api/src/page.rs b/wiki-api/src/page.rs index 333efbbb..ee638b7b 100644 --- a/wiki-api/src/page.rs +++ b/wiki-api/src/page.rs @@ -52,12 +52,12 @@ pub mod link_data { } #[derive(Debug, Clone, PartialEq, Eq)] - pub struct ExternalToInteralData {} + pub struct ExternalToInternalData {} } #[derive(Debug, Clone, PartialEq, Eq)] pub enum Link { - /// Interal link to another page in the same wiki + /// Internal link to another page in the same wiki Internal(link_data::InternalData), /// Anchor to a specific section in the current page /// Note: this only corresponds to anchors on the current page. For anchors in another page on @@ -69,8 +69,8 @@ pub enum Link { MediaLink(link_data::MediaData), /// External link to a page at another website External(link_data::ExternalData), - /// External link to an interal page in the same wiki - ExternalToInternal(link_data::ExternalToInteralData), + /// External link to an internal page in the same wiki + ExternalToInternal(link_data::ExternalToInternalData), } impl Link { diff --git a/wiki-api/src/parser.rs b/wiki-api/src/parser.rs index bb072f29..6c96f5c4 100644 --- a/wiki-api/src/parser.rs +++ b/wiki-api/src/parser.rs @@ -8,7 +8,7 @@ use crate::{ document::{Data, HeaderKind, Raw, UnsupportedElement}, languages::Language, page::{ - link_data::{AnchorData, ExternalData, ExternalToInteralData, InternalData, MediaData}, + link_data::{AnchorData, ExternalData, ExternalToInternalData, InternalData, MediaData}, Link, }, search::Namespace, @@ -339,7 +339,7 @@ impl WikipediaParser { let is_same_wiki = link_url.domain() == endpoint.domain(); if !is_same_wiki { return Some(Data::Link(Link::ExternalToInternal( - ExternalToInteralData {}, + ExternalToInternalData {}, ))); } diff --git a/wiki-api/src/search.rs b/wiki-api/src/search.rs index cbb98c77..5d775b1d 100644 --- a/wiki-api/src/search.rs +++ b/wiki-api/src/search.rs @@ -68,7 +68,7 @@ impl Debug for Search { } } -/// Contains general informations about the search +/// Contains general information about the search #[derive(Debug, Clone, PartialEq, Eq)] pub struct SearchInfo { /// Whether the search is complete and no more results are available @@ -99,7 +99,7 @@ pub struct SearchInfo { /// let continued_search = Search::builder() /// .query(continue_data.query) /// .endpoint(continue_data.endpoint) -/// .langauge(continue_data.language) +/// .language(continue_data.language) /// .offset(continue_data.offset) /// .search()?; /// ``` @@ -665,7 +665,7 @@ impl SearchBuilder { self } - /// Set the sort order of returend results + /// Set the sort order of returned results /// /// Default: [`SortOrder::Relevance`] /// @@ -677,7 +677,7 @@ impl SearchBuilder { } impl SearchBuilder { - /// Performes the search and returns the result. The search can only be made when the query, + /// Performs the search and returns the result. The search can only be made when the query, /// endpoint and language are set /// /// # Example