Skip to content

Commit

Permalink
chore(editor): substitutions placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Apr 26, 2022
1 parent d73803d commit 4a53527
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
/>
<div class="flex flex-col w-full gap-5 mt-10">
<EditorGeneratorSubstitutionsAdd />
<div class="flex justify-around items-center w-full">
<p class="text-lg font-bold">
{{ t('editor.addons.substitutions.from') }}
</p>
<p class="text-lg font-bold">
{{ t('editor.addons.substitutions.to') }}
</p>
</div>
<EditorGeneratorSubstitutionsItem
v-for="(template, index) in PROJECT.templates.substitutions.text"
:template="template"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<InputText
v-model="state.old"
class="flex-1 p-2 shadow-lg bg-theme-background-2 rounded-xl tracking-wider"
:placeholder="t('editor.addons.substitutions.from')"
/>
<InputText
v-model="state.new"
class="flex-1 p-2 shadow-lg bg-theme-background-2 rounded-xl tracking-wider"
:placeholder="t('editor.addons.substitutions.to')"
/>
<IconAdd class="w-7 h-7 wb-icon" @click.prevent.stop="add" />
</div>
Expand All @@ -15,9 +17,12 @@
<script setup lang="ts">
import { reactive } from 'vue'
import { useProjectStore } from '@/store/project'
import { useI18n } from 'vue-i18n'
const PROJECT = useProjectStore()
const { t } = useI18n()
const state = reactive({
old: '',
new: '',
Expand Down
4 changes: 4 additions & 0 deletions packages/better-write-localisation/src/en-US/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ export default {
},
},
addons: {
substitutions: {
from: 'Replace',
to: 'For',
},
corrector: {
convert: 'Convert',
removeStartWhitespace: {
Expand Down
4 changes: 4 additions & 0 deletions packages/better-write-localisation/src/pt-BR/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ export default {
},
},
addons: {
substitutions: {
from: 'Substituir',
to: 'Para',
},
corrector: {
convert: 'Converter',
removeStartWhitespace: {
Expand Down

0 comments on commit 4a53527

Please sign in to comment.