Skip to content

Commit

Permalink
Added support to browser field
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanhao Li authored and ifox committed Mar 2, 2020
1 parent a5f097d commit 71209b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/js/components/BrowserField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
return this.max - this.items.length
},
addLabel: function () {
return 'Add ' + this.itemLabel
return this.$trans('fields.browser.add-label', 'Add') + ' ' + this.itemLabel
},
browserTitle: function () {
return this.modalTitle !== '' ? this.modalTitle : this.addLabel
Expand Down
4 changes: 4 additions & 0 deletions views/lang/en/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,9 @@
'create-another' => 'Create another',
'delete' => 'Delete'
]
],
'browser' => [
'attach' => 'Attach',
'add-label' => 'Add'
]
];
4 changes: 4 additions & 0 deletions views/lang/ja/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
'open-in-editor' => 'エディターで開く',
'create-another' => '別のものを作成',
'delete' => '削除'
],
'browser' => [
'attach' => '付ける',
'add-label' => '追加'
]
]
];
2 changes: 1 addition & 1 deletion views/partials/form/_browser.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
:wide="{{ json_encode($wide) }}"
endpoint="{{ $endpoint }}"
:endpoints="{{ json_encode($endpoints) }}"
modal-title="Attach {{ strtolower($label) }}"
modal-title="@lang('twill::lang.fields.browser.attach') {{ strtolower($label) }}"
:draggable="{{ json_encode($sortable) }}"
>{{ $note }}</a17-browserfield>
</a17-inputframe>
Expand Down

0 comments on commit 71209b6

Please sign in to comment.