From 9a57f59e7040e1a8014ccb766f4e8ef1d36638d2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 5 Aug 2022 02:05:37 +0200 Subject: [PATCH] Rename `flavor_text` to `localized_flavor_text` --- src/load/setbundle.rs | 4 ++-- src/schema/setbundle/card.rs | 4 ++-- src/search/card.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/load/setbundle.rs b/src/load/setbundle.rs index 1173d68..4147c22 100644 --- a/src/load/setbundle.rs +++ b/src/load/setbundle.rs @@ -159,7 +159,7 @@ mod tests { localized_levelup_text: "".to_string(), associated_card_codes: vec![], associated_card_names_localized: vec![], - flavor_text: r#""Never fear change. It will question you, test your limits. It is our greatest teacher." - Karma"#.to_string(), + localized_flavor_text: r#""Never fear change. It will question you, test your limits. It is our greatest teacher." - Karma"#.to_string(), artist_name: "SIXMOREVODKA".to_string(), subtypes: vec![], supertype: "".to_string(), @@ -203,7 +203,7 @@ mod tests { localized_levelup_text: "".to_string(), associated_card_codes: vec![], associated_card_names_localized: vec![], - flavor_text: "".to_string(), + localized_flavor_text: "".to_string(), artist_name: "SIXMOREVODKA".to_string(), subtypes: vec![], supertype: "".to_string(), diff --git a/src/schema/setbundle/card.rs b/src/schema/setbundle/card.rs index 6e7b067..81ddce7 100644 --- a/src/schema/setbundle/card.rs +++ b/src/schema/setbundle/card.rs @@ -121,7 +121,7 @@ pub struct Card { /// Flavor text of the card, displayed when its image is inspected. #[serde(rename = "flavorText")] - pub flavor_text: String, + pub localized_flavor_text: String, /// Name of the artist who drew the card. #[serde(rename = "artistName")] @@ -253,7 +253,7 @@ mod tests { String::from("06RU025T5"), ], associated_card_names_localized: vec![], - flavor_text: String::from("The priestess' pupils were blown wide, and her hand trembled with nervous excitement. She was ready. This was the single moment Evelynn craved more than any other. She grinned, and slowly shed her visage. Then, as always, the screaming began."), + localized_flavor_text: String::from("The priestess' pupils were blown wide, and her hand trembled with nervous excitement. She was ready. This was the single moment Evelynn craved more than any other. She grinned, and slowly shed her visage. Then, as always, the screaming began."), artist_name: String::from("Kudos Productions"), subtypes: vec![], supertype: String::from("Champion"), diff --git a/src/search/card.rs b/src/search/card.rs index bf30d6a..c49823b 100644 --- a/src/search/card.rs +++ b/src/search/card.rs @@ -154,7 +154,7 @@ pub fn card_to_document(schema: &tantivy::schema::Schema, locale: &MappedGlobals f_description => card.localized_description_text, f_levelup => card.localized_levelup_text, f_associated => card.associated_card_codes.join(" "), - f_flavor => card.flavor_text, + f_flavor => card.localized_flavor_text, f_artist => card.artist_name, f_subtypes => card.subtypes.join(" "), f_supertype => card.supertype,