From 2aaebb3ce0d178d98b2fba4cb47d1386527ef188 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 28 May 2017 19:56:10 -0400 Subject: [PATCH] feat: Added localization to editor-codeblock --- client/js/components/editor-codeblock.vue | 28 +++++++++++++++++++---- server/locales/en/browser.json | 7 ++++++ server/views/modals/editor-codeblock.pug | 23 ------------------- server/views/pages/view.pug | 2 +- 4 files changed, 31 insertions(+), 29 deletions(-) delete mode 100644 server/views/modals/editor-codeblock.pug diff --git a/client/js/components/editor-codeblock.vue b/client/js/components/editor-codeblock.vue index 5558c44e..63bfac5e 100644 --- a/client/js/components/editor-codeblock.vue +++ b/client/js/components/editor-codeblock.vue @@ -7,11 +7,14 @@ transition(name='modal-content') .modal-content.is-expanded(v-show='isShown') header.is-green - span Insert Code Block + span {{ $t('editor.codeblocktitle') }} + p.modal-notify(v-bind:class='{ "is-active": isLoading }') + span {{ $t('editor.codeblockloading', { name: modeSelected }) }} + i section.is-gapless .columns.is-stretched .column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'}) - .model-sidebar-header Language + .model-sidebar-header {{ $t('editor.codeblocklanguage') }} .model-sidebar-content p.control.is-fullwidth select(v-model='modeSelected') @@ -19,8 +22,8 @@ .column.ace-container #codeblock-editor footer - a.button.is-grey.is-outlined(v-on:click='cancel') Discard - a.button.is-green(v-on:click='insertCode') Insert Code Block + a.button.is-grey.is-outlined(v-on:click='cancel') {{ $t('editor.discard') }} + a.button.is-green(v-on:click='insertCode') {{ $t('editor.codeblockinsert') }}