refactor: more i18n translation strings

This commit is contained in:
liyasthomas
2021-08-18 22:17:31 +05:30
parent b9c233cdf9
commit ceb8bdf0fd
54 changed files with 408 additions and 318 deletions

View File

@@ -27,7 +27,7 @@
}}{{ entry.payload }}</span
>
</span>
<span v-else>{{ $t("waiting_for_connection") }}</span>
<span v-else>{{ $t("response.waiting_for_connection") }}</span>
</div>
</div>
</template>

View File

@@ -22,13 +22,17 @@
px-4
focus-visible:border-accent
"
:placeholder="$t('url')"
:placeholder="$t('mqtt.url')"
/>
<ButtonPrimary
id="connect"
:disabled="!validUrl"
class="rounded-l-none w-28"
:label="connectionState ? $t('disconnect') : $t('connect')"
:label="
connectionState
? $t('action.disconnect')
: $t('action.connect')
"
:loading="connectingState"
@click.native="toggleConnection"
/>
@@ -68,7 +72,7 @@
</div>
<div class="flex flex-1 p-4 items-center justify-between">
<label for="mqtt-message" class="font-semibold text-secondaryLight">{{
$t("communication")
$t("mqtt.communication")
}}</label>
</div>
<div class="flex px-4">
@@ -77,7 +81,7 @@
v-model="msg"
class="input !rounded-r-none"
type="text"
:placeholder="$t('message')"
:placeholder="$t('mqtt.message')"
spellcheck="false"
/>
<ButtonPrimary

View File

@@ -24,7 +24,7 @@
px-4
focus-visible:border-accent
"
:placeholder="$t('url')"
:placeholder="$t('socketio.url')"
@keyup.enter="urlValid ? toggleConnection() : null"
/>
<input
@@ -47,7 +47,11 @@
:disabled="!urlValid"
name="connect"
class="rounded-l-none w-28"
:label="!connectionState ? $t('connect') : $t('disconnect')"
:label="
!connectionState
? $t('action.connect')
: $t('action.disconnect')
"
:loading="connectingState"
@click.native="toggleConnection"
/>
@@ -72,7 +76,7 @@
<AppSection label="messages">
<div class="flex flex-col flex-1 p-4 inline-flex">
<label for="events" class="font-semibold text-secondaryLight">
{{ $t("events") }}
{{ $t("socketio.events") }}
</label>
</div>
<div class="flex px-4">
@@ -81,14 +85,14 @@
v-model="communication.eventName"
class="input"
name="event_name"
:placeholder="$t('event_name')"
:placeholder="$t('socketio.event_name')"
type="text"
:disabled="!connectionState"
/>
</div>
<div class="flex flex-1 p-4 items-center justify-between">
<label class="font-semibold text-secondaryLight">{{
$t("communication")
$t("socketio.communication")
}}</label>
<div class="flex">
<ButtonSecondary
@@ -130,7 +134,7 @@
name="send"
:disabled="!connectionState"
class="rounded-l-none"
:label="$t('send')"
:label="$t('action.send')"
@click.native="sendMessage"
/>
</div>

View File

@@ -20,7 +20,7 @@
px-4
focus-visible:border-accent
"
:placeholder="$t('url')"
:placeholder="$t('sse.url')"
@keyup.enter="serverValid ? toggleSSEConnection() : null"
/>
<label
@@ -35,7 +35,7 @@
truncate
"
>
{{ $t("event_type") }}
{{ $t("sse.event_type") }}
</label>
<input
id="event-type"
@@ -57,7 +57,9 @@
:disabled="!serverValid"
name="start"
class="rounded-l-none w-22"
:label="!connectionSSEState ? $t('start') : $t('stop')"
:label="
!connectionSSEState ? $t('action.start') : $t('action.stop')
"
:loading="connectingState"
@click.native="toggleSSEConnection"
/>

View File

@@ -23,7 +23,7 @@
type="url"
spellcheck="false"
:class="{ error: !urlValid }"
:placeholder="$t('url')"
:placeholder="$t('websocket.url')"
@keyup.enter="urlValid ? toggleConnection() : null"
/>
<ButtonPrimary
@@ -31,7 +31,11 @@
:disabled="!urlValid"
class="rounded-l-none w-28"
name="connect"
:label="!connectionState ? $t('connect') : $t('disconnect')"
:label="
!connectionState
? $t('action.connect')
: $t('action.disconnect')
"
:loading="connectingState"
@click.native="toggleConnection"
/>
@@ -156,7 +160,7 @@
for="websocket-message"
class="font-semibold text-secondaryLight"
>
{{ $t("communication") }}
{{ $t("websocket.communication") }}
</label>
</div>
<div class="flex px-4">
@@ -166,7 +170,7 @@
name="message"
type="text"
:disabled="!connectionState"
:placeholder="$t('message')"
:placeholder="$t('websocket.message')"
class="input !rounded-r-none"
@keyup.enter="connectionState ? sendMessage() : null"
@keyup.up="connectionState ? walkHistory('up') : null"
@@ -177,7 +181,7 @@
name="send"
:disabled="!connectionState"
class="rounded-l-none"
:label="$t('send')"
:label="$t('action.send')"
@click.native="sendMessage"
/>
</div>