feature/fix-vue-i18n-9.2.31 (#1994)
continuous-integration/drone/push Build is passing Details

Co-authored-by: renovate <renovatebot@kolaente.de>
Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: #1994
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
Dominik Pschenitschni 2022-05-23 05:23:59 +00:00 committed by konrad
parent 1569042471
commit 5ef939a230
44 changed files with 85 additions and 88 deletions

View File

@ -49,7 +49,7 @@
"vue-advanced-cropper": "2.8.1",
"vue-drag-resize": "2.0.3",
"vue-flatpickr-component": "9.0.6",
"vue-i18n": "9.2.0-beta.30",
"vue-i18n": "9.2.0-beta.35",
"vue-router": "4.0.15",
"vuex": "4.0.2",
"workbox-precaching": "6.5.3",

View File

@ -48,7 +48,7 @@ const keyboardShortcutsActive = computed(() => store.state.keyboardShortcutsActi
const authUser = computed(() => store.getters['auth/authUser'])
const authLinkShare = computed(() => store.getters['auth/authLinkShare'])
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
// setup account deletion verification
const accountDeletionConfirm = useRouteQuery('accountDeletionConfirm') as Ref<null | string>

View File

@ -83,7 +83,7 @@ import BaseButton from '@/components/base/BaseButton.vue'
import DatemathHelp from '@/components/date/datemathHelp.vue'
const store = useStore()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const emit = defineEmits(['dateChanged'])

View File

@ -70,7 +70,7 @@ watch(() => props.configureOpen, (value) => {
}, {immediate: true})
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const errorMsg = ref('')
const successMsg = ref('')

View File

@ -28,22 +28,21 @@
{{ $t('misc.cancel') }}
</x-button>
<x-button
v-if="primaryLabel !== ''"
variant="primary"
@click.prevent.stop="primary()"
:icon="primaryIcon"
:disabled="primaryDisabled"
>
{{ primaryLabel }}
{{ primaryLabel || $t('misc.create') }}
</x-button>
</footer>
</card>
</modal>
</template>
<script lang="ts">
</script>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
defineProps({
title: {
type: String,
@ -51,10 +50,6 @@ defineProps({
},
primaryLabel: {
type: String,
default() {
const {t} = useI18n()
return t('misc.create')
},
},
primaryIcon: {
type: String,

View File

@ -38,7 +38,7 @@ import {useTitle} from '@/composables/useTitle'
const route = useRoute()
const store = useStore()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const motd = computed(() => store.state.config.motd)

View File

@ -51,7 +51,7 @@ const emit = defineEmits(['change'])
const subscriptionService = shallowRef(new SubscriptionService())
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const tooltipText = computed(() => {
if (disabled.value) {
return t('task.subscription.subscribedThroughParent', {

View File

@ -195,7 +195,7 @@ const props = defineProps({
},
})
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const linkShares = ref([])
const linkShareService = shallowReactive(new LinkShareService())

View File

@ -179,7 +179,7 @@ const props = defineProps({
},
})
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
// This user service is either a userNamespaceService or a userListService, depending on the type we are using
let stuffService: ShallowReactive<UserNamespaceService | UserListService | TeamListService | TeamNamespaceService>

View File

@ -133,7 +133,7 @@ const emit = defineEmits(['taskAdded'])
const newTaskTitle = ref('')
const newTaskInput = useAutoHeightTextarea(newTaskTitle)
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const taskService = shallowReactive(new TaskService())

View File

@ -90,7 +90,7 @@ import ColorPicker from '../input/colorPicker.vue'
import {success} from '@/message'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const router = useRouter()
const props = defineProps({

View File

@ -34,7 +34,7 @@ const checklistCircleDone = computed(() => {
return ((100 - progress) / 100) * c
})
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const label = computed(() => {
return checklist.value.total === checklist.value.checked
? t('task.checklistAllDone', checklist.value)

View File

@ -173,7 +173,7 @@ const props = defineProps({
},
})
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const comments = ref<TaskCommentModel[]>([])

View File

@ -54,7 +54,7 @@ const props = defineProps({
})
const emit = defineEmits(['update:modelValue'])
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const taskService = shallowReactive(new TaskService())

View File

@ -60,7 +60,7 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue'])
const store = useStore()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const listUserService = shallowReactive(new ListUserService())
const foundUsers = ref([])

View File

@ -67,7 +67,7 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue', 'change'])
const store = useStore()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const labelTaskService = shallowReactive(new LabelTaskService())
const labels = ref<LabelModel[]>([])

View File

@ -36,7 +36,7 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue'])
const store = useStore()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const list = reactive<ListModel>(new ListModel())

View File

@ -2,7 +2,7 @@ import {error} from '@/message'
import {useI18n} from 'vue-i18n'
export function useCopyToClipboard() {
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
return async (text: string) => {
try {

View File

@ -4,7 +4,9 @@ import langEN from './lang/en.json'
export const i18n = createI18n({
locale: 'en', // set locale
fallbackLocale: 'en',
legacy: true,
globalInjection: true,
allowComposition: true,
messages: {
en: langEN,
},
@ -26,9 +28,9 @@ export const availableLanguages = {
const loadedLanguages = ['en'] // our default language that is preloaded
const setI18nLanguage = lang => {
const setI18nLanguage = (lang: string) => {
i18n.global.locale = lang
document.querySelector('html').setAttribute('lang', lang)
document.documentElement.lang =lang
return lang
}
@ -73,7 +75,7 @@ export const getCurrentLanguage = () => {
return 'en'
}
export const saveLanguage = lang => {
export const saveLanguage = (lang: string) => {
localStorage.setItem('language', lang)
setLanguage()
}

View File

@ -21,7 +21,7 @@ import SavedFilterModel from '@/models/savedFilter'
import SavedFilterService from '@/services/savedFilter'
import {getSavedFilterIdFromListId} from '@/helpers/savedFilter'
const { t } = useI18n()
const { t } = useI18n({useScope: 'global'})
const router = useRouter()
const route = useRoute()

View File

@ -68,7 +68,7 @@ import SavedFilterService from '@/services/savedFilter'
import {objectToSnakeCase} from '@/helpers/case'
import {getSavedFilterIdFromListId} from '@/helpers/savedFilter'
const { t } = useI18n()
const { t } = useI18n({useScope: 'global'})
function useSavedFilter(listId) {
const filterService = shallowRef(new SavedFilterService())

View File

@ -91,7 +91,7 @@ const now = ref(new Date())
const dateFrom = ref(new Date((new Date()).setDate(now.value.getDate() - 15)))
const dateTo = ref(new Date((new Date()).setDate(now.value.getDate() + 30)))
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const flatPickerConfig = computed(() => ({
altFormat: t('date.altFormatShort'),

View File

@ -45,7 +45,7 @@ import ColorPicker from '@/components/input/colorPicker.vue'
import { success } from '@/message'
import { useTitle } from '@/composables/useTitle'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const router = useRouter()
const route = useRoute()

View File

@ -27,7 +27,7 @@ import ListService from '@/services/list'
import { success } from '@/message'
import { useTitle } from '@/composables/useTitle'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const router = useRouter()
const route = useRoute()

View File

@ -36,7 +36,7 @@ import {success} from '@/message'
import TaskCollectionService from '@/services/taskCollection'
import Loading from '@/components/misc/loading.vue'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const route = useRoute()
const router = useRouter()

View File

@ -37,7 +37,7 @@ import { useTitle } from '@/composables/useTitle'
import { useNameSpaceSearch } from '@/composables/useNamespaceSearch'
const { t } = useI18n()
const { t } = useI18n({useScope: 'global'})
useTitle(() => t('list.duplicate.title'))

View File

@ -45,7 +45,7 @@ import CreateEdit from '@/components/misc/create-edit.vue'
import LinkSharing from '@/components/sharing/linkSharing.vue'
import userTeam from '@/components/sharing/userTeam.vue'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const list = ref()
const title = computed(() => list.value?.title

View File

@ -28,7 +28,7 @@ import {useStore} from 'vuex'
import {MIGRATORS} from './migrators'
import {useTitle} from '@/composables/useTitle'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
useTitle(() => t('migrate.title'))

View File

@ -41,7 +41,7 @@ import NamespaceModel from '@/models/namespace'
import CreateEdit from '@/components/misc/create-edit.vue'
import manageSharing from '@/components/sharing/userTeam.vue'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const namespace = ref()

View File

@ -41,7 +41,7 @@ import {useTitle} from '@vueuse/core'
import Message from '@/components/misc/message.vue'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
useTitle(t('sharing.authenticating'))
function useAuth() {

View File

@ -64,7 +64,7 @@ import LlamaCool from '@/assets/llama-cool.svg?component'
const store = useStore()
const route = useRoute()
const router = useRouter()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const tasks = ref<TaskModel[]>([])
const showNothingToDo = ref<boolean>(false)

View File

@ -183,7 +183,7 @@ import {success} from '@/message'
const store = useStore()
const route = useRoute()
const router = useRouter()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const userIsAdmin = computed(() => {
return (

View File

@ -32,7 +32,7 @@ import { useI18n } from 'vue-i18n'
import TeamService from '@/services/team'
import { useTitle } from '@/composables/useTitle'
const { t } = useI18n()
const { t } = useI18n({useScope: 'global'})
useTitle(() => t('team.title'))
const teams = ref([])

View File

@ -66,7 +66,7 @@ import PasswordResetModel from '@/models/passwordReset'
import PasswordResetService from '@/services/passwordReset'
import Message from '@/components/misc/message.vue'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const credentials = reactive({
password: '',

View File

@ -23,7 +23,7 @@ import { store } from '@/store'
import { useI18n } from 'vue-i18n'
import { useTitle } from '@/composables/useTitle'
const { t } = useI18n()
const { t } = useI18n({useScope: 'global'})
useTitle(() => t('user.settings.title'))
const totpEnabled = computed(() => store.state.config.totpEnabled)

View File

@ -77,7 +77,7 @@ import AvatarModel from '@/models/avatar'
import { useTitle } from '@/composables/useTitle'
import { success } from '@/message'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
const AVATAR_PROVIDERS = {

View File

@ -81,7 +81,7 @@ import CaldavTokenModel from '@/models/caldavToken'
const copy = useCopyToClipboard()
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
useTitle(() => `${t('user.settings.caldav.title')} - ${t('user.settings.title')}`)
const service = shallowReactive(new CaldavTokenService())

View File

@ -55,7 +55,7 @@ import DataExportService from '@/services/dataExport'
import { useTitle } from '@/composables/useTitle'
import {success} from '@/message'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
useTitle(() => `${t('user.export.title')} - ${t('user.settings.title')}`)

View File

@ -100,7 +100,7 @@ import {parseDateOrNull} from '@/helpers/parseDateOrNull'
import {useTitle} from '@/composables/useTitle'
import {success} from '@/message'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
useTitle(() => `${t('user.deletion.title')} - ${t('user.settings.title')}`)
const accountDeleteService = shallowReactive(new AccountDeleteService())

View File

@ -53,7 +53,7 @@ import EmailUpdateModel from '@/models/emailUpdate'
import {success} from '@/message'
import {useTitle} from '@/composables/useTitle'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
useTitle(() => `${t('user.settings.updateEmailTitle')} - ${t('user.settings.title')}`)
const store = useStore()

View File

@ -159,13 +159,13 @@ import {AuthenticatedHTTPFactory} from '@/http-common'
import {useColorScheme} from '@/composables/useColorScheme'
import { useTitle } from '@/composables/useTitle'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
useTitle(() => `${t('user.settings.general.title')} - ${t('user.settings.title')}`)
const DEFAULT_LIST_ID = 0
function useColorSchemeSetting() {
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const colorSchemeSettings = computed(() => ({
light: t('user.settings.appearance.colorScheme.light'),
auto: t('user.settings.appearance.colorScheme.system'),

View File

@ -74,7 +74,7 @@ const passwordUpdateService = shallowReactive(new PasswordUpdateService())
const passwordUpdate = reactive(new PasswordUpdateModel())
const passwordConfirm = ref('')
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
const store = useStore()
useTitle(() => `${t('user.settings.newPasswordTitle')} - ${t('user.settings.title')}`)

View File

@ -80,7 +80,7 @@ import {success} from '@/message'
import { useTitle } from '@/composables/useTitle'
const {t} = useI18n()
const {t} = useI18n({useScope: 'global'})
useTitle(() => `${t('user.settings.totp.title')} - ${t('user.settings.title')}`)

View File

@ -1182,43 +1182,43 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@intlify/core-base@9.2.0-beta.30":
version "9.2.0-beta.30"
resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.0-beta.30.tgz#82f86e3199661c18fbbd9b07ba58243909148384"
integrity sha512-tnOuI8gs4S7vv4WjG8oFL7vbZ4PM7Is/Ld3lRHQlBO7UjpnCVcQ94AgP/4F0cUPFn9JSPMQRN0aOOahW1BXvSA==
"@intlify/core-base@9.2.0-beta.35":
version "9.2.0-beta.35"
resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.0-beta.35.tgz#ef714d6ddf387024b1f1c0fcde0040a11bd33b0e"
integrity sha512-53yuCpo2ov5OKdvBTvE5zKMo2clLVqNORwkcY9TUu0B+yrOeDwLWQnbPJnOoDu5KkRdbdXlMxnHNCpJ5vlGZ1g==
dependencies:
"@intlify/devtools-if" "9.2.0-beta.30"
"@intlify/message-compiler" "9.2.0-beta.30"
"@intlify/shared" "9.2.0-beta.30"
"@intlify/vue-devtools" "9.2.0-beta.30"
"@intlify/devtools-if" "9.2.0-beta.35"
"@intlify/message-compiler" "9.2.0-beta.35"
"@intlify/shared" "9.2.0-beta.35"
"@intlify/vue-devtools" "9.2.0-beta.35"
"@intlify/devtools-if@9.2.0-beta.30":
version "9.2.0-beta.30"
resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.0-beta.30.tgz#98b52ef802abe6ad29fd3d8486b9c8454469cf4f"
integrity sha512-3OxGFi6ooya9DFqX/JsxFjrj9nGYcDoo4CRGYSDqnC+xv4bnsyB5ekmaYBiVZtagCdZdSUMxbTFphl1WbtgNLQ==
"@intlify/devtools-if@9.2.0-beta.35":
version "9.2.0-beta.35"
resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.0-beta.35.tgz#16a8bb6b3f6d612ed705ab00a28eba8a8cb7b1ba"
integrity sha512-y3+7M+eS9mqeXTBa1QWAvt4nsjwWJ5G4xT+G3IFtd7Vb2CQHwli229n0avD+VdlDGwWCDWpLkny8QWtdNEYpOA==
dependencies:
"@intlify/shared" "9.2.0-beta.30"
"@intlify/shared" "9.2.0-beta.35"
"@intlify/message-compiler@9.2.0-beta.30":
version "9.2.0-beta.30"
resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.30.tgz#51955ebb388bc8774465e6e017a63bba1aeaed04"
integrity sha512-2kj/0nLIFrgiO86f9VifcUUcV8LdzXt4YYPIujx/LkTEQOuSFUo/bNiMaG1hyfiU/8mfq6tsaWKjoOZjeao1eQ==
"@intlify/message-compiler@9.2.0-beta.35":
version "9.2.0-beta.35"
resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.35.tgz#3df3809650f4fef97d00ae739a87f33eb095bd79"
integrity sha512-wYQCgnRtyJ40HK3bJTrszHDaxqDXZH+9Ps7RsXNuNwZ9hIb1cVkLiUNIbuJS/XSJ1kATJXA6K+4if6ZLb0Ozxw==
dependencies:
"@intlify/shared" "9.2.0-beta.30"
"@intlify/shared" "9.2.0-beta.35"
source-map "0.6.1"
"@intlify/shared@9.2.0-beta.30":
version "9.2.0-beta.30"
resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.30.tgz#623a2fcffdb063d5aa940f7236ab28a083c004c8"
integrity sha512-E1WHRTIlUEse3d/6t1pAagSXRxmeVeNIhx5kT80dfpYxw8lOnCWV9wLve2bq9Fkv+3TD2I5j+CdN7jvSl3LdsA==
"@intlify/shared@9.2.0-beta.35":
version "9.2.0-beta.35"
resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.35.tgz#10f98403cb541d29d90d428a2ef58fbd927caf1d"
integrity sha512-DXf7xrwf08GKhr93XPQ8EgaEN0CIELl+mAS6SlRhi/aLtZv5HSGSMkz4M/ICwoWzFLSgOx/ZdBSasex19MMogg==
"@intlify/vue-devtools@9.2.0-beta.30":
version "9.2.0-beta.30"
resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.0-beta.30.tgz#6ef377067f59e170ae33c7018c9b4a6758da87b7"
integrity sha512-hcqDfwP/oXVmVCaJ0RA+uv1WSCcd42/Y13S0bySmWZv2KamLcxiD7wYxp/MaECG/D4KZcSLkq/wDHTG7lhYf5Q==
"@intlify/vue-devtools@9.2.0-beta.35":
version "9.2.0-beta.35"
resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.0-beta.35.tgz#209b5c4964a6dfc40ecc0497334f3fcc347b59d8"
integrity sha512-h7nf5F7AV4uKrr7zKTIyv8EOaIv4yAXuo7tvnFsp5uF8FO+kpBwWDm5csw9v9neyz42hiINJSP0Amou9M2ShEA==
dependencies:
"@intlify/core-base" "9.2.0-beta.30"
"@intlify/shared" "9.2.0-beta.30"
"@intlify/core-base" "9.2.0-beta.35"
"@intlify/shared" "9.2.0-beta.35"
"@jest/types@^25.5.0":
version "25.5.0"
@ -12643,14 +12643,14 @@ vue-flatpickr-component@9.0.6:
dependencies:
flatpickr "^4.6.9"
vue-i18n@9.2.0-beta.30:
version "9.2.0-beta.30"
resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0-beta.30.tgz#e58effd4e1dcd328c3c40ad945aaf914146237c6"
integrity sha512-5DqrgG9ffgC7j3RRAfViC0WUcdz0C3Ix1qq1AyQItpF7UkSB6iSJGEjBG6KdspbRQq/8t1YzDx4JRXbL05l6ow==
vue-i18n@9.2.0-beta.35:
version "9.2.0-beta.35"
resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0-beta.35.tgz#9e5f18bcab8ca40db5c6fe8115bacea3e13cb981"
integrity sha512-kTYzZSB3B/ar3M9RfQ0KAyTGfvRw544qVzY++/sNV4stOKG6NxIDOdHdYTfVEXTSkczFwoZHTKXTWNVpx+GuHA==
dependencies:
"@intlify/core-base" "9.2.0-beta.30"
"@intlify/shared" "9.2.0-beta.30"
"@intlify/vue-devtools" "9.2.0-beta.30"
"@intlify/core-base" "9.2.0-beta.35"
"@intlify/shared" "9.2.0-beta.35"
"@intlify/vue-devtools" "9.2.0-beta.35"
"@vue/devtools-api" "^6.0.0-beta.13"
vue-resize@^2.0.0-alpha.1: