This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/plugins/spelling.js

25 lines
603 B
JavaScript
Raw Normal View History

2021-02-01 12:03:30 -08:00
import {mapState} from "vuex";
import zhConverter from "zh_cn_zh_tw";
2021-11-15 13:17:50 -08:00
import futurus from 'avris-futurus';
2021-02-01 12:03:30 -08:00
export default {
computed: {
...mapState([
'spelling',
]),
},
methods: {
handleSpelling(str) {
if (this.config.locale === 'zh' && this.spelling === 'simplified') {
return zhConverter.convertToSimplifiedChinese(str);
}
2021-11-15 13:17:50 -08:00
if (this.config.locale === 'pl' && this.spelling === 'futurysci') {
return futurus.futuriseText(str);
}
2021-02-01 12:03:30 -08:00
return str;
}
},
}