refactor: more i18n translation strings
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<SmartModal
|
||||
v-if="show"
|
||||
:title="$t('login_to_hoppscotch')"
|
||||
:title="$t('auth.login_to_hoppscotch')"
|
||||
dialog
|
||||
@close="hideModal"
|
||||
>
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
showLoginSuccess() {
|
||||
this.$toast.info(this.$t("login_success"), {
|
||||
this.$toast.info(this.$t("auth.login_success"), {
|
||||
icon: "vpn_key",
|
||||
})
|
||||
},
|
||||
@@ -174,20 +174,23 @@ export default {
|
||||
const { additionalUserInfo } = await signInUserWithGoogle()
|
||||
|
||||
if (additionalUserInfo.isNewUser) {
|
||||
this.$toast.info(`${this.$t("action.turn_on")} ${this.$t("sync")}`, {
|
||||
icon: "sync",
|
||||
duration: null,
|
||||
closeOnSwipe: false,
|
||||
action: {
|
||||
text: this.$t("yes"),
|
||||
onClick: (_, toastObject) => {
|
||||
applySetting("syncHistory", true)
|
||||
applySetting("syncCollections", true)
|
||||
applySetting("syncEnvironments", true)
|
||||
toastObject.remove()
|
||||
this.$toast.info(
|
||||
`${this.$t("action.turn_on")} ${this.$t("auth.sync")}`,
|
||||
{
|
||||
icon: "sync",
|
||||
duration: null,
|
||||
closeOnSwipe: false,
|
||||
action: {
|
||||
text: this.$t("yes"),
|
||||
onClick: (_, toastObject) => {
|
||||
applySetting("syncHistory", true)
|
||||
applySetting("syncCollections", true)
|
||||
applySetting("syncEnvironments", true)
|
||||
toastObject.remove()
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
this.showLoginSuccess()
|
||||
@@ -254,20 +257,23 @@ export default {
|
||||
setProviderInfo(credential.providerId, credential.accessToken)
|
||||
|
||||
if (additionalUserInfo.isNewUser) {
|
||||
this.$toast.info(`${this.$t("action.turn_on")} ${this.$t("sync")}`, {
|
||||
icon: "sync",
|
||||
duration: null,
|
||||
closeOnSwipe: false,
|
||||
action: {
|
||||
text: this.$t("yes"),
|
||||
onClick: (_, toastObject) => {
|
||||
applySetting("syncHistory", true)
|
||||
applySetting("syncCollections", true)
|
||||
applySetting("syncEnvironments", true)
|
||||
toastObject.remove()
|
||||
this.$toast.info(
|
||||
`${this.$t("action.turn_on")} ${this.$t("auth.sync")}`,
|
||||
{
|
||||
icon: "sync",
|
||||
duration: null,
|
||||
closeOnSwipe: false,
|
||||
action: {
|
||||
text: this.$t("yes"),
|
||||
onClick: (_, toastObject) => {
|
||||
applySetting("syncHistory", true)
|
||||
applySetting("syncCollections", true)
|
||||
applySetting("syncEnvironments", true)
|
||||
toastObject.remove()
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
this.showLoginSuccess()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="flex">
|
||||
<SmartItem
|
||||
icon="exit_to_app"
|
||||
:label="$t('logout')"
|
||||
:label="$t('auth.logout')"
|
||||
@click.native="
|
||||
$emit('confirm-logout')
|
||||
confirmLogout = true
|
||||
@@ -32,7 +32,7 @@ export default Vue.extend({
|
||||
try {
|
||||
await signOutUser()
|
||||
|
||||
this.$toast.info(this.$t("logged_out").toString(), {
|
||||
this.$toast.info(this.$t("auth.logged_out").toString(), {
|
||||
icon: "vpn_key",
|
||||
})
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user