summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/views/components/drive.folder.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-11-09 03:44:35 +0900
committerGitHub <noreply@github.com>2018-11-09 03:44:35 +0900
commit25a69ec1b69cb7f380949ef9cf1c3599eaa4face (patch)
tree6f10016d32f94140d3953446c4b1fdb474e216e8 /src/client/app/desktop/views/components/drive.folder.vue
parentUpdate CircleCI configuration (#3163) (diff)
downloadmisskey-25a69ec1b69cb7f380949ef9cf1c3599eaa4face.tar.gz
misskey-25a69ec1b69cb7f380949ef9cf1c3599eaa4face.tar.bz2
misskey-25a69ec1b69cb7f380949ef9cf1c3599eaa4face.zip
Refactoring of i18n (#3165)
Refactoring of i18n
Diffstat (limited to 'src/client/app/desktop/views/components/drive.folder.vue')
-rw-r--r--src/client/app/desktop/views/components/drive.folder.vue22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/client/app/desktop/views/components/drive.folder.vue b/src/client/app/desktop/views/components/drive.folder.vue
index 6862e151d3..ff87a12692 100644
--- a/src/client/app/desktop/views/components/drive.folder.vue
+++ b/src/client/app/desktop/views/components/drive.folder.vue
@@ -25,9 +25,11 @@
<script lang="ts">
import Vue from 'vue';
+import i18n from '../../../i18n';
import contextmenu from '../../api/contextmenu';
export default Vue.extend({
+ i18n: i18n('desktop/views/components/drive.folder.vue'),
props: ['folder'],
data() {
return {
@@ -54,22 +56,22 @@ export default Vue.extend({
this.isContextmenuShowing = true;
contextmenu((this as any).os)(e, [{
type: 'item',
- text: '%i18n:@contextmenu.move-to-this-folder%',
+ text: this.$t('contextmenu.move-to-this-folder'),
icon: 'arrow-right',
action: this.go
}, {
type: 'item',
- text: '%i18n:@contextmenu.show-in-new-window%',
+ text: this.$t('contextmenu.show-in-new-window'),
icon: ['far', 'window-restore'],
action: this.newWindow
}, null, {
type: 'item',
- text: '%i18n:@contextmenu.rename%',
+ text: this.$t('contextmenu.rename'),
icon: 'i-cursor',
action: this.rename
}, null, {
type: 'item',
- text: '%i18n:common.delete%',
+ text: this.$t('@.delete'),
icon: ['far', 'trash-alt'],
action: this.deleteFolder
}], {
@@ -155,15 +157,15 @@ export default Vue.extend({
switch (err) {
case 'detected-circular-definition':
(this as any).apis.dialog({
- title: '<fa icon="exclamation-triangle"/>%i18n:@unable-to-process%',
- text: '%i18n:@circular-reference-detected%',
+ title: this.$t('unable-to-process'),
+ text: this.$t('circular-reference-detected'),
actions: [{
- text: '%i18n:common.ok%'
+ text: this.$t('@.ok')
}]
});
break;
default:
- alert(`%i18n:@unhandled-error% ${err}`);
+ alert(this.$t('unhandled-error'));
}
});
}
@@ -195,8 +197,8 @@ export default Vue.extend({
rename() {
(this as any).apis.input({
- title: '%i18n:@contextmenu.rename-folder%',
- placeholder: '%i18n:@contextmenu.input-new-folder-name%',
+ title: this.$t('contextmenu.rename-folder'),
+ placeholder: this.$t('contextmenu.input-new-folder-name'),
default: this.folder.name
}).then(name => {
(this as any).api('drive/folders/update', {