Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#48835] Rename copy to clipboard button to Copy link to clipboard

Dombi Attila294af83c2bf8
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c0947be4e76..6213fde3fb9 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1148,6 +1148,7 @@ en:
button_continue: "Continue"
button_copy: "Copy"
button_copy_to_clipboard: "Copy to clipboard"
+ button_copy_link_to_clipboard: "Copy link to clipboard"
button_copy_and_follow: "Copy and follow"
button_create: "Create"
button_create_and_continue: "Create and continue"
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 319c043a7fd..181814afd96 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -82,6 +82,7 @@ en:
button_continue: "Continue"
button_copy: "Copy"
button_copy_to_clipboard: "Copy to clipboard"
+ button_copy_link_to_clipboard: "Copy link to clipboard"
button_copy_to_other_project: "Copy to other project"
button_custom-fields: "Custom fields"
button_delete: "Delete"
diff --git a/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts b/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
index 43031447f41..7f908a3ae14 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
@@ -105,7 +105,7 @@ export class WorkPackageContextMenuHelperService {
public linkForAction(workPackage:WorkPackageResource, action:WorkPackageAction):string|undefined {
let link:string|undefined;
switch (action.key) {
- case 'copy_to_clipboard':
+ case 'copy_link_to_clipboard':
link = this.PathHelper.workPackageShortPath(workPackage.id as string);
break;
default:
diff --git a/frontend/src/app/features/work-packages/services/work-package-authorization.service.ts b/frontend/src/app/features/work-packages/services/work-package-authorization.service.ts
index 8844752d1d9..88b8a708441 100644
--- a/frontend/src/app/features/work-packages/services/work-package-authorization.service.ts
+++ b/frontend/src/app/features/work-packages/services/work-package-authorization.service.ts
@@ -48,7 +48,7 @@ export class WorkPackageAuthorization {
case 'copy':
link = this.copyLink();
break;
- case 'copy_to_clipboard':
+ case 'copy_link_to_clipboard':
link = this.shortLink();
break;
case 'copy_to_other_project':
diff --git a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts
index 7524fa3bbde..2dfd8da3798 100644
--- a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts
+++ b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts
@@ -74,7 +74,7 @@ export class WorkPackageSingleContextMenuDirective extends OpContextMenuTrigger
// do nothing, the user closed without changes
});
break;
- case 'copy_to_clipboard': {
+ case 'copy_link_to_clipboard': {
const url = new URL(String(link), window.location.origin);
this.copyToClipboardService.copy(url.toString());
break;
diff --git a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts
index d3c0ad51519..39ec6c6fb9a 100644
--- a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts
+++ b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts
@@ -15,7 +15,7 @@ export const PERMITTED_CONTEXT_MENU_ACTIONS:WorkPackageAction[] = [
link: 'copy',
},
{
- key: 'copy_to_clipboard',
+ key: 'copy_link_to_clipboard',
icon: 'icon-clipboard',
link: 'id',
},
diff --git a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts
index d0a6537e25b..ffa2dec3f56 100644
--- a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts
+++ b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts
@@ -96,7 +96,7 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler {
this.copySelectedWorkPackages(link!);
break;
- case 'copy_to_clipboard': {
+ case 'copy_link_to_clipboard': {
const url = new URL(String(link), window.location.origin);
this.copyToClipboardService.copy(url.toString());
break;
diff --git a/spec/features/work_packages/bulk/copy_work_package_spec.rb b/spec/features/work_packages/bulk/copy_work_package_spec.rb
index 466c5b10473..a6aa47a3833 100644
--- a/spec/features/work_packages/bulk/copy_work_package_spec.rb
+++ b/spec/features/work_packages/bulk/copy_work_package_spec.rb
@@ -240,7 +240,7 @@ RSpec.describe 'Copy work packages through Rails view', js: true do
before do
wp_table.expect_work_package_count 2
context_menu.open_for work_package
- context_menu.choose 'Copy to clipboard'
+ context_menu.choose 'Copy link to clipboard'
end
it 'successfully copies the short url of the work package' do
diff --git a/spec/features/work_packages/details/context_menu_spec.rb b/spec/features/work_packages/details/context_menu_spec.rb
index d872dc4137f..1145d71dae1 100644
--- a/spec/features/work_packages/details/context_menu_spec.rb
+++ b/spec/features/work_packages/details/context_menu_spec.rb
@@ -20,7 +20,7 @@ RSpec.describe 'Work package single context menu', js: true do
end
it 'successfully copies the short url of the work package' do
- find('.menu-item', text: 'Copy to clipboard', exact_text: true).click
+ find('.menu-item', text: 'Copy link to clipboard', exact_text: true).click
# We cannot access the navigator.clipboard from a headless browser.
# This test makes sure the copy to clipboard logic is working,