mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #695 from Human-Connection/583-localize-tiptap-placeholder-text
Fix placeholder text not translating bug
This commit is contained in:
commit
810746f138
@ -327,10 +327,18 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$on('changeLanguage', () => {
|
||||
this.changePlaceHolderText()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.editor.destroy()
|
||||
},
|
||||
methods: {
|
||||
changePlaceHolderText() {
|
||||
this.editor.extensions.options.placeholder.emptyNodeText = this.$t('editor.placeholder')
|
||||
},
|
||||
// navigate to the previous item
|
||||
// if it's the first item, navigate to the last one
|
||||
upHandler() {
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
<ds-icon
|
||||
style="margin-right: 2px;"
|
||||
name="globe"
|
||||
/> {{ current.code.toUpperCase() }}
|
||||
/>
|
||||
{{ current.code.toUpperCase() }}
|
||||
<ds-icon
|
||||
style="margin-left: 2px"
|
||||
size="xx-small"
|
||||
@ -78,6 +79,7 @@ export default {
|
||||
changeLanguage(locale, toggleMenu) {
|
||||
this.$i18n.set(locale)
|
||||
toggleMenu()
|
||||
this.$root.$emit('changeLanguage')
|
||||
},
|
||||
matcher(locale) {
|
||||
return locale === this.$i18n.locale()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user