diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 0f8ebecdba3e091e30fa84f19ea07b713127f23f..4b71508666573966b74c0a9706813557b85119a4 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -191,7 +191,7 @@ const PostStatusForm = { this.posting = true statusPoster.postStatus({ status: newStatus.status, - spoilerText: newStatus.spoilerText || undefined, + spoilerText: newStatus.spoilerText || null, visibility: newStatus.visibility, media: newStatus.files, store: this.$store, @@ -207,7 +207,7 @@ const PostStatusForm = { el.style.height = '16px' this.error = null - Object.keys(this.vis).forEach(function (x) { this.vis[x].selected = false }) + for (key in Object.keys(this.vis)) { this.vis[key].selected = false } this.vis.public.selected = true } else { this.error = data.error diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index e76850aebeaea996058507f85f805fe9055d67ea..dbd11a19e3ea1266b7983a5bd15ea3934af41b84 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -4,7 +4,7 @@ <div class="form-group" > <input type="text" - placeholder="Content warning (optional)" + :placeholder="$t('post_status.content_warning')" v-model="newStatus.spoilerText" class="form-cw"> <textarea diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 54a99b5ab468dc8e116f2e5be3c69f901dee338f..1975f2a8d8473b0b3cc9411472f946b63a718bc8 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -327,6 +327,7 @@ const en = { }, post_status: { posting: 'Posting', + content_warning: 'Content warning (optional)', default: 'Just landed in L.A.' }, finder: {