use project copy specific labels for copy options

pull/11400/head
ulferts 2 years ago
parent 5ed81dbb98
commit 034e86f4ac
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 2
      app/services/projects/copy/categories_dependent_service.rb
  2. 2
      app/services/projects/copy/members_dependent_service.rb
  3. 2
      app/services/projects/copy/overview_dependent_service.rb
  4. 2
      app/services/projects/copy/queries_dependent_service.rb
  5. 2
      app/services/projects/copy/wiki_page_attachments_dependent_service.rb
  6. 2
      app/services/projects/copy/work_package_attachments_dependent_service.rb
  7. 10
      config/locales/en.yml
  8. 2
      modules/storages/app/services/projects/copy/file_links_dependent_service.rb
  9. 2
      spec/features/projects/template_spec.rb

@ -29,7 +29,7 @@
module Projects::Copy module Projects::Copy
class CategoriesDependentService < Dependency class CategoriesDependentService < Dependency
def self.human_name def self.human_name
I18n.t(:label_work_package_category_plural) I18n.t(:'projects.copy.work_package_categories')
end end
def source_count def source_count

@ -29,7 +29,7 @@
module Projects::Copy module Projects::Copy
class MembersDependentService < Dependency class MembersDependentService < Dependency
def self.human_name def self.human_name
I18n.t(:label_member_plural) I18n.t(:'projects.copy.members')
end end
def source_count def source_count

@ -29,7 +29,7 @@
module Projects::Copy module Projects::Copy
class OverviewDependentService < Dependency class OverviewDependentService < Dependency
def self.human_name def self.human_name
I18n.t(:'overviews.label') I18n.t(:'projects.copy.overviews')
end end
protected protected

@ -29,7 +29,7 @@
module Projects::Copy module Projects::Copy
class QueriesDependentService < Dependency class QueriesDependentService < Dependency
def self.human_name def self.human_name
I18n.t(:label_query_plural) I18n.t(:'projects.copy.queries')
end end
def source_count def source_count

@ -31,7 +31,7 @@ module Projects::Copy
include ::Copy::Concerns::CopyAttachments include ::Copy::Concerns::CopyAttachments
def self.human_name def self.human_name
I18n.t(:label_wiki_page_attachments) I18n.t(:'projects.copy.wiki_page_attachments')
end end
def source_count def source_count

@ -31,7 +31,7 @@ module Projects::Copy
include ::Copy::Concerns::CopyAttachments include ::Copy::Concerns::CopyAttachments
def self.human_name def self.human_name
I18n.t(:label_work_package_attachments) I18n.t(:'projects.copy.work_package_attachments')
end end
def source_count def source_count

@ -238,6 +238,15 @@ en:
Enter one filename per line. Enter one filename per line.
projects: projects:
copy:
# Contains custom strings for options when copying a project that cannot be found elsewhere.
members: 'Project members'
overviews: 'Project overview'
queries: 'Work packages: saved views'
wiki_page_attachments: 'Wiki pages: attachments'
work_package_attachments: 'Work packages: attachments'
work_package_categories: 'Work packages: categories'
work_package_file_links: 'Work packages: file links'
delete: delete:
scheduled: "Deletion has been scheduled and is performed in the background. You will be notified of the result." scheduled: "Deletion has been scheduled and is performed in the background. You will be notified of the result."
schedule_failed: "Project cannot be deleted: %{errors}" schedule_failed: "Project cannot be deleted: %{errors}"
@ -1999,7 +2008,6 @@ en:
label_wiki_start: "Start page" label_wiki_start: "Start page"
label_work_package: "Work package" label_work_package: "Work package"
label_work_package_attachments: "Work package attachments" label_work_package_attachments: "Work package attachments"
label_work_package_file_link_plural: "Work package file links"
label_work_package_category_new: "New category" label_work_package_category_new: "New category"
label_work_package_category_plural: "Work package categories" label_work_package_category_plural: "Work package categories"
label_work_package_hierarchy: "Work package hierarchy" label_work_package_hierarchy: "Work package hierarchy"

@ -29,7 +29,7 @@
module Projects::Copy module Projects::Copy
class FileLinksDependentService < ::Copy::Dependency class FileLinksDependentService < ::Copy::Dependency
def self.human_name def self.human_name
I18n.t(:label_work_package_file_link_plural) I18n.t(:'projects.copy.work_package_file_links')
end end
def source_count def source_count

@ -124,7 +124,7 @@ describe 'Project templates', type: :feature, js: true do
expect(page).to have_selector('[data-qa-field-name="sendNotifications"]') expect(page).to have_selector('[data-qa-field-name="sendNotifications"]')
# And allows to deselect copying the members. # And allows to deselect copying the members.
uncheck 'Members' uncheck I18n.t(:'projects.copy.members')
page.find('button:not([disabled])', text: 'Save').click page.find('button:not([disabled])', text: 'Save').click

Loading…
Cancel
Save