Skip to content

Commit 05e5a47

Browse files
authored
Merge pull request #3218 from nextcloud/enh/unify-response-wording
enh(l10n): Unify wording for form responses across multiple components
2 parents d707de4 + 0764572 commit 05e5a47

6 files changed

Lines changed: 27 additions & 35 deletions

File tree

src/FormsEmptyContent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default {
5353
title: t('forms', 'Form expired'),
5454
description: t(
5555
'forms',
56-
'This form has expired and is no longer taking answers',
56+
'This form has expired and is no longer taking responses',
5757
),
5858
5959
icon: IconCheck,

src/components/AppNavigationForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<template #icon>
5858
<IconPoll :size="20" />
5959
</template>
60-
{{ t('forms', 'Results') }}
60+
{{ t('forms', 'Responses') }}
6161
</NcActionRouter>
6262
<NcActionButton v-if="canEdit" close-after-click @click="onCloneForm">
6363
<template #icon>

src/components/SidebarTabs/SettingsSidebarTab.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
{{ t('forms', 'Close form') }}
8888
</NcCheckboxRadioSwitch>
8989
<p id="forms-settings__close-form" class="settings-hint">
90-
{{ t('forms', 'Closed forms do not accept new submissions.') }}
90+
{{ t('forms', 'Closed forms do not accept new responses.') }}
9191
</p>
9292
<NcCheckboxRadioSwitch
9393
:model-value="isFormLockedPermanently"
@@ -112,7 +112,7 @@
112112
{{
113113
t(
114114
'forms',
115-
'Archived forms do not accept new submissions and can not be modified.',
115+
'Archived forms do not accept new responses and cannot be modified.',
116116
)
117117
}}
118118
</p>

src/components/TopBar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ const editView = {
5454
disabled: false,
5555
}
5656
const resultsView = {
57-
ariaLabel: t('forms', 'Show results'),
57+
ariaLabel: t('forms', 'Show responses'),
5858
icon: mdiPoll,
59-
title: t('forms', 'Results'),
59+
title: t('forms', 'Responses'),
6060
id: 'results',
6161
}
6262

src/views/Results.vue

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-->
55

66
<template>
7-
<NcAppContent :page-heading="t('forms', 'Results')">
7+
<NcAppContent :page-heading="t('forms', 'Responses')">
88
<NcDialog
99
:open.sync="showLinkedFileNotAvailableDialog"
1010
:name="t('forms', 'Linked file not available')"
@@ -192,10 +192,10 @@
192192
<!-- Empty search results -->
193193
<NcEmptyContent
194194
v-else-if="noFilteredSubmissions && submissionSearch.length > 0"
195-
:name="t('forms', 'No results found')"
195+
:name="t('forms', 'No responses found')"
196196
class="forms-emptycontent"
197197
:description="
198-
t('forms', 'No results found for {submissionSearch}', {
198+
t('forms', 'No responses found for \'{submissionSearch}\'', {
199199
submissionSearch,
200200
})
201201
">
@@ -209,9 +209,7 @@
209209
v-else-if="noSubmissions"
210210
:name="t('forms', 'No responses yet')"
211211
class="forms-emptycontent"
212-
:description="
213-
t('forms', 'Results of submitted forms will show up here')
214-
">
212+
:description="t('forms', 'Responses will show up here')">
215213
<template #icon>
216214
<IconPoll :size="64" />
217215
</template>
@@ -259,14 +257,8 @@
259257
<!-- Confirmation dialog for deleting all submissions -->
260258
<NcDialog
261259
:open.sync="showConfirmDeleteDialog"
262-
:name="t('forms', 'Delete submissions')"
263-
:message="
264-
t(
265-
'forms',
266-
'Are you sure you want to delete all responses of {title}?',
267-
{ title: formTitle },
268-
)
269-
"
260+
:name="t('forms', 'Delete responses')"
261+
:message="t('forms', 'Are you sure you want to delete all responses?')"
270262
:buttons="confirmDeleteButtons" />
271263
</NcAppContent>
272264
</template>
@@ -435,7 +427,7 @@ export default {
435427
},
436428
},
437429
{
438-
label: t('forms', 'Delete submissions'),
430+
label: t('forms', 'Delete responses'),
439431
icon: IconDeleteSvg,
440432
type: 'error',
441433
callback: () => {
@@ -565,7 +557,7 @@ export default {
565557
566558
async loadFormResults() {
567559
this.loadingResults = true
568-
logger.debug(`Loading results for form ${this.form.hash}`)
560+
logger.debug(`Loading responses for form ${this.form.hash}`)
569561
570562
try {
571563
let response = null
@@ -598,8 +590,8 @@ export default {
598590
this.questions = data.questions
599591
this.filteredSubmissionsCount = data.filteredSubmissionsCount
600592
} catch (error) {
601-
logger.error('Error while loading results', { error })
602-
showError(t('forms', 'There was an error while loading the results'))
593+
logger.error('Error while loading responses', { error })
594+
showError(t('forms', 'An error occurred while loading responses'))
603595
} finally {
604596
this.loadingResults = false
605597
}
@@ -777,16 +769,16 @@ export default {
777769
},
778770
),
779771
)
780-
showSuccess(t('forms', 'Submission deleted'))
772+
showSuccess(t('forms', 'Response deleted'))
781773
const index = this.submissions.findIndex(
782774
(search) => search.id === id,
783775
)
784776
this.submissions.splice(index, 1)
785777
emit('forms:last-updated:set', this.form.id)
786778
} catch (error) {
787-
logger.error(`Error while removing response ${id}`, { error })
779+
logger.error(`Error while deleting response ${id}`, { error })
788780
showError(
789-
t('forms', 'There was an error while removing this response'),
781+
t('forms', 'An error occurred while deleting this response'),
790782
)
791783
} finally {
792784
this.loadingResults = false
@@ -810,8 +802,8 @@ export default {
810802
this.form.submissionCount = 0
811803
emit('forms:last-updated:set', this.form.id)
812804
} catch (error) {
813-
logger.error('Error while removing responses', { error })
814-
showError(t('forms', 'There was an error while removing responses'))
805+
logger.error('Error while deleting responses', { error })
806+
showError(t('forms', 'An error occurred while deleting responses'))
815807
} finally {
816808
this.loadingResults = false
817809
}

src/views/Submit.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
:description="
8282
t(
8383
'forms',
84-
'This form has expired and is no longer taking answers',
84+
'This form has expired and is no longer taking responses',
8585
)
8686
">
8787
<template #icon>
@@ -95,7 +95,7 @@
9595
:description="
9696
t(
9797
'forms',
98-
'This form was closed and is no longer taking answers',
98+
'This form was closed and is no longer taking responses',
9999
)
100100
">
101101
<template #icon>
@@ -480,7 +480,7 @@ export default {
480480
hash() {
481481
// If public view, abort. Should normally not occur.
482482
if (this.publicView) {
483-
logger.error('Hash changed on public View. Aborting.')
483+
logger.error('Hash changed on public view. Aborting.')
484484
return
485485
}
486486
this.resetData()
@@ -596,7 +596,7 @@ export default {
596596
},
597597
598598
async fetchSubmission() {
599-
logger.debug(`Loading submission ${this.submissionId}`)
599+
logger.debug(`Loading response ${this.submissionId}`)
600600
601601
try {
602602
const response = await axios.get(
@@ -667,9 +667,9 @@ export default {
667667
668668
this.answers = answers
669669
} catch (error) {
670-
logger.error('Error while loading submission', { error })
670+
logger.error('Error while loading response', { error })
671671
showError(
672-
t('forms', 'There was an error while loading the submission'),
672+
t('forms', 'There was an error while loading the response'),
673673
)
674674
}
675675
},

0 commit comments

Comments
 (0)