From 670d6d9bf1cc7500cf8829c01ec1def959577819 Mon Sep 17 00:00:00 2001 From: Collin Brown Date: Thu, 10 Sep 2020 12:55:37 -0400 Subject: [PATCH] Adding locales for toast-ui editor --- frontend/i18n/en/index.js | 2 ++ frontend/i18n/en/toastui.js | 3 +++ frontend/i18n/fr/index.js | 4 +++- frontend/i18n/fr/toastui.js | 3 +++ frontend/pages/projects/_id/guideline/index.vue | 9 ++++++++- 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 frontend/i18n/en/toastui.js create mode 100644 frontend/i18n/fr/toastui.js diff --git a/frontend/i18n/en/index.js b/frontend/i18n/en/index.js index d136a8c0..eb063c4b 100644 --- a/frontend/i18n/en/index.js +++ b/frontend/i18n/en/index.js @@ -1,6 +1,7 @@ import home from './home' import header from './header' import generic from './generic' +import toastui from './toastui' import vuetify from './vuetify' import annotation from './projects/annotation' import dataset from './projects/dataset' @@ -16,6 +17,7 @@ export default { home, header, generic, + toastui, vuetify, annotation, dataset, diff --git a/frontend/i18n/en/toastui.js b/frontend/i18n/en/toastui.js new file mode 100644 index 00000000..0bf7d00a --- /dev/null +++ b/frontend/i18n/en/toastui.js @@ -0,0 +1,3 @@ +export default { + localeCode: 'en_US' +} diff --git a/frontend/i18n/fr/index.js b/frontend/i18n/fr/index.js index 75939b7b..0aa5a1d6 100644 --- a/frontend/i18n/fr/index.js +++ b/frontend/i18n/fr/index.js @@ -1,5 +1,7 @@ import home from './home' +import toastui from './toastui' export default { - home + home, + toastui } diff --git a/frontend/i18n/fr/toastui.js b/frontend/i18n/fr/toastui.js new file mode 100644 index 00000000..c6ad3655 --- /dev/null +++ b/frontend/i18n/fr/toastui.js @@ -0,0 +1,3 @@ +export default { + localeCode: 'fr_FR' +} diff --git a/frontend/pages/projects/_id/guideline/index.vue b/frontend/pages/projects/_id/guideline/index.vue index f6d96902..ddd2c47a 100644 --- a/frontend/pages/projects/_id/guideline/index.vue +++ b/frontend/pages/projects/_id/guideline/index.vue @@ -4,6 +4,7 @@ v-model="editorText" preview-style="vertical" height="inherit" + :options="editorOptions" /> @@ -17,7 +18,13 @@ import '@/assets/style/editor.css' export default { layout: 'project', - + data() { + return { + editorOptions: { + language: this.$t('toastui.localeCode') + } + } + }, components: { Editor },