From 262d1e124aa1b4b1b4177682906eedd40d04b686 Mon Sep 17 00:00:00 2001 From: Deep Sidhu Date: Tue, 4 Feb 2025 15:13:19 -0600 Subject: [PATCH] Added translations --- .../_edit_template_dialog.html.erb | 11 +++++------ config/locales/en.yml | 15 +++++++++++++++ config/locales/fr.yml | 7 +++++++ test/system/projects/samples_test.rb | 10 +++++----- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/app/views/shared/metadata_templates/_edit_template_dialog.html.erb b/app/views/shared/metadata_templates/_edit_template_dialog.html.erb index 057aa49bf0..156c42ac8d 100644 --- a/app/views/shared/metadata_templates/_edit_template_dialog.html.erb +++ b/app/views/shared/metadata_templates/_edit_template_dialog.html.erb @@ -1,5 +1,5 @@ <%= viral_dialog(open: open, size: :large) do |dialog| %> - <%= dialog.with_header(title: "Edit Template #{@metadata_template.name}") %> + <%= dialog.with_header(title: t("metadata_templates.edit_template_dialog.title")) %> <%= dialog.with_section do %> <%= turbo_frame_tag "metadata_template_error_alert" %> <%= turbo_frame_tag "metadata_template_dialog_content" do %> @@ -12,12 +12,11 @@ >
<%= viral_sortable_lists( - title: t("metadata_templates.new_template_dialog.metadata"), - description: t("metadata_templates.new_template_dialog.description") + description: t("metadata_templates.edit_template_dialog.description"), ) do |sortable_lists| %> <%= sortable_lists.with_list( id: "available", - title: t("metadata_templates.new_template_dialog.available"), + title: t("metadata_templates.edit_template_dialog.available"), list_items: @available_metadata_fields, group: "metadata_selection", container_classes: "block mb-1 pr-2 text-sm font-medium", @@ -25,7 +24,7 @@ ) %> <%= sortable_lists.with_list( id: "selected", - title: t("metadata_templates.new_template_dialog.selected"), + title: t("metadata_templates.edit_template_dialog.selected"), list_items: @current_template_fields, group: "metadata_selection", container_classes: "block mb-1 text-sm font-medium", @@ -53,7 +52,7 @@ data-viral--sortable-lists--two-lists-selection-target="field" >
- <%= form.submit "Update", + <%= form.submit t("metadata_templates.edit_template_dialog.update_button"), data: { turbo_frame: "_top", action: diff --git a/config/locales/en.yml b/config/locales/en.yml index 846e43131e..bb91579196 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -822,7 +822,11 @@ en: title: Add New Member metadata_templates: index: +<<<<<<< HEAD new_button: Add New Template +======= + edit_button: Edit Template +>>>>>>> 9f4aca9b8 (Added translations) subtitle: These are metadata templates for the group title: Metadata Templates new_subgroup: @@ -983,6 +987,13 @@ en: updated_at: Access Granted user_email: Username metadata_templates: + edit_template_dialog: + available: Available + description: Select the metadata fields for the template by moving the metadata fields from the available list to the selected list and vice versa. The template's fields ordering will be determined by the ordering of the selected list. + metadata: Metadata + selected: Selected + update_button: Update + title: Edit Metadata Template table: empty: description: There are no metadata templates associated with this %{namespace_type}. @@ -1327,7 +1338,11 @@ en: title: Add New Member metadata_templates: index: +<<<<<<< HEAD new_button: Add New Template +======= + edit_button: Edit Template +>>>>>>> 9f4aca9b8 (Added translations) subtitle: These are metadata templates for the project title: Metadata Templates new: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 0fea8ef880..b0303354f2 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -983,6 +983,13 @@ fr: updated_at: Access Granted user_email: Username metadata_templates: + edit_template_dialog: + available: Available + description: Select the metadata fields for the template by moving the metadata fields from the available list to the selected list and vice versa. The template's fields ordering will be determined by the ordering of the selected list. + metadata: Metadata + selected: Selected + update_button: Update + title: Edit Metadata Template table: empty: description: There are no metadata templates associated with this %{namespace_type}. diff --git a/test/system/projects/samples_test.rb b/test/system/projects/samples_test.rb index 91866da2a1..7b6dfb7ba6 100644 --- a/test/system/projects/samples_test.rb +++ b/test/system/projects/samples_test.rb @@ -1198,12 +1198,12 @@ class SamplesTest < ApplicationSystemTestCase click_on I18n.t('shared.samples.metadata.file_imports.dialog.submit_button') perform_enqueued_jobs only: [::Samples::MetadataImportJob] - ### ACTIONS END ### - - ### VERIFY START ### - assert_text I18n.t('shared.samples.metadata.file_imports.success.description') - click_on I18n.t('shared.samples.metadata.file_imports.success.ok_button') end + ### ACTIONS END ### + + ### VERIFY START ### + assert_text I18n.t('shared.samples.metadata.file_imports.success.description') + click_on I18n.t('shared.samples.metadata.file_imports.success.ok_button') within('#samples-table table thead tr') do # metadatafield3 and 4 added to header