Skip to content

Commit 72e1f3c

Browse files
authored
Merge pull request #11381 from nextcloud/feat/improve-text-naming
feat: rename mailbox to folder
2 parents 5d4a2be + 9287321 commit 72e1f3c

20 files changed

+74
-74
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default {
6767
} catch (error) {
6868
matchError(error, {
6969
[MailboxLockedError.name](error) {
70-
logger.info('Background sync failed because a mailbox is locked', { error })
70+
logger.info('Background sync failed because a folder is locked', { error })
7171
},
7272
default(error) {
7373
logger.error('Background sync failed: ' + error.message, { error })

src/components/AccountDefaultsSettings.vue

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
return mb.databaseId
7272
},
7373
async set(draftsMailboxId) {
74-
logger.debug('setting drafts mailbox to ' + draftsMailboxId)
74+
logger.debug('setting drafts folder to ' + draftsMailboxId)
7575
this.saving = true
7676
try {
7777
await this.mainStore.patchAccount({
@@ -81,7 +81,7 @@ export default {
8181
},
8282
})
8383
} catch (error) {
84-
logger.error('could not set drafts mailbox', {
84+
logger.error('could not set drafts folder', {
8585
error,
8686
})
8787
} finally {
@@ -98,7 +98,7 @@ export default {
9898
return mb.databaseId
9999
},
100100
async set(sentMailboxId) {
101-
logger.debug('setting sent mailbox to ' + sentMailboxId)
101+
logger.debug('setting sent folder to ' + sentMailboxId)
102102
this.saving = true
103103
try {
104104
await this.mainStore.patchAccount({
@@ -108,7 +108,7 @@ export default {
108108
},
109109
})
110110
} catch (error) {
111-
logger.error('could not set sent mailbox', {
111+
logger.error('could not set sent folder', {
112112
error,
113113
})
114114
} finally {
@@ -125,7 +125,7 @@ export default {
125125
return mb.databaseId
126126
},
127127
async set(trashMailboxId) {
128-
logger.debug('setting trash mailbox to ' + trashMailboxId)
128+
logger.debug('setting trash folder to ' + trashMailboxId)
129129
this.saving = true
130130
try {
131131
await this.mainStore.patchAccount({
@@ -135,7 +135,7 @@ export default {
135135
},
136136
})
137137
} catch (error) {
138-
logger.error('could not set trash mailbox', {
138+
logger.error('could not set trash folder', {
139139
error,
140140
})
141141
} finally {
@@ -152,7 +152,7 @@ export default {
152152
return mb.databaseId
153153
},
154154
async set(archiveMailboxId) {
155-
logger.debug('setting archive mailbox to ' + archiveMailboxId)
155+
logger.debug('setting archive folder to ' + archiveMailboxId)
156156
this.saving = true
157157
try {
158158
await this.mainStore.patchAccount({
@@ -162,7 +162,7 @@ export default {
162162
},
163163
})
164164
} catch (error) {
165-
logger.error('could not set archive mailbox', {
165+
logger.error('could not set archive folder', {
166166
error,
167167
})
168168
} finally {
@@ -179,7 +179,7 @@ export default {
179179
return mb.databaseId
180180
},
181181
async set(junkMailboxId) {
182-
logger.debug('setting junk mailbox to ' + junkMailboxId)
182+
logger.debug('setting junk folder to ' + junkMailboxId)
183183
this.saving = true
184184
try {
185185
await this.mainStore.patchAccount({
@@ -189,7 +189,7 @@ export default {
189189
},
190190
})
191191
} catch (error) {
192-
logger.error('could not set junk mailbox', {
192+
logger.error('could not set junk folder', {
193193
error,
194194
})
195195
} finally {
@@ -206,7 +206,7 @@ export default {
206206
return mb.databaseId
207207
},
208208
async set(snoozeMailboxId) {
209-
logger.debug('setting snooze mailbox to ' + snoozeMailboxId)
209+
logger.debug('setting snooze folder to ' + snoozeMailboxId)
210210
this.saving = true
211211
try {
212212
await this.mainStore.patchAccount({
@@ -216,7 +216,7 @@ export default {
216216
},
217217
})
218218
} catch (error) {
219-
logger.error('could not set snooze mailbox', {
219+
logger.error('could not set snooze folder', {
220220
error,
221221
})
222222
} finally {

src/components/AccountSettings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
:account="account" />
9595
</div>
9696
</AppSettingsSection>
97-
<AppSettingsSection id="mailbox_search" :name="t('mail', 'Mailbox search')">
97+
<AppSettingsSection id="mailbox_search" :name="t('mail', 'Folder search')">
9898
<SearchSettings :account="account" />
9999
</AppSettingsSection>
100100
</AppSettingsDialog>

src/components/EmptyMailbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- SPDX-License-Identifier: AGPL-3.0-or-later
44
-->
55
<template>
6-
<NcEmptyContent :name="t('mail', 'No messages in this mailbox')">
6+
<NcEmptyContent :name="t('mail', 'No messages in this folder')">
77
<template #icon>
88
<IconMail :size="65" />
99
</template>

src/components/Envelope.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export default {
810810
} catch (error) {
811811
showError(await matchError(error, {
812812
[NoTrashMailboxConfiguredError.getName()]() {
813-
return t('mail', 'No trash mailbox configured')
813+
return t('mail', 'No trash folder configured')
814814
},
815815
default(error) {
816816
logger.error('could not delete message', error)

src/components/EnvelopeList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export default {
430430
})).catch(async error => {
431431
showError(await matchError(error, {
432432
[NoTrashMailboxConfiguredError.getName()]() {
433-
return t('mail', 'No trash mailbox configured')
433+
return t('mail', 'No trash folder configured')
434434
},
435435
default(error) {
436436
logger.error('could not delete message', error)

src/components/Mailbox.vue

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<template>
77
<div :class="{'empty-content': (!hasMessages && !loadingEnvelopes) || error}">
88
<Error v-if="error"
9-
:error="t('mail', 'Could not open mailbox')"
9+
:error="t('mail', 'Could not open folder')"
1010
message=""
1111
role="alert" />
1212
<LoadingSkeleton v-else-if="loadingEnvelopes" :number-of-lines="20" />
1313
<Loading v-else-if="loadingCacheInitialization"
1414
:hint="t('mail', 'Loading messages …')"
15-
:slow-hint="t('mail', 'Indexing your messages. This can take a bit longer for larger mailboxes.')" />
15+
:slow-hint="t('mail', 'Indexing your messages. This can take a bit longer for larger folders.')" />
1616
<EmptyMailboxSection v-else-if="isPriorityInbox && !hasMessages" key="empty" />
1717
<EmptyMailbox v-else-if="!hasMessages" key="empty" />
1818
<EnvelopeList v-else
@@ -131,7 +131,7 @@ export default {
131131
mailbox() {
132132
this.loadEnvelopes()
133133
.then(() => {
134-
logger.debug(`syncing mailbox ${this.mailbox.databaseId} (${this.query}) after mailbox change`)
134+
logger.debug(`syncing mailbox ${this.mailbox.databaseId} (${this.query}) after folder change`)
135135
this.sync(false)
136136
})
137137
},
@@ -155,7 +155,7 @@ export default {
155155
}
156156
157157
await this.loadEnvelopes()
158-
logger.debug(`syncing mailbox ${this.mailbox.databaseId} (${this.searchQuery}) after mount`)
158+
logger.debug(`syncing folder ${this.mailbox.databaseId} (${this.searchQuery}) after mount`)
159159
await this.sync(false)
160160
161161
await this.prefetchOtherMailboxes()
@@ -174,7 +174,7 @@ export default {
174174
this.loadingCacheInitialization = true
175175
this.error = false
176176
177-
logger.debug(`syncing mailbox ${this.mailbox.databaseId} (${this.query}) during cache initalization`)
177+
logger.debug(`syncing folder ${this.mailbox.databaseId} (${this.query}) during cache initalization`)
178178
this.sync(true)
179179
.then(() => {
180180
this.loadingCacheInitialization = false
@@ -183,7 +183,7 @@ export default {
183183
})
184184
},
185185
async loadEnvelopes() {
186-
logger.debug(`Fetching envelopes for mailbox ${this.mailbox.databaseId} (${this.searchQuery})`, this.mailbox)
186+
logger.debug(`Fetching envelopes for folder ${this.mailbox.databaseId} (${this.searchQuery})`, this.mailbox)
187187
if (!this.syncedMailboxes.has(this.mailbox.databaseId)) {
188188
// Only trigger skeleton if we didn't sync envelopes yet
189189
this.loadingEnvelopes = true
@@ -223,12 +223,12 @@ export default {
223223
try {
224224
await this.initializeCache()
225225
} catch (error) {
226-
logger.error(`Could not initialize cache of mailbox ${this.mailbox.databaseId} (${this.searchQuery})`, { error })
226+
logger.error(`Could not initialize cache of folder ${this.mailbox.databaseId} (${this.searchQuery})`, { error })
227227
this.error = error
228228
}
229229
},
230230
default: (error) => {
231-
logger.error(`Could not fetch envelopes of mailbox ${this.mailbox.databaseId} (${this.searchQuery})`, { error })
231+
logger.error(`Could not fetch envelopes of folder ${this.mailbox.databaseId} (${this.searchQuery})`, { error })
232232
this.loadingEnvelopes = false
233233
this.error = error
234234
},
@@ -276,14 +276,14 @@ export default {
276276
limit: this.initialPageSize,
277277
})
278278
this.syncedMailboxes.add(mailbox.databaseId)
279-
logger.debug(`Prefetched ${envelopes.length} envelopes for mailbox ${mailbox.displayName} (${mailbox.databaseId})`)
279+
logger.debug(`Prefetched ${envelopes.length} envelopes for folder ${mailbox.displayName} (${mailbox.databaseId})`)
280280
} catch (error) {
281281
if (error instanceof MailboxNotCachedError) {
282282
// Just ignore
283283
continue
284284
}
285285
286-
logger.error(`Failed to prefetch envelopes for mailbox ${mailbox.displayName} (${mailbox.databaseId}): ${error}`, {
286+
logger.error(`Failed to prefetch envelopes for folder ${mailbox.displayName} (${mailbox.databaseId}): ${error}`, {
287287
error,
288288
})
289289
}
@@ -359,7 +359,7 @@ export default {
359359
360360
showError(await matchError(error, {
361361
[NoTrashMailboxConfiguredError.getName()]() {
362-
return t('mail', 'No trash mailbox configured')
362+
return t('mail', 'No trash folder configured')
363363
},
364364
default() {
365365
return t('mail', 'Could not delete message')
@@ -372,7 +372,7 @@ export default {
372372
logger.debug('archiving via shortcut')
373373
374374
if (this.account.archiveMailboxId === null) {
375-
showWarning(t('mail', 'To archive a message please configure an archive mailbox in account settings'))
375+
showWarning(t('mail', 'To archive a message please configure an archive folder in account settings'))
376376
return
377377
}
378378
@@ -382,7 +382,7 @@ export default {
382382
}
383383
384384
if (env.mailboxId === this.account.archiveMailboxId) {
385-
logger.debug('message is already in archive mailbox')
385+
logger.debug('message is already in archive folder')
386386
return
387387
}
388388
@@ -412,7 +412,7 @@ export default {
412412
)
413413
break
414414
case 'refresh':
415-
logger.debug(`syncing mailbox ${this.mailbox.databaseId} (${this.searchQuery}) per shortcut`)
415+
logger.debug(`syncing folder ${this.mailbox.databaseId} (${this.searchQuery}) per shortcut`)
416416
this.sync(false)
417417
418418
break
@@ -441,7 +441,7 @@ export default {
441441
},
442442
async sync(init = false) {
443443
if (this.refreshing) {
444-
logger.debug(`already sync'ing mailbox ${this.mailbox.databaseId} (${this.searchQuery}), aborting`, { init })
444+
logger.debug(`already sync'ing folder ${this.mailbox.databaseId} (${this.searchQuery}), aborting`, { init })
445445
return
446446
}
447447
@@ -455,7 +455,7 @@ export default {
455455
} catch (error) {
456456
matchError(error, {
457457
[MailboxLockedError.getName()](error) {
458-
logger.info('Background sync failed because the mailbox is locked', { error, init })
458+
logger.info('Background sync failed because the folder is locked', { error, init })
459459
},
460460
default(error) {
461461
logger.error('Could not sync envelopes: ' + error.message, { error, init })
@@ -464,7 +464,7 @@ export default {
464464
throw error
465465
} finally {
466466
this.refreshing = false
467-
logger.debug(`finished sync'ing mailbox ${this.mailbox.databaseId} (${this.searchQuery})`, { init })
467+
logger.debug(`finished sync'ing folder ${this.mailbox.databaseId} (${this.searchQuery})`, { init })
468468
}
469469
},
470470
// onDelete(id): Load more message and navigate to other message if needed
@@ -517,7 +517,7 @@ export default {
517517
return
518518
}
519519
try {
520-
logger.debug(`syncing mailbox ${this.mailbox.databaseId} (${this.searchQuery}) in background`)
520+
logger.debug(`syncing folder ${this.mailbox.databaseId} (${this.searchQuery}) in background`)
521521
await this.sync(false)
522522
} catch (error) {
523523
logger.error('Background sync failed: ' + error.message, { error })

src/components/MailboxPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Modal @close="onClose">
77
<div ref="content" class="modal-content">
88
<h2 class="oc-dialog-title">
9-
{{ t('mail', 'Choose target mailbox') }}
9+
{{ t('mail', 'Choose target folder') }}
1010
</h2>
1111
<span class="crumbs">
1212
<div @click.prevent="onClickHome">

src/components/MailboxThread.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export default {
377377
if (currentStartMailboxId === this.mailbox.databaseId) {
378378
return
379379
}
380-
logger.debug(`Saving mailbox ${this.mailbox.databaseId} as start mailbox`)
380+
logger.debug(`Saving folder ${this.mailbox.databaseId} as start folder`)
381381
382382
try {
383383
await this.mainStore.savePreference({
@@ -386,7 +386,7 @@ export default {
386386
})
387387
} catch (error) {
388388
// Catch and log. This is not critical.
389-
logger.warn('Could not update start mailbox id', {
389+
logger.warn('Could not update start folder id', {
390390
error,
391391
})
392392
}

src/components/MoveMailboxModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default {
7070
})
7171
}
7272
} catch (error) {
73-
logger.error('could not move mailbox', {
73+
logger.error('could not move folder', {
7474
error,
7575
})
7676
} finally {

0 commit comments

Comments
 (0)