Skip to content

Commit fd67292

Browse files
authored
Merge pull request #2231 from nextcloud/backport/2229/stable4
2 parents 676cc87 + 9072878 commit fd67292

File tree

10 files changed

+24
-14
lines changed

10 files changed

+24
-14
lines changed

docs/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ import Avatar from '@nextcloud/vue/dist/Components/Avatar'
3737
Some components require Nextcloud functionality to work, so it is currently recommended to extend Vue with the following:
3838

3939
```js static
40-
Vue.prototype.t = window.t
41-
Vue.prototype.n = window.n
4240
Vue.prototype.OC = window.OC
4341
Vue.prototype.OCA = window.OCA
4442
```

l10n/messages.pot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ msgstr ""
2929
msgid "Close"
3030
msgstr ""
3131

32+
msgid "Close navigation"
33+
msgstr ""
34+
3235
msgid "Confirm changes"
3336
msgstr ""
3437

@@ -50,6 +53,9 @@ msgstr ""
5053
msgid "Global"
5154
msgstr ""
5255

56+
msgid "Go back to the list"
57+
msgstr ""
58+
5359
msgid "Message limit of {count} characters reached"
5460
msgstr ""
5561

@@ -65,6 +71,9 @@ msgstr ""
6571
msgid "Objects"
6672
msgstr ""
6773

74+
msgid "Open navigation"
75+
msgstr ""
76+
6877
msgid "Pause slideshow"
6978
msgstr ""
7079

src/components/AppContent/AppDetailsToggle.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727
<script>
2828
import { emit } from '@nextcloud/event-bus'
2929
30-
import l10n from '../../mixins/l10n'
30+
import { t } from '../../l10n'
3131
export default {
3232
name: 'AppDetailsToggle',
3333
34-
mixins: [l10n],
35-
3634
computed: {
3735
title() {
38-
return this.t('Go back to the list')
36+
return t('Go back to the list')
3937
},
4038
},
4139

src/components/AppNavigationItem/InputConfirmCancel.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
</div>
5656
</template>
5757
<script>
58+
import { t } from '../../l10n'
59+
5860
import ArrowRight from 'vue-material-design-icons/ArrowRight'
5961
import Close from 'vue-material-design-icons/Close'
6062

src/components/AppNavigationToggle/AppNavigationToggle.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<script>
4141
import Actions from '../Actions/Actions'
4242
import ActionButton from '../ActionButton/ActionButton'
43-
import l10n from '../../mixins/l10n'
43+
import { t } from '../../l10n'
4444
4545
import Menu from 'vue-material-design-icons/Menu'
4646
@@ -53,8 +53,6 @@ export default {
5353
Menu,
5454
},
5555
56-
mixins: [l10n],
57-
5856
props: {
5957
open: {
6058
type: Boolean,
@@ -64,7 +62,7 @@ export default {
6462
6563
computed: {
6664
label() {
67-
return this.open ? this.t('Close navigation') : this.t('Open navigation')
65+
return this.open ? t('Close navigation') : t('Open navigation')
6866
},
6967
},
7068
methods: {

src/components/AppSettingsDialog/AppSettingsDialog.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export default {
5454
<script>
5555
import Modal from '../Modal'
5656
import isMobile from '../../mixins/isMobile'
57+
import { t } from '../../l10n'
58+
5759
import debounce from 'debounce'
5860
5961
export default {

src/components/DatetimePicker/DatetimePicker.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ import DatePicker from 'vue2-datepicker'
150150
import Popover from '../Popover/index'
151151
import TimezonePicker from '../TimezonePicker'
152152
153+
import l10n from '../../mixins/l10n'
154+
153155
export default {
154156
name: 'DatetimePicker',
155157
@@ -159,6 +161,8 @@ export default {
159161
TimezonePicker,
160162
},
161163
164+
mixins: [l10n],
165+
162166
inheritAttrs: false,
163167
164168
props: {

src/components/RichContenteditable/RichContenteditable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ import Tribute from 'tributejs/dist/tribute.esm'
148148
import debounce from 'debounce'
149149
import stringLength from 'string-length'
150150
151-
import { t } from '../../l10n.js'
151+
import { t } from '../../l10n'
152152
import AutoCompleteResult from './AutoCompleteResult'
153153
import richEditor from '../../mixins/richEditor/index'
154154

src/components/SettingsSelectGroup/SettingsSelectGroup.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ import GenRandomId from '../../utils/GenRandomId'
4848
import { generateOcsUrl } from '@nextcloud/router'
4949
import { showError } from '@nextcloud/dialogs'
5050
import l10n from '../../mixins/l10n'
51+
import { t } from '../../l10n'
52+
5153
export default {
5254
name: 'SettingsSelectGroup',
5355
components: {

styleguide/global.requires.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ window.OC = {
8686
window.OCA = {}
8787
window.appName = 'nextcloud-vue'
8888

89-
window.t = (app, text) => text
90-
91-
Vue.prototype.t = window.t
9289
Vue.prototype.OC = window.OC
9390
Vue.prototype.OCA = window.OCA
9491

0 commit comments

Comments
 (0)