Skip to content

Commit

Permalink
[MBL-1037] Use block user translatable strings (#1884)
Browse files Browse the repository at this point in the history
* Run make strings

* Update strings to translatable ones

* Fix tests and format

---------

Co-authored-by: Amy <[email protected]>
  • Loading branch information
ifosli and amy-at-kickstarter authored Nov 20, 2023
1 parent 235c6ae commit 4d76071
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,13 @@ final class CommentRepliesViewController: UITableViewController, MessageBannerVi
guard let self else { return }
self.commentComposer.isHidden = true

// Scott TODO: Use localized strings once translations can be done [mbl-1037](https://kickstarter.atlassian.net/browse/MBL-1037)
if success {
self.messageBannerViewController?
.showBanner(with: .success, message: "This user has been successfully blocked")
.showBanner(with: .success, message: Strings.Block_user_success())
self.delegate?.commentRepliesViewControllerDidBlockUser(self)
} else {
self.messageBannerViewController?
.showBanner(with: .error, message: "Your request did not go through. Try again.")
.showBanner(with: .error, message: Strings.Block_user_fail())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,12 @@ internal final class CommentsViewController: UITableViewController, MessageBanne
.observeValues { [weak self] success in
self?.commentComposer.isHidden = true

// Scott TODO: Use localized strings once translations can be done [mbl-1037](https://kickstarter.atlassian.net/browse/MBL-1037)
if success {
self?.messageBannerViewController?
.showBanner(with: .success, message: "This user has been successfully blocked")
.showBanner(with: .success, message: Strings.Block_user_success())
} else {
self?.messageBannerViewController?
.showBanner(with: .error, message: "Your request did not go through. Try again.")
.showBanner(with: .error, message: Strings.Block_user_fail())
}
}
}
Expand Down Expand Up @@ -291,7 +290,8 @@ extension CommentsViewController: CommentCellDelegate {
extension CommentsViewController: CommentRepliesViewControllerDelegate {
func commentRepliesViewControllerDidBlockUser(_: CommentRepliesViewController) {
self.tableView.scrollToTop()
self.viewModel.inputs.refresh() }
self.viewModel.inputs.refresh()
}
}

// MARK: - CommentRemovedCellDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,12 @@ internal final class MessagesViewController: UITableViewController, MessageBanne
.observeForUI()
.observeValues { [weak self] success in

// Scott TODO: Use localized strings once translations can be done [mbl-1037](https://kickstarter.atlassian.net/browse/MBL-1037)
if success {
self?.messageBannerViewController?
.showBanner(with: .success, message: "This user has been successfully blocked")
.showBanner(with: .success, message: Strings.Block_user_success())
} else {
self?.messageBannerViewController?
.showBanner(with: .error, message: "Your request did not go through. Try again.")
.showBanner(with: .error, message: Strings.Block_user_fail())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,12 @@ public final class ProjectPageViewController: UIViewController, MessageBannerVie
self.viewModel.outputs.userBlocked
.observeForUI()
.observeValues { [weak self] success in
// Scott TODO: Use localized strings once translations can be done [mbl-1037](https://kickstarter.atlassian.net/browse/MBL-1037)
if success {
self?.messageBannerViewController?
.showBanner(with: .success, message: "This user has been successfully blocked")
.showBanner(with: .success, message: Strings.Block_user_success())
} else {
self?.messageBannerViewController?
.showBanner(with: .error, message: "Your request did not go through. Try again.")
.showBanner(with: .error, message: Strings.Block_user_fail())
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions Kickstarter-iOS/Locales/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
"Big_Kickstarter_news_and_events_near_you" = "Big Kickstarter news and events near you, delivered just a few times a year.";
"Big_Kickstarter_news_plus_occasional_projects_and_events_chosen_just_for_you" = "Big Kickstarter news, plus occasional projects and events chosen just for you.";
"Biography" = "Biography";
"Block_this_user" = "Block this user";
"Block_user_fail" = "Your request did not go through. Try again.";
"Block_user_success" = "This user has been successfully blocked";
"Block_username" = "Block %{username}?";
"Blocked_user" = "Blocked User";
"Blocked_user_confirmation" = "Blocking this user means that you won’t see their comments or content anymore. If you have saved or backed projects from this user and would like to withdraw your support, you must remove your pledge before blocking. To unblock a user in the future, please go through our Help Center.";
"Bonus" = "Bonus";
"Bonus_support" = "Bonus support";
"Bookmarks" = "Bookmarks";
Expand Down Expand Up @@ -343,7 +349,7 @@
"Kickstarter_on_Film" = "Kickstarter on Film";
"Kickstarter_takes_claims" = "Kickstarter takes claims of intellectual property infringement seriously. For more information and instructions on how to report infringement, please visit our Copyright Policy and our Trademark Policy. Only claims filed by the copyright or trademark holder can be processed.";
"Know_when_creators_and_backers_message_you" = "Know when creators and backers message you by enabling notifications.";
"Learn_about_AI_policy_on_Kickstarter" = "Learn about AI policy on Kickstarter.";
"Learn_about_AI_policy_on_Kickstarter" = "Learn about AI policy on Kickstarter";
"Learn_about_accountability_on_Kickstarter" = "Learn about accountability on Kickstarter";
"Learn_more_about_accountability" = "Learn more about accountability";
"Learn_more_about_comment_guidelines" = "<a href=\"%{community_link}\">Learn more about comment guidelines</a>";
Expand Down Expand Up @@ -686,6 +692,7 @@
"This_project_didnt_reach_its_funding_goal_so_your_payment_method_was_never_charged" = "This project didn’t reach its funding goal, so your payment method was never charged.";
"This_project_has_a_set_currency_that_cant_process_this_option" = "This project has a set currency that can't process this option.";
"This_project_will_only_be_funded_on_if_at_least_amount_is_pledged_by_date" = "This project will only be funded on if at least %{amount} is pledged by %{date}.";
"This_user_has_been_blocked" = "This user has been blocked";
"Time_left_left" = "%{time_left} left";
"To_access_all_your_favorite_categories_tap_the_explore_dropdown" = "To access all your favorite categories, tap the explore dropdown at the top of the app.";
"To_learn_how_Kickstarter_encourages_sustainable_practices" = "to learn how Kickstarter encourages sustainable practices.";
Expand Down Expand Up @@ -725,6 +732,7 @@
"View" = "View";
"View_dashboard" = "View dashboard";
"View_more_replies" = "View more replies";
"View_profile" = "View profile";
"View_progress" = "View progress";
"View_project" = "View project";
"View_replies" = "View replies";
Expand Down Expand Up @@ -786,7 +794,7 @@
"You_canceled_your_pledge_for_this_project" = "You canceled your pledge for this project.";
"You_cant_use_this_credit_card_to_back_a_project_from_project_country" = "You can’t use this credit card to back a project from %{project_country}.";
"You_have_successfully_backed_project_html" = "You have successfully backed <b>%{project_name}</b>. This project is now one step closer to a reality, thanks to you. Spread the word!";
"You_launched_this_project_on_launch_date" = "You launched this project on %{launch_date}.";
"You_launched_this_project_on_launch_date" = "You launched this project on %{launch_date}. For creator tools, head to our website!";
"You_need_to_pledge_at_least_reward_minimum_for_this_reward" = "You need to pledge at least %{reward_minimum} for this reward.";
"You_pledged_on_date" = "<b>You pledged</b> on %{pledge_date}";
"You_pledged_without_a_reward" = "You pledged without a reward";
Expand Down
12 changes: 10 additions & 2 deletions Kickstarter-iOS/Locales/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
"Big_Kickstarter_news_and_events_near_you" = "Ein paar Mal pro Jahr: Kickstarter-Neuigkeiten und Events in deiner Nähe.";
"Big_Kickstarter_news_plus_occasional_projects_and_events_chosen_just_for_you" = "Das Neueste von Kickstarter plus gelegentlich für dich ausgewählte Projekte und Events.";
"Biography" = "Biografie";
"Block_this_user" = "Diesen Nutzer blockieren";
"Block_user_fail" = "Deine Anfrage konnte nicht verarbeitet werden. Bitte versuche es noch einmal.";
"Block_user_success" = "Dieser Nutzer wurde erfolgreich blockiert";
"Block_username" = "%{username} blockieren?";
"Blocked_user" = "Blockierter Nutzer";
"Blocked_user_confirmation" = "Wenn du diesen Nutzer blockierst, siehst du keine Kommentare oder Inhalte mehr von ihm. Falls du Projekte von diesem Nutzer gespeichert oder unterstützt hast und deine Unterstützung zurückziehen möchtest, musst du deinen Beitrag vor dem Blockieren entfernen. Weitere Informationen dazu, wie du die Blockierung eines Nutzers aufheben kannst, findest du im Hilfecenter.";
"Bonus" = "Bonus";
"Bonus_support" = "Bonus-Unterstützung";
"Bookmarks" = "Bookmarks";
Expand Down Expand Up @@ -343,7 +349,7 @@
"Kickstarter_on_Film" = "Kickstarter on Film";
"Kickstarter_takes_claims" = "Meldungen zu möglichen Verletzungen von Urheberrechten werden bei Kickstarter sehr ernst genommen. Weitere Informationen zum Melden von solchen Urheberrechtsverletzungen findest du in unserer Richtlinie zu Urheberrechten und unserer Richtlinie zu Markenrechten. Es können nur Meldungen bearbeitet werden, die vom Eigentümer des Urheberrechts oder Markenzeichens gemacht wurden.";
"Know_when_creators_and_backers_message_you" = "Aktiviere Benachrichtigungen, damit du über eingehende Nachrichten von Projektgründern und Unterstützern Bescheid weißt.";
"Learn_about_AI_policy_on_Kickstarter" = "Weitere Informationen zu KI-Richtlinie von Kickstarter.";
"Learn_about_AI_policy_on_Kickstarter" = "Weitere Informationen zur KI-Richtlinie von Kickstarter";
"Learn_about_accountability_on_Kickstarter" = "Näheres zur Rechenschaftspflicht auf Kickstarter";
"Learn_more_about_accountability" = "Weitere Informationen zur Rechenschaftspflicht";
"Learn_more_about_comment_guidelines" = "<a href=\"%{community_link}\">Mehr Info zu Kommentar-Richtlinien</a>";
Expand Down Expand Up @@ -686,6 +692,7 @@
"This_project_didnt_reach_its_funding_goal_so_your_payment_method_was_never_charged" = "Bei diesem Projekt wurde das Finanzierungsziel nicht erreicht. Daher wurde deine Zahlungsmethode nicht belastet.";
"This_project_has_a_set_currency_that_cant_process_this_option" = "Diese Option ist für die Währung dieses Projekts nicht verfügbar.";
"This_project_will_only_be_funded_on_if_at_least_amount_is_pledged_by_date" = "Dieses Projekt wird nur finanziert, wenn bis am %{date} Unterstützungsbeiträge von mindestens %{amount} geleistet werden.";
"This_user_has_been_blocked" = "Dieser Nutzer wurde blockiert";
"Time_left_left" = "%{time_left} übrig";
"To_access_all_your_favorite_categories_tap_the_explore_dropdown" = "Für schnellen Zugriff auf deine meist besuchten Kategorien, tippe auf das Dropdown-Menü oben.";
"To_learn_how_Kickstarter_encourages_sustainable_practices" = "um mehr über die von Kickstarter empfohlenen Umweltschutzmaßnahmen zu erfahren.";
Expand Down Expand Up @@ -725,6 +732,7 @@
"View" = "Anzeigen";
"View_dashboard" = "Dashboard ansehen";
"View_more_replies" = "Weitere Antworten ansehen";
"View_profile" = "Profil anzeigen";
"View_progress" = "Verlauf ansehen";
"View_project" = "Projekt ansehen";
"View_replies" = "Antworten ansehen";
Expand Down Expand Up @@ -786,7 +794,7 @@
"You_canceled_your_pledge_for_this_project" = "Du hast den Finanzierungsbeitrag für dieses Projekt zurückgezogen.";
"You_cant_use_this_credit_card_to_back_a_project_from_project_country" = "Diese Karte kann nicht verwendet werden, um ein Projekt aus dem folgenden Land zu unterstützen: %{project_country}.";
"You_have_successfully_backed_project_html" = "Dank deiner Unterstützung ist <b>%{project_name}</b> seiner Verwirklichung einen Schritt näher. Sag es weiter!";
"You_launched_this_project_on_launch_date" = "Du hast dieses Projekt am %{launch_date} veröffentlicht.";
"You_launched_this_project_on_launch_date" = "Du hast dieses Projekt am %{launch_date} veröffentlicht. Tools für Projektgründer findest du auf unserer Website.";
"You_need_to_pledge_at_least_reward_minimum_for_this_reward" = "Diese Belohnung hat einen Mindestfinanzierungsbeitrag von %{reward_minimum}.";
"You_pledged_on_date" = "<b>Finanzierungsbeitrag geleistet</b> im %{pledge_date}";
"You_pledged_without_a_reward" = "Unterstützt ohne Belohnung";
Expand Down
12 changes: 10 additions & 2 deletions Kickstarter-iOS/Locales/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
"Big_Kickstarter_news_and_events_near_you" = "Unas cuantas veces al año: Noticias sobresalientes de Kickstarter y eventos cerca de ti.";
"Big_Kickstarter_news_plus_occasional_projects_and_events_chosen_just_for_you" = "Importantes novedades de Kickstarter, además de proyectos y eventos ocasionales elegidos especialmente para ti.";
"Biography" = "Biografía";
"Block_this_user" = "Bloquear a este usuario";
"Block_user_fail" = "Tu solicitud no se procesó. Intenta otra vez.";
"Block_user_success" = "Este usuario se bloqueó con éxito.";
"Block_username" = "¿Bloquear a %{username}?";
"Blocked_user" = "Usuario bloqueado";
"Blocked_user_confirmation" = "Al bloquear a este usuario, ya no verás sus comentarios ni su contenido. Si guardaste o patrocinaste proyectos del usuario y quieres revertir tu apoyo, debes eliminar tu contribución antes de bloquearlo. Puedes desbloquear usuarios desde nuestro Centro de ayuda.";
"Bonus" = "Extra";
"Bonus_support" = "Apoyo extra";
"Bookmarks" = "Marcadores";
Expand Down Expand Up @@ -343,7 +349,7 @@
"Kickstarter_on_Film" = "Kickstarter on Film";
"Kickstarter_takes_claims" = "Kickstarter presta suma atención a las denuncias de infracción de derecho intelectual. Para encontrar más información e instrucciones sobre cómo denunciar una infracción, visita nuestra Política de copyright y nuestra Política de marca registrada. Solo se pueden procesar las denuncias presentadas por el propietario del copyright o marca registrada.";
"Know_when_creators_and_backers_message_you" = "Entérate cuando los creadores y patrocinadores te envíen mensajes habilitando las notificaciones.";
"Learn_about_AI_policy_on_Kickstarter" = "Información sobre la política de IA en Kickstarter.";
"Learn_about_AI_policy_on_Kickstarter" = "Información sobre la política de IA en Kickstarter";
"Learn_about_accountability_on_Kickstarter" = "Más información sobre el concepto de responsabilidad en Kickstarter";
"Learn_more_about_accountability" = "Más información sobre las responsabilidades";
"Learn_more_about_comment_guidelines" = "<a href=\"%{community_link}\">Más información sobre las reglas de los comentarios</a>";
Expand Down Expand Up @@ -686,6 +692,7 @@
"This_project_didnt_reach_its_funding_goal_so_your_payment_method_was_never_charged" = "Este proyecto no alcanzó su meta de financiamiento, así que no se realizó ningún cargo a tu método de pago.";
"This_project_has_a_set_currency_that_cant_process_this_option" = "Dado que este proyecto tiene una moneda establecida, no se puede procesar esta opción.";
"This_project_will_only_be_funded_on_if_at_least_amount_is_pledged_by_date" = "Este proyecto sólo será financiado si se contribuye al menos un monto de %{amount} antes del %{date}.";
"This_user_has_been_blocked" = "Este usuario se bloqueó.";
"Time_left_left" = "%{time_left} restantes";
"To_access_all_your_favorite_categories_tap_the_explore_dropdown" = "Accede a tus categorías favoritas en el menú en la parte superior de la app.";
"To_learn_how_Kickstarter_encourages_sustainable_practices" = "para conocer cómo Kickstarter incentiva las prácticas sustentables.";
Expand Down Expand Up @@ -725,6 +732,7 @@
"View" = "Ver";
"View_dashboard" = "Ver panel";
"View_more_replies" = "Ver más respuestas";
"View_profile" = "Ver perfil";
"View_progress" = "Ver progreso";
"View_project" = "Ver proyecto";
"View_replies" = "Ver respuestas";
Expand Down Expand Up @@ -786,7 +794,7 @@
"You_canceled_your_pledge_for_this_project" = "Has cancelado tu contribución a este proyecto.";
"You_cant_use_this_credit_card_to_back_a_project_from_project_country" = "No puedes usar esta tarjeta de crédito para patrocinar un proyecto de %{project_country}.";
"You_have_successfully_backed_project_html" = "Has patrocinado <b>%{project_name}</b> con éxito. Gracias a ti, este proyecto está ahora un paso más cerca de hacerse realidad. ¡Corre la voz!";
"You_launched_this_project_on_launch_date" = "Publicaste el proyecto el: %{launch_date}.";
"You_launched_this_project_on_launch_date" = "Publicaste el proyecto el %{launch_date}. Encuentra las herramientas para creadores en nuestro sitio web.";
"You_need_to_pledge_at_least_reward_minimum_for_this_reward" = "Debes contribuir, al menos, %{reward_minimum} para obtener esta recompensa.";
"You_pledged_on_date" = "<b>Contribuiste</b> el %{pledge_date}";
"You_pledged_without_a_reward" = "Contribuiste sin recompensa";
Expand Down
Loading

0 comments on commit 4d76071

Please sign in to comment.