Skip to content

Commit

Permalink
Added translations
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsidhu85 committed Feb 4, 2025
1 parent bfad392 commit 262d1e1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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 %>
Expand All @@ -12,20 +12,19 @@
>
<div class="grid gap-4">
<%= 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",
list_classes: "overflow-y-auto max-w-[356px] min-w-[356px] w-full",
) %>
<%= 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",
Expand Down Expand Up @@ -53,7 +52,7 @@
data-viral--sortable-lists--two-lists-selection-target="field"
></div>
<div>
<%= form.submit "Update",
<%= form.submit t("metadata_templates.edit_template_dialog.update_button"),
data: {
turbo_frame: "_top",
action:
Expand Down
15 changes: 15 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}.
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
Expand Down
10 changes: 5 additions & 5 deletions test/system/projects/samples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 262d1e1

Please sign in to comment.