From b87d27d5351e1e18f5dbecc9408812ea6d5e2ad7 Mon Sep 17 00:00:00 2001 From: DeluxeAlonso Date: Thu, 4 Jul 2024 23:31:05 -0500 Subject: [PATCH 1/4] Adds missing localized strings --- UpcomingMovies/en.lproj/Localizable.strings | 4 ++++ UpcomingMovies/es-419.lproj/Localizable.strings | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/UpcomingMovies/en.lproj/Localizable.strings b/UpcomingMovies/en.lproj/Localizable.strings index 819731c3..378756af 100755 --- a/UpcomingMovies/en.lproj/Localizable.strings +++ b/UpcomingMovies/en.lproj/Localizable.strings @@ -87,3 +87,7 @@ "customListDetailSectionRatingTitle" = "Rating"; "customListDetailSectionRuntimeTitle" = "Runtime"; "customListDetailSectionRevenueTitle" = "Revenue"; + +"errorPlaceHolderViewTitleText" = "¡Ups!" +"errorPlaceHolderViewDetailText" = "Something went wrong." +"errorPlaceHolderViewRetryButtonTitle" = "Retry"; diff --git a/UpcomingMovies/es-419.lproj/Localizable.strings b/UpcomingMovies/es-419.lproj/Localizable.strings index ba87646d..761c7948 100755 --- a/UpcomingMovies/es-419.lproj/Localizable.strings +++ b/UpcomingMovies/es-419.lproj/Localizable.strings @@ -87,3 +87,7 @@ "customListDetailSectionRatingTitle" = "Rating"; "customListDetailSectionRuntimeTitle" = "Duración"; "customListDetailSectionRevenueTitle" = "Ganancias"; + +"errorPlaceHolderViewTitleText" = "¡Ups!" +"errorPlaceHolderViewDetailText" = "Ocurrió un error." +"errorPlaceHolderViewRetryButtonTitle" = "Reintentar"; From 9042393eff70b8d20b4078d7faddee43dae817df Mon Sep 17 00:00:00 2001 From: DeluxeAlonso Date: Thu, 4 Jul 2024 23:31:58 -0500 Subject: [PATCH 2/4] Adds missing LocalizedStrings enum cases --- .../Helpers/Utils/Localization/LocalizedStrings.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UpcomingMovies/Helpers/Utils/Localization/LocalizedStrings.swift b/UpcomingMovies/Helpers/Utils/Localization/LocalizedStrings.swift index 09151258..1997c024 100644 --- a/UpcomingMovies/Helpers/Utils/Localization/LocalizedStrings.swift +++ b/UpcomingMovies/Helpers/Utils/Localization/LocalizedStrings.swift @@ -84,4 +84,8 @@ enum LocalizedStrings: String, Localizable { case customListDetailSectionRuntimeTitle case customListDetailSectionRevenueTitle + case errorPlaceHolderViewTitleText + case errorPlaceHolderViewDetailText + case errorPlaceHolderViewRetryButtonTitle + } From 5dd859a8ca651e8d228db113dd4ec883eeaa5612 Mon Sep 17 00:00:00 2001 From: DeluxeAlonso Date: Thu, 4 Jul 2024 23:33:07 -0500 Subject: [PATCH 3/4] Updates ErrorPlaceholderView with new localized strings --- .../PlaceholderViews/Error/ErrorPlaceholderView.swift | 6 +++--- UpcomingMovies/en.lproj/Localizable.strings | 4 ++-- UpcomingMovies/es-419.lproj/Localizable.strings | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift b/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift index d1e326c3..a10a826b 100755 --- a/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift +++ b/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift @@ -91,9 +91,9 @@ extension ErrorPlaceholderView { // TODO: - Localize this struct Constants { - static let errorTitle = "¡Ups!" - static let errorDetail = "Something went wrong." - static let retryButtonTitle = "Retry" + static let errorTitle = LocalizedStrings.errorPlaceHolderViewTitleText() + static let errorDetail = LocalizedStrings.errorPlaceHolderViewDetailText() + static let retryButtonTitle = LocalizedStrings.errorPlaceHolderViewRetryButtonTitle() } } diff --git a/UpcomingMovies/en.lproj/Localizable.strings b/UpcomingMovies/en.lproj/Localizable.strings index 378756af..4bdea653 100755 --- a/UpcomingMovies/en.lproj/Localizable.strings +++ b/UpcomingMovies/en.lproj/Localizable.strings @@ -88,6 +88,6 @@ "customListDetailSectionRuntimeTitle" = "Runtime"; "customListDetailSectionRevenueTitle" = "Revenue"; -"errorPlaceHolderViewTitleText" = "¡Ups!" -"errorPlaceHolderViewDetailText" = "Something went wrong." +"errorPlaceHolderViewTitleText" = "¡Ups!"; +"errorPlaceHolderViewDetailText" = "Something went wrong."; "errorPlaceHolderViewRetryButtonTitle" = "Retry"; diff --git a/UpcomingMovies/es-419.lproj/Localizable.strings b/UpcomingMovies/es-419.lproj/Localizable.strings index 761c7948..1ab207b8 100755 --- a/UpcomingMovies/es-419.lproj/Localizable.strings +++ b/UpcomingMovies/es-419.lproj/Localizable.strings @@ -88,6 +88,6 @@ "customListDetailSectionRuntimeTitle" = "Duración"; "customListDetailSectionRevenueTitle" = "Ganancias"; -"errorPlaceHolderViewTitleText" = "¡Ups!" -"errorPlaceHolderViewDetailText" = "Ocurrió un error." +"errorPlaceHolderViewTitleText" = "¡Ups!"; +"errorPlaceHolderViewDetailText" = "Ocurrió un error."; "errorPlaceHolderViewRetryButtonTitle" = "Reintentar"; From 597a53baba1127bb74f00c9a26f8ba1460986c38 Mon Sep 17 00:00:00 2001 From: DeluxeAlonso Date: Thu, 4 Jul 2024 23:33:21 -0500 Subject: [PATCH 4/4] Removes todo comments --- .../PlaceholderViews/Error/ErrorPlaceholderView.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift b/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift index a10a826b..d05e49d7 100755 --- a/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift +++ b/UpcomingMovies/ViewComponents/PlaceholderViews/Error/ErrorPlaceholderView.swift @@ -89,7 +89,6 @@ final class ErrorPlaceholderView: UIView, NibLoadable, RetryPlaceHolderable { extension ErrorPlaceholderView { - // TODO: - Localize this struct Constants { static let errorTitle = LocalizedStrings.errorPlaceHolderViewTitleText() static let errorDetail = LocalizedStrings.errorPlaceHolderViewDetailText()