diff --git a/package.json b/package.json index 0c14e2b0..5fb3ae8c 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,11 @@ "dependencies": { "@babel/runtime": "7.17.8", "@chenfengyuan/vue-qrcode": "2.0.0", - "@floatingghost/pinch-zoom-element": "^1.3.1", "@fortawesome/fontawesome-svg-core": "1.3.0", "@fortawesome/free-regular-svg-icons": "^6.1.2", "@fortawesome/free-solid-svg-icons": "^6.2.0", "@fortawesome/vue-fontawesome": "3.0.1", + "@floatingghost/pinch-zoom-element": "^1.3.1", "@vuelidate/core": "^2.0.0", "@vuelidate/validators": "^2.0.0", "body-scroll-lock": "2.7.1", @@ -31,7 +31,6 @@ "cropperjs": "1.5.12", "diff": "3.5.0", "escape-html": "1.0.3", - "iso-639-1": "^2.1.15", "js-cookie": "^3.0.1", "localforage": "1.10.0", "parse-link-header": "^2.0.0", @@ -83,6 +82,7 @@ "html-webpack-plugin": "^5.5.0", "http-proxy-middleware": "0.21.0", "inject-loader": "2.0.1", + "iso-639-1": "2.1.15", "isparta-loader": "2.0.0", "json-loader": "0.5.7", "karma": "6.3.17", diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 5eb98264..4bc6144c 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -144,7 +144,6 @@ const ExtraButtons = { statusPoll: this.status.poll, statusFiles: [...this.status.attachments], statusScope: this.status.visibility, - statusLanguage: this.status.language, statusContentType: data.content_type })) this.doDeleteStatus() diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index b7c66fc7..c9f492c3 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -13,7 +13,6 @@ import suggestor from '../emoji_input/suggestor.js' import { mapGetters, mapState } from 'vuex' import Checkbox from '../checkbox/checkbox.vue' import Select from '../select/select.vue' -import iso6391 from 'iso-639-1' import { library } from '@fortawesome/fontawesome-svg-core' import { @@ -64,7 +63,6 @@ const PostStatusForm = { 'statusMediaDescriptions', 'statusScope', 'statusContentType', - 'statusLanguage', 'replyTo', 'quoteId', 'repliedUser', @@ -130,7 +128,7 @@ const PostStatusForm = { statusText = buildMentionsString({ user: this.repliedUser, attentions: this.attentions }, currentUser) } - const { postContentType: contentType, sensitiveByDefault, sensitiveIfSubject, interfaceLanguage } = this.$store.getters.mergedConfig + const { postContentType: contentType, sensitiveByDefault, sensitiveIfSubject } = this.$store.getters.mergedConfig let statusParams = { spoilerText: this.subject || '', @@ -141,7 +139,6 @@ const PostStatusForm = { poll: {}, mediaDescriptions: {}, visibility: this.suggestedVisibility(), - language: interfaceLanguage, contentType } @@ -156,7 +153,6 @@ const PostStatusForm = { poll: this.statusPoll || {}, mediaDescriptions: this.statusMediaDescriptions || {}, visibility: this.statusScope || this.suggestedVisibility(), - language: this.statusLanguage || interfaceLanguage, contentType: statusContentType } } @@ -263,10 +259,7 @@ const PostStatusForm = { ...mapGetters(['mergedConfig']), ...mapState({ mobileLayout: state => state.interface.mobileLayout - }), - isoLanguages () { - return iso6391.getAllCodes(); - } + }) }, watch: { 'newStatus': { @@ -289,7 +282,6 @@ const PostStatusForm = { files: [], visibility: newStatus.visibility, contentType: newStatus.contentType, - language: newStatus.language, poll: {}, mediaDescriptions: {} } @@ -349,7 +341,6 @@ const PostStatusForm = { inReplyToStatusId: this.replyTo, quoteId: this.quoteId, contentType: newStatus.contentType, - language: newStatus.language, poll, idempotencyKey: this.idempotencyKey } @@ -384,7 +375,6 @@ const PostStatusForm = { inReplyToStatusId: this.replyTo, quoteId: this.quoteId, contentType: newStatus.contentType, - language: newStatus.language, poll: {}, preview: true }).then((data) => { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 02468f17..b6516585 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -194,23 +194,6 @@ :on-scope-change="changeVis" /> -
- -
{ const form = new FormData() const pollOptions = poll.options || [] @@ -884,7 +883,6 @@ const postStatus = ({ if (visibility) form.append('visibility', visibility) if (sensitive) form.append('sensitive', sensitive) if (contentType) form.append('content_type', contentType) - if (language) form.append('language', language) mediaIds.forEach(val => { form.append('media_ids[]', val) }) diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index 0dbedf07..aaef5a7a 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -13,8 +13,7 @@ const postStatus = ({ quoteId = undefined, contentType = 'text/plain', preview = false, - idempotencyKey = '', - language + idempotencyKey = '' }) => { const mediaIds = map(media, 'id') @@ -30,8 +29,7 @@ const postStatus = ({ contentType, poll, preview, - idempotencyKey, - language + idempotencyKey }) .then((data) => { if (!data.error && !preview) { diff --git a/yarn.lock b/yarn.lock index 5ead5936..d960fc8c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5090,9 +5090,9 @@ isexe@^2.0.0: resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -iso-639-1@^2.1.15: +iso-639-1@2.1.15: version "2.1.15" - resolved "https://registry.yarnpkg.com/iso-639-1/-/iso-639-1-2.1.15.tgz#20cf78a4f691aeb802c16f17a6bad7d99271e85d" + resolved "https://registry.npmjs.org/iso-639-1/-/iso-639-1-2.1.15.tgz" integrity sha512-7c7mBznZu2ktfvyT582E2msM+Udc1EjOyhVRE/0ZsjD9LBtWSm23h3PtiRh2a35XoUsTQQjJXaJzuLjXsOdFDg== isobject@^3.0.1: