From 9f0a3a0d9fe354eb97e5fc7c9cd8d04fef775b62 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sat, 20 Jun 2020 18:22:31 +0300 Subject: [PATCH] Fix spelling of things --- podcasts-data/src/errors.rs | 2 +- podcasts-data/src/feed.rs | 2 +- podcasts-data/src/lib.rs | 4 ++-- podcasts-data/src/models/new_episode.rs | 4 ++-- podcasts-data/src/models/source.rs | 2 +- podcasts-data/src/opml.rs | 6 +++--- podcasts-data/src/utils.rs | 8 ++++---- podcasts-downloader/src/downloader.rs | 12 ++++++------ .../resources/org.gnome.Podcasts.appdata.xml.in.in | 4 ++-- podcasts-gtk/src/utils.rs | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/podcasts-data/src/errors.rs b/podcasts-data/src/errors.rs index 6559fa1..84e2889 100644 --- a/podcasts-data/src/errors.rs +++ b/podcasts-data/src/errors.rs @@ -84,7 +84,7 @@ pub enum DataError { FeedRedirect(Source), #[fail(display = "Feed is up to date")] FeedNotModified(Source), - #[fail(display = "Error occured while Parsing an Episode. Reason: {}", reason)] + #[fail(display = "Error occurred while Parsing an Episode. Reason: {}", reason)] ParseEpisodeError { reason: String, parent_id: i32 }, #[fail(display = "Episode was not changed and thus skipped.")] EpisodeNotChanged, diff --git a/podcasts-data/src/feed.rs b/podcasts-data/src/feed.rs index c36095b..8026eb7 100644 --- a/podcasts-data/src/feed.rs +++ b/podcasts-data/src/feed.rs @@ -198,7 +198,7 @@ mod tests { }) .collect(); - // Index the channes + // Index the channels let stream_ = stream::iter_ok(feeds).for_each(|x| x.index()); tokio::run(stream_.map_err(|_| ())); diff --git a/podcasts-data/src/lib.rs b/podcasts-data/src/lib.rs index f234216..1ca97c8 100644 --- a/podcasts-data/src/lib.rs +++ b/podcasts-data/src/lib.rs @@ -111,7 +111,7 @@ pub use crate::models::{Episode, EpisodeWidgetModel, Show, ShowCoverModel, Sourc /// It originates from the Tor-browser UA. pub const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"; -/// [XDG Base Direcotory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths. +/// [XDG Base Directory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths. #[allow(missing_debug_implementations)] pub mod xdg_dirs { use std::path::PathBuf; @@ -137,7 +137,7 @@ pub mod xdg_dirs { PODCASTS_XDG.create_cache_directory(PODCASTS_XDG.get_cache_home()).unwrap() }; - /// GNOME Podcasts Download Direcotry `PathBuf`. + /// GNOME Podcasts Download Directory `PathBuf`. pub static ref DL_DIR: PathBuf = { PODCASTS_XDG.create_data_directory("Downloads").unwrap() }; diff --git a/podcasts-data/src/models/new_episode.rs b/podcasts-data/src/models/new_episode.rs index 6a077ac..48174eb 100644 --- a/podcasts-data/src/models/new_episode.rs +++ b/podcasts-data/src/models/new_episode.rs @@ -255,7 +255,7 @@ impl NewEpisodeMinimal { return Err(err); }; - // Default to rfc2822 represantation of epoch 0. + // Default to rfc2822 representation of epoch 0. let date = parse_rfc822(item.pub_date().unwrap_or("Thu, 1 Jan 1970 00:00:00 +0000")); // Should treat information from the rss feeds as invalid by default. // Case: "Thu, 05 Aug 2016 06:00:00 -0400" <-- Actually that was friday. @@ -342,7 +342,7 @@ mod tests { use std::io::BufReader; // TODO: Add tests for other feeds too. - // Especially if you find an *intresting* generated feed. + // Especially if you find an *interesting* generated feed. // Known prebuilt expected objects. lazy_static! { diff --git a/podcasts-data/src/models/source.rs b/podcasts-data/src/models/source.rs index 509be15..61bf623 100644 --- a/podcasts-data/src/models/source.rs +++ b/podcasts-data/src/models/source.rs @@ -216,7 +216,7 @@ impl Source { self = self.save()?; debug!("Updated Source: {:#?}", &self); - info!("Feed url of Source {}, was updated succesfully.", self.id()); + info!("Feed url of Source {}, was updated successfully.", self.id()); } Ok(self) diff --git a/podcasts-data/src/opml.rs b/podcasts-data/src/opml.rs index 70430b3..b3e9a5f 100644 --- a/podcasts-data/src/opml.rs +++ b/podcasts-data/src/opml.rs @@ -43,7 +43,7 @@ use failure::Error; #[derive(Debug, Clone, PartialEq, Eq, Hash)] // FIXME: Make it a Diesel model /// Represents an `outline` xml element as per the `OPML` [specification][spec] -/// not `RSS` related sub-elements are ommited. +/// not `RSS` related sub-elements are omitted. /// /// [spec]: http://dev.opml.org/spec2.html pub struct Opml { @@ -82,7 +82,7 @@ pub fn import_from_file>(path: P) -> Result, DataErro import_to_db(content.as_slice()).map_err(From::from) } -/// Export a file to `P`, taking the feeds from the database and outputing +/// Export a file to `P`, taking the feeds from the database and outputting /// them in opml format. pub fn export_from_db>(path: P, export_title: &str) -> Result<(), Error> { let file = File::create(path)?; @@ -163,7 +163,7 @@ pub fn export_to_file(file: F, export_title: &str) -> Result<(), Error Ok(()) } -/// Extracts the `outline` elemnts from a reader `R` and returns a `HashSet` of `Opml` structs. +/// Extracts the `outline` elements from a reader `R` and returns a `HashSet` of `Opml` structs. pub fn extract_sources(reader: R) -> Result, reader::Error> { let mut list = HashSet::new(); let parser = reader::EventReader::new(reader); diff --git a/podcasts-data/src/utils.rs b/podcasts-data/src/utils.rs index eb2ccb5..92d5b06 100644 --- a/podcasts-data/src/utils.rs +++ b/podcasts-data/src/utils.rs @@ -56,7 +56,7 @@ fn download_checker() -> Result<(), DataError> { Ok(()) } -/// Delete watched `episodes` that have exceded their liftime after played. +/// Delete watched `episodes` that have exceeded their lifetime after played. fn played_cleaner(cleanup_date: DateTime) -> Result<(), DataError> { let mut episodes = dbqueries::get_played_cleaner_episodes()?; let now_utc = cleanup_date.timestamp() as i32; @@ -68,7 +68,7 @@ fn played_cleaner(cleanup_date: DateTime) -> Result<(), DataError> { let limit = ep.played().unwrap(); if now_utc > limit { delete_local_content(ep) - .map(|_| info!("Episode {:?} was deleted succesfully.", ep.local_uri())) + .map(|_| info!("Episode {:?} was deleted successfully.", ep.local_uri())) .map_err(|err| error!("Error: {}", err)) .map_err(|_| error!("Failed to delete file: {:?}", ep.local_uri())) .ok(); @@ -144,11 +144,11 @@ pub fn get_download_folder(pd_title: &str) -> Result { // TODO: Write Tests pub fn delete_show(pd: &Show) -> Result<(), DataError> { dbqueries::remove_feed(pd)?; - info!("{} was removed succesfully.", pd.title()); + info!("{} was removed successfully.", pd.title()); let fold = get_download_folder(pd.title())?; fs::remove_dir_all(&fold)?; - info!("All the content at, {} was removed succesfully", &fold); + info!("All the content at, {} was removed successfully", &fold); Ok(()) } diff --git a/podcasts-downloader/src/downloader.rs b/podcasts-downloader/src/downloader.rs index 2afa636..8ef55a7 100644 --- a/podcasts-downloader/src/downloader.rs +++ b/podcasts-downloader/src/downloader.rs @@ -54,7 +54,7 @@ pub trait DownloadProgress { // Sorry to those who will have to work with that code. // Would much rather use a crate, // or bindings for a lib like youtube-dl(python), -// But cant seem to find one. +// But can't seem to find one. // TODO: Write unit-tests. fn download_into( dir: &str, @@ -64,7 +64,7 @@ fn download_into( ) -> Result { info!("GET request to: {}", url); // Haven't included the loop check as - // Steal the Stars would tigger it as + // Steal the Stars would trigger it as // it has a loop back before giving correct url let policy = RedirectPolicy::custom(|attempt| { info!("Redirect Attempt URL: {:?}", attempt.url()); @@ -104,7 +104,7 @@ fn download_into( .and_then(|h| h.to_str().ok()) .map(From::from); - ct_len.map(|x| info!("File Lenght: {}", x)); + ct_len.map(|x| info!("File Length: {}", x)); ct_type.map(|x| info!("Content Type: {}", x)); let ext = get_ext(ct_type).unwrap_or_else(|| String::from("unknown")); @@ -131,7 +131,7 @@ fn download_into( let target = format!("{}/{}.{}", dir, file_title, ext); // Rename/move the tempfile into a permanent place upon success. rename(out_file, &target)?; - info!("Downloading of {} completed succesfully.", &target); + info!("Downloading of {} completed successfully.", &target); Ok(target) } @@ -219,10 +219,10 @@ pub fn get_episode( progress, )?; - // If download succedes set episode local_uri to dlpath. + // If download succeeds set episode local_uri to dlpath. ep.set_local_uri(Some(&path)); - // Over-write episode lenght + // Over-write episode length let size = fs::metadata(path); if let Ok(s) = size { ep.set_length(Some(s.len() as i32)) diff --git a/podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in b/podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in index 501a646..7313d4b 100644 --- a/podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in +++ b/podcasts-gtk/resources/org.gnome.Podcasts.appdata.xml.in.in @@ -51,13 +51,13 @@

- Podcasts 0.4.5 brings a month of bug fixes, performance improvements and initial tranlations support. + Podcasts 0.4.5 brings a month of bug fixes, performance improvements and initial translations support.

  • Finish, Polish, Turkish, Spanish, German, Galician, Indonesian and Korean Translations were added.
  • Views now adapt better to different window sizes, thanks to libhandy HdyColumn
  • The update indacator was moved to an In-App notification
  • -
  • Performance improvments when loading Show Cover images.
  • +
  • Performance improvements when loading Show Cover images.
  • Improved handling of HTTP Redirects
diff --git a/podcasts-gtk/src/utils.rs b/podcasts-gtk/src/utils.rs index 0449a36..3c1493f 100644 --- a/podcasts-gtk/src/utils.rs +++ b/podcasts-gtk/src/utils.rs @@ -88,7 +88,7 @@ use crate::i18n::i18n; pub(crate) fn lazy_load( data: T, container: WeakRef, - mut contructor: F, + mut constructor: F, callback: U, ) where T: IntoIterator + 'static, @@ -104,7 +104,7 @@ pub(crate) fn lazy_load( None => return, }; - let widget = contructor(x); + let widget = constructor(x); container.add(&widget); widget.show(); };