diff options
author | Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com> | 2023-02-23 13:35:31 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-02-21 16:42:00 +0100 |
commit | e3d8edb7fc338ff4e060fe9b3bba8953ebde206e (patch) | |
tree | 99c4a46c679f2849c67b4429a588342ee3fe2853 /apps/files/src | |
parent | 6cd30463699fda1dc0b9c2e99f497bdef56a293e (diff) | |
download | nextcloud-server-e3d8edb7fc338ff4e060fe9b3bba8953ebde206e.tar.gz nextcloud-server-e3d8edb7fc338ff4e060fe9b3bba8953ebde206e.zip |
fix: rename 'edit locally' to 'open locally'
Replace "Edit" by "Open"
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/actions/openLocallyAction.spec.ts (renamed from apps/files/src/actions/editLocallyAction.spec.ts) | 14 | ||||
-rw-r--r-- | apps/files/src/actions/openLocallyAction.ts (renamed from apps/files/src/actions/editLocallyAction.ts) | 6 | ||||
-rw-r--r-- | apps/files/src/init.ts | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/apps/files/src/actions/editLocallyAction.spec.ts b/apps/files/src/actions/openLocallyAction.spec.ts index 07ccac5043d..860bd6233f4 100644 --- a/apps/files/src/actions/editLocallyAction.spec.ts +++ b/apps/files/src/actions/openLocallyAction.spec.ts @@ -7,7 +7,7 @@ import { beforeAll, beforeEach, describe, expect, test, vi } from 'vitest' import axios from '@nextcloud/axios' import * as nextcloudDialogs from '@nextcloud/dialogs' -import { action } from './editLocallyAction' +import { action } from './openLocallyAction' vi.mock('@nextcloud/auth') vi.mock('@nextcloud/axios') @@ -25,18 +25,18 @@ beforeAll(() => { (window as any).OCA = { Viewer: { open: vi.fn() } } }) -describe('Edit locally action conditions tests', () => { +describe('Open locally action conditions tests', () => { test('Default values', () => { expect(action).toBeInstanceOf(FileAction) expect(action.id).toBe('edit-locally') - expect(action.displayName([], view)).toBe('Edit locally') + expect(action.displayName([], view)).toBe('Open locally') expect(action.iconSvgInline([], view)).toMatch(/<svg.+<\/svg>/) expect(action.default).toBeUndefined() expect(action.order).toBe(25) }) }) -describe('Edit locally action enabled tests', () => { +describe('Open locally action enabled tests', () => { test('Enabled for file with UPDATE permission', () => { const file = new File({ id: 1, @@ -108,7 +108,7 @@ describe('Edit locally action enabled tests', () => { }) }) -describe('Edit locally action execute tests', () => { +describe('Open locally action execute tests', () => { let spyShowDialog beforeEach(() => { vi.resetAllMocks() @@ -116,7 +116,7 @@ describe('Edit locally action execute tests', () => { .mockImplementation(() => Promise.resolve()) }) - test('Edit locally opens proper URL', async () => { + test('Open locally opens proper URL', async () => { vi.spyOn(axios, 'post').mockImplementation(async () => ({ data: { ocs: { data: { token: 'foobar' } } }, })) @@ -143,7 +143,7 @@ describe('Edit locally action execute tests', () => { expect(windowOpenSpy).toBeCalledWith('nc://open/test@nextcloud.local/foobar.txt?token=foobar', '_self') }) - test('Edit locally fails and shows error', async () => { + test('Open locally fails and shows error', async () => { vi.spyOn(axios, 'post').mockImplementation(async () => ({})) const showError = vi.spyOn(nextcloudDialogs, 'showError') diff --git a/apps/files/src/actions/editLocallyAction.ts b/apps/files/src/actions/openLocallyAction.ts index 72770e9de70..a80cf0cbeed 100644 --- a/apps/files/src/actions/editLocallyAction.ts +++ b/apps/files/src/actions/openLocallyAction.ts @@ -19,7 +19,7 @@ const confirmLocalEditDialog = ( let callbackCalled = false return (new DialogBuilder()) - .setName(t('files', 'Edit file locally')) + .setName(t('files', 'Open file locally')) .setText(t('files', 'The file should now open on your device. If it doesn\'t, please check that you have the desktop app installed.')) .setButtons([ { @@ -31,7 +31,7 @@ const confirmLocalEditDialog = ( }, }, { - label: t('files', 'Edit online'), + label: t('files', 'Open online'), icon: IconWeb, type: 'primary', callback: () => { @@ -80,7 +80,7 @@ const openLocalClient = async function(path: string) { export const action = new FileAction({ id: 'edit-locally', - displayName: () => t('files', 'Edit locally'), + displayName: () => t('files', 'Open locally'), iconSvgInline: () => LaptopSvg, // Only works on single files diff --git a/apps/files/src/init.ts b/apps/files/src/init.ts index fd6533c6c23..492ffbb1915 100644 --- a/apps/files/src/init.ts +++ b/apps/files/src/init.ts @@ -6,7 +6,7 @@ import { addNewFileMenuEntry, registerDavProperty, registerFileAction } from '@n import { action as deleteAction } from './actions/deleteAction' import { action as downloadAction } from './actions/downloadAction' -import { action as editLocallyAction } from './actions/editLocallyAction' +import { action as editLocallyAction } from './actions/openLocallyAction.ts' import { action as favoriteAction } from './actions/favoriteAction' import { action as moveOrCopyAction } from './actions/moveOrCopyAction' import { action as openFolderAction } from './actions/openFolderAction' |