feat: init new i18n format

This commit is contained in:
liyasthomas
2021-08-02 20:57:18 +05:30
parent 8a268ee6de
commit b615fe7529
66 changed files with 476 additions and 428 deletions

View File

@@ -39,7 +39,7 @@
v-tippy="{ theme: 'tooltip' }"
title="JSON"
icon="folder"
:label="$t('import_collections')"
:label="$t('import.collections')"
@click.native="$refs.collectionUpload.click()"
/>
</label>
@@ -123,13 +123,9 @@
v-tippy="{ theme: 'tooltip' }"
:title="
!currentUser
? `${$t('login_with_github_to')} ${$t(
'create_secret_gist'
).toLowerCase()}`
? $t('export.require_github')
: currentUser.provider !== 'github.com'
? `${$t('login_with_github_to')} ${$t(
'create_secret_gist'
).toLowerCase()}`
? $t('export.require_github')
: 'Beta'
"
>
@@ -141,7 +137,7 @@
? true
: false
"
:label="$t('create_secret_gist')"
:label="$t('export.create_secret_gist')"
@click.native="createDocsGist"
/>
</div>
@@ -231,7 +227,7 @@ export default defineComponent({
}
)
.then((res) => {
this.$toast.success(this.$t("gist_created"), {
this.$toast.success(this.$t("export.gist_created"), {
icon: "done",
})
window.open(res.html_url)

View File

@@ -66,7 +66,7 @@
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('copy')"
:title="$t('action.copy')"
:icon="copyQueryIcon"
@click.native="copyQuery"
/>
@@ -125,7 +125,7 @@
<div class="flex">
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('copy')"
:title="$t('action.copy')"
:icon="copyVariablesIcon"
@click.native="copyVariables"
/>
@@ -182,7 +182,7 @@
/>
<ButtonSecondary
v-tippy="{ theme: 'tooltip' }"
:title="$t('add_new')"
:title="$t('add.new')"
icon="add"
@click.native="addRequestHeader"
/>
@@ -199,7 +199,7 @@
:class="{ 'border-t': index == 0 }"
>
<SmartAutoComplete
:placeholder="$t('header_count', { count: index + 1 })"
:placeholder="$t('count.header', { count: index + 1 })"
:source="commonHeaders"
:spellcheck="false"
:value="header.key"
@@ -230,7 +230,7 @@
px-4
focus:outline-none
"
:placeholder="$t('value_count', { count: index + 1 })"
:placeholder="$t('count.value', { count: index + 1 })"
:name="`value ${index}`"
:value="header.value"
autofocus
@@ -247,9 +247,9 @@
:title="
header.hasOwnProperty('active')
? header.active
? $t('turn_off')
: $t('turn_on')
: $t('turn_off')
? $t('action.turn_off')
: $t('action.turn_on')
: $t('action.turn_off')
"
:icon="
header.hasOwnProperty('active')
@@ -291,10 +291,10 @@
>
<i class="opacity-75 pb-2 material-icons">post_add</i>
<span class="text-center pb-4">
{{ $t("headers_empty") }}
{{ $t("empty.headers") }}
</span>
<ButtonSecondary
:label="$t('add_new')"
:label="$t('add.new')"
outline
@click.native="addRequestHeader"
/>
@@ -333,7 +333,7 @@
<ButtonSecondary
ref="copyResponseButton"
v-tippy="{ theme: 'tooltip' }"
:title="$t('copy')"
:title="$t('action.copy')"
:icon="copyResponseIcon"
@click.native="copyResponse"
/>
@@ -494,7 +494,7 @@
>
<i class="opacity-75 pb-2 material-icons">link</i>
<span class="text-center">
{{ $t("connect_graphql_endpoint") }}
{{ $t("empty.schema") }}
</span>
</div>
</AppSection>
@@ -542,7 +542,7 @@
<ButtonSecondary
ref="copySchemaCode"
v-tippy="{ theme: 'tooltip' }"
:title="$t('copy')"
:title="$t('action.copy')"
:icon="copySchemaIcon"
@click.native="copySchema"
/>
@@ -574,7 +574,7 @@
>
<i class="opacity-75 pb-2 material-icons">link</i>
<span class="text-center">
{{ $t("connect_graphql_endpoint") }}
{{ $t("empty.schema") }}
</span>
</div>
</AppSection>

View File

@@ -143,8 +143,6 @@
/>
<ButtonSecondary
@click.native="showTokenRequest = false"
v-tippy="{ theme: 'tooltip' }"
:title="$t('close')"
icon="close"
/>
</div>

View File

@@ -1,6 +1,6 @@
<template>
<SmartTabs>
<SmartTab id="websocket" :label="$t('websocket')" :selected="true">
<SmartTab id="websocket" :label="$t('tab.websocket')" :selected="true">
<RealtimeWebsocket />
</SmartTab>
<SmartTab id="sse" :label="$t('sse')">
@@ -9,7 +9,7 @@
<SmartTab id="socketio" :label="$t('socketio')">
<RealtimeSocketio />
</SmartTab>
<SmartTab id="mqtt" :label="$t('mqtt')">
<SmartTab id="mqtt" :label="$t('tab.mqtt')">
<RealtimeMqtt />
</SmartTab>
</SmartTabs>

View File

@@ -135,6 +135,14 @@
<SmartAccentModePicker />
</div>
</fieldset>
<fieldset>
<legend class="font-bold text-secondaryDark">
{{ $t("choose_language") }}
</legend>
<div class="mt-4">
<SmartChangeLanguage />
</div>
</fieldset>
<fieldset>
<legend class="font-bold text-secondaryDark">
{{ $t("experiments") }}
@@ -168,7 +176,7 @@
</div>
<div class="flex items-center">
<SmartToggle :on="TELEMETRY_ENABLED" @change="showConfirmModal">
{{ $t("telemetry") }}
{{ $t("settings.telemetry") }}
{{ TELEMETRY_ENABLED ? $t("enabled") : $t("disabled") }}
</SmartToggle>
</div>
@@ -177,7 +185,7 @@
:on="SHORTCUT_INDICATOR"
@change="toggleSetting('SHORTCUT_INDICATOR')"
>
{{ $t("shortcuts_indicator") }}
{{ $t("settings.shortcuts_indicator") }}
{{ SHORTCUT_INDICATOR ? $t("enabled") : $t("disabled") }}
</SmartToggle>
</div>
@@ -186,13 +194,13 @@
:on="LEFT_SIDEBAR"
@change="toggleSetting('LEFT_SIDEBAR')"
>
{{ $t("navigation_sidebar") }}
{{ $t("settings.navigation_sidebar") }}
{{ LEFT_SIDEBAR ? $t("enabled") : $t("disabled") }}
</SmartToggle>
</div>
<div class="flex items-center">
<SmartToggle :on="ZEN_MODE" @change="toggleSetting('ZEN_MODE')">
{{ $t("zen_mode") }}
{{ $t("layout.zen_mode") }}
{{ ZEN_MODE ? $t("enabled") : $t("disabled") }}
</SmartToggle>
</div>
@@ -204,7 +212,7 @@
<div class="md:grid md:grid-cols-3 md:gap-4">
<div class="p-8 md:col-span-1">
<h3 class="heading">
{{ $t("interceptor") }}
{{ $t("settings.interceptor") }}
</h3>
<p class="mt-1 text-secondaryLight">
Middleware between application and APIs.
@@ -288,6 +296,7 @@
ml-2
py-2
px-4
truncate
"
>
{{ `${$t("proxy")} ${$t("url")}` }}
@@ -328,9 +337,7 @@
<FirebaseLogin :show="showLogin" @hide-modal="showLogin = false" />
<SmartConfirmModal
:show="confirmRemove"
:title="`${$t('are_you_sure_remove_telemetry')} ${$t(
'telemetry_helps_us'
)}`"
:title="`${$t('confirm.remove_telemetry')} ${$t('telemetry_helps_us')}`"
@hide-modal="confirmRemove = false"
@resolve="
toggleSetting('TELEMETRY_ENABLED')