Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/AppNavigationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ export default {
return t('forms', 'Form closed')
}
if (this.form.expires) {
const relativeDate = moment(this.form.expires, 'X').fromNow()
const relativeDate = moment(this.form.expires, 'X')
.locale(window.OC.getLanguage())
.fromNow()
if (this.isExpired) {
return t('forms', 'Expired {relativeDate}', {
relativeDate,
Expand Down
4 changes: 3 additions & 1 deletion src/views/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ export default {
},

expirationMessage() {
const relativeDate = moment(this.form.expires, 'X').fromNow()
const relativeDate = moment(this.form.expires, 'X')
.locale(window.OC.getLanguage())
.fromNow()
if (this.isExpired) {
return t('forms', 'Expired {relativeDate}.', { relativeDate })
}
Expand Down
4 changes: 3 additions & 1 deletion src/views/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@
if (this.form.lockedUntil === 0 || this.form.lockedUntil === null) {
return ''
}
return moment(this.form.lockedUntil, 'X').fromNow()
return moment(this.form.lockedUntil, 'X')
.locale(window.OC.getLanguage())
.fromNow()
},

sidebarTitle() {
Expand Down Expand Up @@ -216,7 +218,7 @@
* Save Form-Properties
*
* @param {string} property The Name of the Property to update
* @param {any} newVal The new Property value

Check warning on line 221 in src/views/Sidebar.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Prefer a more specific type to `any`
*/
onPropertyChange(property, newVal) {
this.form[property] = newVal
Expand Down
4 changes: 3 additions & 1 deletion src/views/Submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ export default {
},

expirationMessage() {
const relativeDate = moment(this.form.expires, 'X').fromNow()
const relativeDate = moment(this.form.expires, 'X')
.locale(window.OC.getLanguage())
.fromNow()
if (this.isExpired) {
return t('forms', 'Expired {relativeDate}.', { relativeDate })
}
Expand Down
Loading