Skip to content

Commit 6bcbc3a

Browse files
committed
fix(l10n): Less jargon in source strings
This removes: - “enable” for settings - “settings” for settings sections - “all” when there is no obvious subset of items - “show” and “open” for navigation actions - “changes” for applying/discarding - “to clipboard” when copying - Explaining things that cannot happen - Explaining things twice, right below each other - Redundant toast notifications - Unnecessary technical jargon - Text that sounds like marketing copy and serves no other purpose Signed-off-by: kramo <git@kramo.page>
1 parent 6bc6ed9 commit 6bcbc3a

File tree

26 files changed

+66
-90
lines changed

26 files changed

+66
-90
lines changed

apps/federatedfilesharing/src/components/PersonalSettings.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ export default {
146146
</a>`
147147
},
148148
copyLinkTooltip() {
149-
return this.isCopied ? t('federatedfilesharing', 'Cloud ID copied to the clipboard') : t('federatedfilesharing', 'Copy to clipboard')
149+
return this.isCopied ? t('federatedfilesharing', 'Cloud ID copied') : t('federatedfilesharing', 'Copy')
150150
},
151151
},
152152
methods: {
153153
async copyCloudId(): Promise<void> {
154154
try {
155155
await navigator.clipboard.writeText(this.cloudId)
156-
showSuccess(t('federatedfilesharing', 'Cloud ID copied to the clipboard'))
156+
showSuccess(t('federatedfilesharing', 'Cloud ID copied'))
157157
} catch (e) {
158158
// no secure context or really old browser - need a fallback
159159
window.prompt(t('federatedfilesharing', 'Clipboard not available. Please copy the cloud ID manually.'), this.reference)

apps/files/src/actions/deleteAction.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
import { showInfo } from '@nextcloud/dialogs'
65
import { Permission, Node, View, FileAction } from '@nextcloud/files'
76
import { loadState } from '@nextcloud/initial-state'
8-
import { translate as t } from '@nextcloud/l10n'
97
import PQueue from 'p-queue'
108

119
import CloseSvg from '@mdi/svg/svg/close.svg?raw'
@@ -64,7 +62,6 @@ export const action = new FileAction({
6462

6563
// If the user cancels the deletion, we don't want to do anything
6664
if (confirm === false) {
67-
showInfo(t('files', 'Deletion cancelled'))
6865
return null
6966
}
7067

@@ -88,7 +85,6 @@ export const action = new FileAction({
8885

8986
// If the user cancels the deletion, we don't want to do anything
9087
if (confirm === false) {
91-
showInfo(t('files', 'Deletion cancelled'))
9288
return Promise.all(nodes.map(() => null))
9389
}
9490

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ export const handleCopyMoveNodeTo = async (node: Node, destination: Folder, meth
158158
}
159159
} catch (error) {
160160
// User cancelled
161-
showError(t('files', 'Move cancelled'))
162161
return
163162
}
164163
}
@@ -330,7 +329,6 @@ export const action = new FileAction({
330329
return false
331330
}
332331
if (result === false) {
333-
showInfo(t('files', 'Cancelled move or copy of "{filename}".', { filename: node.displayname }))
334332
return null
335333
}
336334

@@ -352,10 +350,6 @@ export const action = new FileAction({
352350
const result = await openFilePickerForAction(action, dir, nodes)
353351
// Handle cancellation silently
354352
if (result === false) {
355-
showInfo(nodes.length === 1
356-
? t('files', 'Cancelled move or copy of "{filename}".', { filename: nodes[0].displayname })
357-
: t('files', 'Cancelled move or copy operation'),
358-
)
359353
return nodes.map(() => null)
360354
}
361355

apps/files/src/actions/sidebarAction.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('Open sidebar action conditions tests', () => {
1717
test('Default values', () => {
1818
expect(action).toBeInstanceOf(FileAction)
1919
expect(action.id).toBe('details')
20-
expect(action.displayName([], view)).toBe('Open details')
20+
expect(action.displayName([], view)).toBe('Details')
2121
expect(action.iconSvgInline([], view)).toMatch(/<svg.+<\/svg>/)
2222
expect(action.default).toBeUndefined()
2323
expect(action.order).toBe(-50)

apps/files/src/actions/sidebarAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const ACTION_DETAILS = 'details'
1616

1717
export const action = new FileAction({
1818
id: ACTION_DETAILS,
19-
displayName: () => t('files', 'Open details'),
19+
displayName: () => t('files', 'Details'),
2020
iconSvgInline: () => InformationSvg,
2121

2222
// Sidebar currently supports user folder only, /files/USER

apps/files/src/components/FilesListTableHeaderActions.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,16 @@ export default defineComponent({
305305
return
306306
}
307307
308-
showError(this.t('files', '"{displayName}" failed on some elements', { displayName }))
308+
showError(this.t('files', '{displayName}: failed on some elements', { displayName }))
309309
return
310310
}
311311
312312
// Show success message and clear selection
313-
showSuccess(this.t('files', '"{displayName}" batch action executed successfully', { displayName }))
313+
showSuccess(this.t('files', '{displayName}: done', { displayName }))
314314
this.selectionStore.reset()
315315
} catch (e) {
316316
logger.error('Error while executing action', { action, e })
317-
showError(this.t('files', '"{displayName}" action failed', { displayName }))
317+
showError(this.t('files', '{displayName}: failed', { displayName }))
318318
} finally {
319319
// Remove loading markers
320320
this.loading = null

apps/files/src/components/FilesNavigationSearch.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ const isSearchView = computed(() => currentView.value.id === VIEW_ID)
5555
*/
5656
const searchLabel = computed(() => {
5757
if (searchStore.scope === 'globally') {
58-
return t('files', 'Search globally by filename')
58+
return t('files', 'Search everywhere')
5959
}
60-
return t('files', 'Search here by filename')
60+
return t('files', 'Search this location')
6161
})
6262
</script>
6363

@@ -72,13 +72,13 @@ const searchLabel = computed(() => {
7272
<template #icon>
7373
<NcIconSvgWrapper :path="mdiMagnify" />
7474
</template>
75-
{{ t('files', 'Filter and search from this location') }}
75+
{{ t('files', 'Search this location') }}
7676
</NcActionButton>
7777
<NcActionButton close-after-click @click="searchStore.scope = 'globally'">
7878
<template #icon>
7979
<NcIconSvgWrapper :path="mdiSearchWeb" />
8080
</template>
81-
{{ t('files', 'Search globally') }}
81+
{{ t('files', 'Search everywhere') }}
8282
</NcActionButton>
8383
</NcActions>
8484
</template>

apps/files/src/filters/TypeFilter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const getTypePresets = async () => [
7373
{
7474
id: 'image',
7575
// TRANSLATORS: This is for filtering files, e.g. PNG or JPEG, so photos, drawings, or images in general
76-
label: t('files', 'Photos and images'),
76+
label: t('files', 'Images'),
7777
icon: svgImage,
7878
mime: ['image'],
7979
},

apps/files/src/newMenu/newFolder.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { basename } from 'path'
88
import { emit } from '@nextcloud/event-bus'
99
import { getCurrentUser } from '@nextcloud/auth'
1010
import { Permission, Folder } from '@nextcloud/files'
11-
import { showError, showInfo, showSuccess } from '@nextcloud/dialogs'
11+
import { showError, showSuccess } from '@nextcloud/dialogs'
1212
import { translate as t } from '@nextcloud/l10n'
1313
import axios from '@nextcloud/axios'
1414

@@ -51,7 +51,6 @@ export const entry = {
5151
async handler(context: Folder, content: Node[]) {
5252
const name = await newNodeName(t('files', 'New folder'), content)
5353
if (name === null) {
54-
showInfo(t('files', 'New folder creation cancelled'))
5554
return
5655
}
5756
try {

apps/files/src/utils/actionUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ export const executeAction = async (action: FileAction) => {
5959
}
6060

6161
if (success) {
62-
showSuccess(t('files', '"{displayName}" action executed successfully', { displayName }))
62+
showSuccess(t('files', '{displayName}: done', { displayName }))
6363
return
6464
}
65-
showError(t('files', '"{displayName}" action failed', { displayName }))
65+
showError(t('files', '{displayName}: failed', { displayName }))
6666
} catch (error) {
6767
logger.error('Error while executing action', { action, error })
68-
showError(t('files', '"{displayName}" action failed', { displayName }))
68+
showError(t('files', '{displayName}: failed', { displayName }))
6969
} finally {
7070
// Reset the loading marker
7171
Vue.set(currentNode, 'status', undefined)

0 commit comments

Comments
 (0)