From c95636ce09b9e267a2071906d219e8b53665147d Mon Sep 17 00:00:00 2001 From: yheuhtozr <84892012+yheuhtozr@users.noreply.github.com> Date: Sat, 19 Aug 2023 01:48:12 +0900 Subject: [PATCH] Resync and restore i18n keys (#19899) --- .../mailers/notify_mailer/account_deleted_email.html.erb | 3 +-- .../mailers/notify_mailer/account_deleted_email.text.erb | 2 +- .../account_deletion_requested_email.html.erb | 3 +-- .../account_deletion_requested_email.text.erb | 2 +- .../notify_mailer/organization_deleted_email.html.erb | 3 +-- .../notify_mailer/organization_deleted_email.text.erb | 2 +- config/locales/en.yml | 1 - config/locales/fr.yml | 1 - config/locales/lib/en.yml | 7 ------- config/locales/lib/fr.yml | 7 ------- config/locales/mailers/en.yml | 2 +- config/locales/mailers/fr.yml | 2 +- config/locales/models/en.yml | 4 ---- config/locales/models/fr.yml | 4 ---- config/locales/validators/fr.yml | 4 ++-- config/locales/views/misc/en.yml | 2 ++ config/locales/views/misc/fr.yml | 2 ++ 17 files changed, 14 insertions(+), 37 deletions(-) diff --git a/app/views/mailers/notify_mailer/account_deleted_email.html.erb b/app/views/mailers/notify_mailer/account_deleted_email.html.erb index 5c3d99bee..a59b2111e 100644 --- a/app/views/mailers/notify_mailer/account_deleted_email.html.erb +++ b/app/views/mailers/notify_mailer/account_deleted_email.html.erb @@ -7,8 +7,7 @@

- Contact us at <%= ForemInstance.contact_email %> - if there is anything more we can help with. + <%= t("views.mailers.contact_mailto_html", contact_email: ForemInstance.contact_email) %>

diff --git a/app/views/mailers/notify_mailer/account_deleted_email.text.erb b/app/views/mailers/notify_mailer/account_deleted_email.text.erb index b3c76cc53..ddb6b6a48 100644 --- a/app/views/mailers/notify_mailer/account_deleted_email.text.erb +++ b/app/views/mailers/notify_mailer/account_deleted_email.text.erb @@ -1,6 +1,6 @@ Hi <%= @name %>, your account has been successfully deleted. -Contact us at <%= ForemInstance.contact_email %> if there is anything more we can help with. +<%= strip_tags t("views.mailers.contact_mailto_html", contact_email: ForemInstance.contact_email) %> Thanks, The <%= community_name %> Team diff --git a/app/views/mailers/notify_mailer/account_deletion_requested_email.html.erb b/app/views/mailers/notify_mailer/account_deletion_requested_email.html.erb index c50512453..06ceac74c 100644 --- a/app/views/mailers/notify_mailer/account_deletion_requested_email.html.erb +++ b/app/views/mailers/notify_mailer/account_deletion_requested_email.html.erb @@ -8,8 +8,7 @@

- Contact us at <%= ForemInstance.contact_email %> - if there is anything more we can help with. + <%= t("views.mailers.contact_mailto_html", contact_email: ForemInstance.contact_email) %>

diff --git a/app/views/mailers/notify_mailer/account_deletion_requested_email.text.erb b/app/views/mailers/notify_mailer/account_deletion_requested_email.text.erb index 58463bb29..c2db4ec77 100644 --- a/app/views/mailers/notify_mailer/account_deletion_requested_email.text.erb +++ b/app/views/mailers/notify_mailer/account_deletion_requested_email.text.erb @@ -1,7 +1,7 @@ Hi <%= @name %>, Your account deletion was requested. Please, visit this page: <%= user_confirm_destroy_url(@token) %> to destroy your account. The link will expire in 12 hours. -Contact us at <%= ForemInstance.contact_email %> if there is anything more we can help with. +<%= strip_tags t("views.mailers.contact_mailto_html", contact_email: ForemInstance.contact_email) %> Thanks, The <%= community_name %> Team diff --git a/app/views/mailers/notify_mailer/organization_deleted_email.html.erb b/app/views/mailers/notify_mailer/organization_deleted_email.html.erb index a71177e7a..810281a13 100644 --- a/app/views/mailers/notify_mailer/organization_deleted_email.html.erb +++ b/app/views/mailers/notify_mailer/organization_deleted_email.html.erb @@ -7,8 +7,7 @@

- Contact us at <%= ForemInstance.contact_email %> - if there is anything more we can help with. + <%= t("views.mailers.contact_mailto_html", contact_email: ForemInstance.contact_email) %>

diff --git a/app/views/mailers/notify_mailer/organization_deleted_email.text.erb b/app/views/mailers/notify_mailer/organization_deleted_email.text.erb index c5f47c0db..3b72ddd62 100644 --- a/app/views/mailers/notify_mailer/organization_deleted_email.text.erb +++ b/app/views/mailers/notify_mailer/organization_deleted_email.text.erb @@ -2,7 +2,7 @@ Hi <%= @name %>. Your organization <%= @org_name %> on <%= community_name %> has been successfully deleted. -Contact us at <%= ForemInstance.contact_email %> if there is anything more we can help with. +<%= strip_tags t("views.mailers.contact_mailto_html", contact_email: ForemInstance.contact_email) %> Thanks, The <%= community_name %> Team diff --git a/config/locales/en.yml b/config/locales/en.yml index 9f0d84df9..1f54cd312 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -204,4 +204,3 @@ en: short_with_yy: "%b %-d '%y" short_with_year: "%b %-e, %Y" stackexchange: "%b %e '%y" - tweet: "%H:%M %p - %d %b %Y" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 3cabac09b..edd685702 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -227,4 +227,3 @@ fr: short_with_yy: "%-e %b '%y" short_with_year: "%-e %b, %Y" stackexchange: "%b %e '%y" - tweet: "%H:%M %p - %d %b %Y" diff --git a/config/locales/lib/en.yml b/config/locales/lib/en.yml index b9feecfa3..150a08d8f 100644 --- a/config/locales/lib/en.yml +++ b/config/locales/lib/en.yml @@ -139,14 +139,10 @@ en: description: User ID of the Mascot account meta_keywords: description: 'List of valid keywords: comma separated, letters only e.g. engineering, development' - onboarding: - description: Background for onboarding splash page payment: description: 'Used for site-wide web monetization. See: https://github.com/forem/forem/pull/6345' periodic: description: Determines how often periodic email digests are sent (in days) - prefer_manual: - description: Always show suggested users as suggested people to follow even when auto-suggestion is available sidebar: description: Determines which tags are shown on the homepage right-hand sidebar placeholder: List of valid, comma-separated tags e.g. help,discuss,explainlikeimfive,meta @@ -157,9 +153,6 @@ en: tags: description: Determines which tags are suggested to new users during onboarding (comma separated, letters only) placeholder: 'List of valid tags: comma separated, letters only e.g. beginners,javascript,ruby,swift,kotlin' - users: - description: Determines which users are suggested to follow to new users during onboarding (comma separated, letters only). Please note that these users will be shown as a fallback if no recently-active commenters or producers can be suggested - placeholder: 'List of valid usernames: comma separated, letters only e.g. ben,jess,peter,maestromac,andy,liana' video: description: Secret key used to allow AWS video encoding through the VideoStatesController rate_limit: diff --git a/config/locales/lib/fr.yml b/config/locales/lib/fr.yml index d65b8876f..270695926 100644 --- a/config/locales/lib/fr.yml +++ b/config/locales/lib/fr.yml @@ -139,14 +139,10 @@ fr: description: User ID of the Mascot account meta_keywords: description: 'List of valid keywords: comma separated, letters only e.g. engineering, development' - onboarding: - description: Background for onboarding splash page payment: description: 'Used for site-wide web monetization. See: https://github.com/forem/forem/pull/6345' periodic: description: Determines how often periodic email digests are sent (in days) - prefer_manual: - description: Always show suggested users as suggested people to follow even when auto-suggestion is available sidebar: description: Determines which tags are shown on the homepage right-hand sidebar placeholder: List of valid, comma-separated tags e.g. help,discuss,explainlikeimfive,meta @@ -157,9 +153,6 @@ fr: tags: description: Determines which tags are suggested to new users during onboarding (comma separated, letters only) placeholder: 'List of valid tags: comma separated, letters only e.g. beginners,javascript,ruby,swift,kotlin' - users: - description: Determines which users are suggested to follow to new users during onboarding (comma separated, letters only). Please note that these users will be shown as a fallback if no recently-active commenters or producers can be suggested - placeholder: 'List of valid usernames: comma separated, letters only e.g. ben,jess,peter,maestromac,andy,liana' video: description: Secret key used to allow AWS video encoding through the VideoStatesController rate_limit: diff --git a/config/locales/mailers/en.yml b/config/locales/mailers/en.yml index 7bfff5a0a..e5b68370b 100644 --- a/config/locales/mailers/en.yml +++ b/config/locales/mailers/en.yml @@ -16,7 +16,7 @@ en: account_deleted: "%{community} - Account Deletion Confirmation" deletion_requested: "%{community} - Account Deletion Requested" trusted: Congrats! You're now a "trusted" user on %{community}! - moderator: 'Congrats! You''re now a moderator for #%{tag_name}' + moderator: "Congrats! You're now a moderator for #%{tag_name}" new_follower: just followed you on %{community} new_mention: "%{name} just mentioned you in their %{type}" org_deleted: "%{community} - Organization Deletion Confirmation" diff --git a/config/locales/mailers/fr.yml b/config/locales/mailers/fr.yml index 62dc7e44b..4ffc341da 100644 --- a/config/locales/mailers/fr.yml +++ b/config/locales/mailers/fr.yml @@ -16,7 +16,7 @@ fr: account_deleted: "%{community} - Confirmation de la suppression du compte" deletion_requested: "%{community} - Suppression du compte demandée" trusted: Félicitations ! Vous êtes maintenant un utilisateur "de confiance" sur %{community} ! - moderator: 'Félicitations ! Vous êtes le modérateur de #%{tag_name}' + moderator: "Congrats! You're now a moderator for #%{tag_name}" new_follower: vous suit sur %{community} new_mention: "%{name} vient de vous mentionner sur %{type}" org_deleted: "%{community} - Confirmation de la suppression de l'organisation" diff --git a/config/locales/models/en.yml b/config/locales/models/en.yml index b02c405cf..aeeb20068 100644 --- a/config/locales/models/en.yml +++ b/config/locales/models/en.yml @@ -82,8 +82,6 @@ en: reserved_word: '%s is a reserved word. Contact site admins for help registering your organization.' page: body_must_exist: must exist if body_html or body_json doesn't exist. - podcast: - slug_is_reserved: slug is reserved podcast_episode_appearance: provided_role_is_not_valid: provided role is not valid poll_skip: @@ -128,9 +126,7 @@ en: could_not_send: confirmation could not be sent. %{e_message} password_not_matched: doesn't match password confirmation has_been_banished: has been banished. - is_taken: '%{username} is taken.' user_could_not_be_saved: User could not be saved. %{e_message} - username_is_reserved: username is reserved user_block: cant_be_the_same: can't be the same as the blocked_id user_subscription: diff --git a/config/locales/models/fr.yml b/config/locales/models/fr.yml index a5fb39a21..9fc64cdc7 100644 --- a/config/locales/models/fr.yml +++ b/config/locales/models/fr.yml @@ -81,8 +81,6 @@ fr: reserved_word: "%s est un mot réservé. Contactez l'administrateur du site pour obtenir de l'aide pour enregistrer votre organisation." page: body_must_exist: doit exister si body_html ou body_json n'existe pas. - podcast: - slug_is_reserved: le slug est réservé. podcast_episode_appearance: provided_role_is_not_valid: le rôle fourni n'est pas valide. poll_skip: @@ -127,9 +125,7 @@ fr: could_not_send: la confirmation n'a pas pu être envoyée. %{e_message} password_not_matched: ne correspond pas à la confirmation du mot de passe. has_been_banished : a été banni. - is_taken: '%{username} est pris.' user_could_not_be_saved: L'utilisateur n'a pas pu être enregistré. %{e_message} - username_is_reserved: Le nom d'utilisateur est réservé. user_block: cant_be_the_same: ne peut pas être le même que le blocked_id user_subscription: diff --git a/config/locales/validators/fr.yml b/config/locales/validators/fr.yml index 66822c9cf..c6b68c4bc 100644 --- a/config/locales/validators/fr.yml +++ b/config/locales/validators/fr.yml @@ -13,7 +13,7 @@ fr: bio_too_long: La biographie est trop longue cross_model_slug_validator: is_taken: est déjà pris - is_invalid: is invalid - is_reserved: is reserved + is_invalid: est invalide + is_reserved: est réservé valid_domain_csv_validator: invalid_list_format: doit être une liste de domaines valides, séparés par des virgules. diff --git a/config/locales/views/misc/en.yml b/config/locales/views/misc/en.yml index 1e465a928..5920aafd6 100644 --- a/config/locales/views/misc/en.yml +++ b/config/locales/views/misc/en.yml @@ -46,6 +46,8 @@ en: preview: icon: App logo text: 'Preview:' + mailers: + contact_mailto_html: Contact us at %{contact_email} if there is anything more we can help with. onboardings: meta: title: Welcome to %{community} diff --git a/config/locales/views/misc/fr.yml b/config/locales/views/misc/fr.yml index dbe9970e1..0d0d0ce25 100644 --- a/config/locales/views/misc/fr.yml +++ b/config/locales/views/misc/fr.yml @@ -46,6 +46,8 @@ fr: preview: icon: App logo text: 'Preview:' + mailers: + contact_mailto_html: Contactez-nous à l'adresse %{contact_email} si nous pouvons vous aider davantage. onboardings: meta: title: Welcome to %{community}