From 228e6681e3fd4a16d08d96edb9eea21d64be5600 Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 8 Feb 2019 11:42:02 -0500 Subject: Localization of ImageCropper component --- src/components/image_cropper/image_cropper.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/components/image_cropper/image_cropper.js') diff --git a/src/components/image_cropper/image_cropper.js b/src/components/image_cropper/image_cropper.js index e4bf5ea2..86bd2d67 100644 --- a/src/components/image_cropper/image_cropper.js +++ b/src/components/image_cropper/image_cropper.js @@ -26,12 +26,10 @@ const ImageCropper = { default: 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon' }, title: { - type: String, - default: 'Crop picture' + type: String }, saveButtonLabel: { - type: String, - default: 'Save' + type: String } }, data () { @@ -44,6 +42,14 @@ const ImageCropper = { components: { Modal }, + computed: { + modalTitle () { + return this.title || this.$t('image_cropper.crop_picture') + }, + modalSaveButtonLabel () { + return this.saveButtonLabel || this.$t('image_cropper.save') + } + }, methods: { destroy () { this.cropper.destroy() -- cgit v1.2.3-70-g09d2