From 0a3734894a0eef5e52e364919397839d55bf9018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Mon, 21 Oct 2024 08:36:16 +0200 Subject: [PATCH] some locales fixes around publication status (#2351) --- .../agenda/events/show/_metadata.html.erb | 2 +- .../websites/pages/_filters.html.erb | 2 +- .../websites/pages/show/_metadata.html.erb | 4 ++-- .../projects/show/_metadata.html.erb | 2 +- .../websites/posts/index.html.erb | 4 ++-- config/locales/communication/en.yml | 22 +++++++++++++------ config/locales/communication/fr.yml | 22 +++++++++++++------ 7 files changed, 37 insertions(+), 21 deletions(-) diff --git a/app/views/admin/communication/websites/agenda/events/show/_metadata.html.erb b/app/views/admin/communication/websites/agenda/events/show/_metadata.html.erb index 319010f3d..b8a4ec6fe 100644 --- a/app/views/admin/communication/websites/agenda/events/show/_metadata.html.erb +++ b/app/views/admin/communication/websites/agenda/events/show/_metadata.html.erb @@ -1,6 +1,6 @@ <%= osuny_panel t('metadata'), small: true do %> <%= @l10n.published ? Communication::Website::Agenda::Event.human_attribute_name(:published) - : t('admin.communication.website.agenda.events.draft') %> + : t('admin.communication.website.agenda.event.localizations.draft') %> <% if @event.categories.any? %> <% category_names = @event.categories.map { |category| category.to_s_in(current_language) } %> <%= t( diff --git a/app/views/admin/communication/websites/pages/_filters.html.erb b/app/views/admin/communication/websites/pages/_filters.html.erb index 1b687c5c1..41f386be9 100644 --- a/app/views/admin/communication/websites/pages/_filters.html.erb +++ b/app/views/admin/communication/websites/pages/_filters.html.erb @@ -10,7 +10,7 @@ <%= render_filter f, :select, :for_published, - label: t('filters.attributes.element', element: t('admin.communication.website.pages.published_status').downcase), + label: t('filters.attributes.element', element: t('admin.communication.website.page.localizations.published_status').downcase), collection: [{ to_s: t('true'), id: 'true' }, { to_s: t('false'), id: 'false' }] %> diff --git a/app/views/admin/communication/websites/pages/show/_metadata.html.erb b/app/views/admin/communication/websites/pages/show/_metadata.html.erb index 0d884a3db..86e31de57 100644 --- a/app/views/admin/communication/websites/pages/show/_metadata.html.erb +++ b/app/views/admin/communication/websites/pages/show/_metadata.html.erb @@ -12,8 +12,8 @@ <% end %> <% end %> - <%= @l10n.published ? t('admin.communication.website.pages.published') - : t('admin.communication.website.pages.draft') %> + <%= @l10n.published ? t('admin.communication.website.page.localizations.published') + : t('admin.communication.website.page.localizations.draft') %> <%= t('admin.communication.website.pages.in_full_width') if @page.full_width %> diff --git a/app/views/admin/communication/websites/portfolio/projects/show/_metadata.html.erb b/app/views/admin/communication/websites/portfolio/projects/show/_metadata.html.erb index 368f2db0b..80e6e4da1 100644 --- a/app/views/admin/communication/websites/portfolio/projects/show/_metadata.html.erb +++ b/app/views/admin/communication/websites/portfolio/projects/show/_metadata.html.erb @@ -1,6 +1,6 @@ <%= osuny_panel t('metadata'), small: true do %> <%= @l10n.published ? Communication::Website::Portfolio::Project::Localization.human_attribute_name(:published) - : t('admin.communication.website.portfolio.projects.draft') %> + : t('admin.communication.website.portfolio.project.localizations.draft') %> <% if @project.categories.any? %> <% category_names = @project.categories.map { |category| category.to_s_in(current_language) } %> diff --git a/app/views/admin/communication/websites/posts/index.html.erb b/app/views/admin/communication/websites/posts/index.html.erb index 6fdb0b811..61c158ebe 100644 --- a/app/views/admin/communication/websites/posts/index.html.erb +++ b/app/views/admin/communication/websites/posts/index.html.erb @@ -20,8 +20,8 @@ </div> <div class="col-auto me-3"> <select name="published" class="form-select"> - <option value="false"><%= t('communication.website.posts.unpublished') %></option> - <option value="true"><%= t('communication.website.posts.published') %></option> + <option value="false"><%= t('communication.website.post.localizations.unpublished') %></option> + <option value="true"><%= t('communication.website.post.localizations.published') %></option> </select> </div> <div class="col-auto me-3"> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 12955916f..feacbb492 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -349,8 +349,10 @@ en: languages: Languages website: agenda: + event: + localizations: + draft: Draft events: - draft: Draft formatted_time_zone: "Time zone: %{time_zone}" none: No event yet confirm_localization: @@ -369,17 +371,19 @@ en: localizations: fallback_hint_html: "Leave blank to use the default value: <i>%{master_value}</i>" title: Internationalization + page: + localizations: + draft: Draft + published: Published + published_status: Publication status pages: as_list: See as a list as_tree: Organize structure delete_special_page_notice: Can't delete this page - draft: Draft duplicate_special_page_notice: Can't duplicate this page full_width_status: Full width in: in in_full_width: full width - published: Published - published_status: Publication status show: Show page special_pages: organization: @@ -391,8 +395,10 @@ en: permalinks: creation_error: "Error during the creation. Does the given path have the correct format?" portfolio: + project: + localizations: + draft: Draft projects: - draft: Draft in: in %{categories} none: No project yet post: @@ -531,12 +537,14 @@ en: teacher: slug: teachers title: Teachers + post: + localizations: + published: Published + unpublished: Unpublished posts: new_curation: New curation none: No posts yet. - published: Published successful_batch_update: Posts have been updated succesfully - unpublished: Unpublished security: Security see_all: See the full list (%{number} elements) curation: diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 04dabf032..d442a45b5 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -349,8 +349,10 @@ fr: languages: Langues website: agenda: + event: + localizations: + draft: Brouillon events: - draft: Brouillon formatted_time_zone: "Fuseau horaire : %{time_zone}" none: Pas encore d'événements confirm_localization: @@ -369,17 +371,19 @@ fr: localizations: fallback_hint_html: "Laisser vide pour utiliser la valeur par défaut : <i>%{master_value}</i>" title: Internationalisation + page: + localizations: + draft: Brouillon + published: Publiée + published_status: État de publication pages: as_list: Voir en liste as_tree: Organiser l'arborescence delete_special_page_notice: Impossible de supprimer cette page - draft: Brouillon duplicate_special_page_notice: Impossible de dupliquer cette page full_width_status: Pleine largeur in: dans in_full_width: en pleine largeur - published: Publiée - published_status: État de publication show: Voir la page special_pages: organization: @@ -391,8 +395,10 @@ fr: permalinks: creation_error: "Erreur lors de la création. Le chemin renseigné est-il au bon format ?" portfolio: + project: + localizations: + draft: Brouillon projects: - draft: Brouillon in: dans %{categories} none: Pas encore de projet post: @@ -531,12 +537,14 @@ fr: teacher: slug: equipe-pedagogique title: Équipe pédagogique + post: + localizations: + published: Publiée + unpublished: Non publiée posts: new_curation: Nouvelle curation none: Il n'y a pas encore d'actualités. - published: Publiée successful_batch_update: Les actualités ont bien été mises à jour - unpublished: Non publiée security: Sécurité see_all: Voir la liste complète (%{number} éléments) curation: -- GitLab