import languagesObject from '../../i18n/messages'
+import localeService from '../../services/locale/locale.service.js'
import ISO6391 from 'iso-639-1'
import _ from 'lodash'
import { library } from '@fortawesome/fontawesome-svg-core'
@@ -42,12 +43,8 @@ library.add(
export default {
computed: {
- languageCodes () {
- return languagesObject.languages
- },
-
- languageNames () {
- return _.map(this.languageCodes, this.getLanguageName)
+ languages () {
+ return _.map(languagesObject.languages, (code) => ({ code: code, name: this.getLanguageName(code) })).sort((a, b) => a.name.localeCompare(b.name))
},
language: {
@@ -61,11 +58,13 @@ export default {
methods: {
getLanguageName (code) {
const specialLanguageNames = {
- 'ja': 'Japanese (日本語)',
- 'ja_easy': 'Japanese (やさしいにほんご)',
- 'zh': 'Chinese (简体中文)'
+ 'ja_easy': 'やさしいにほんご',
+ 'zh': '简体中文',
+ 'zh_Hant': '繁體中文'
}
- return specialLanguageNames[code] || ISO6391.getName(code)
+ const languageName = specialLanguageNames[code] || ISO6391.getNativeName(code)
+ const browserLocale = localeService.internalToBrowserLocale(code)
+ return languageName.charAt(0).toLocaleUpperCase(browserLocale) + languageName.slice(1)
}
}
}
diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue
index 31f204a0..09496105 100644
--- a/src/components/poll/poll_form.vue
+++ b/src/components/poll/poll_form.vue
@@ -21,20 +21,17 @@
@keydown.enter.stop.prevent="nextOption(index)"
>
-
-
-
+
+
-
{{ $t("polls.add_option") }}
-
+
-
+ >
+
+
.emoji-input {
+ & > .emoji-input {
flex: 1 1 auto;
- margin: 0 .2em .5em;
+ margin: 0 0.2em 0.5em;
min-width: 0;
}
- &>.icon-container {
+ .delete-field {
width: 20px;
align-self: center;
- margin: 0 .2em .5em;
+ margin: 0 0.2em 0.5em;
+ padding: 0 0.5em;
}
}
}
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue
index b7ef21d7..175a0219 100644
--- a/src/components/settings_modal/tabs/profile_tab.vue
+++ b/src/components/settings_modal/tabs/profile_tab.vue
@@ -124,24 +124,24 @@
:placeholder="$t('settings.profile_fields.value')"
>
-
-
+
-
{{ $t("settings.profile_fields.add_field") }}
-
+
diff --git a/src/components/status/status.js b/src/components/status/status.js
index f9c710ab..2bf93a9e 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -157,6 +157,7 @@ const Status = {
return muteWordHits(this.status, this.muteWords)
},
muted () {
+ if (this.statusoid.user.id === this.currentUser.id) return false
const { status } = this
const { reblog } = status
const relationship = this.$store.getters.relationship(status.user.id)
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 16dd5249..773f764a 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -83,7 +83,7 @@
v-if="!!visibleRole"
class="alert user-role"
>
- {{ visibleRole }}
+ {{ $t(`user_card.roles.${visibleRole}`) }}