You've already forked AstralRinth
forked from didirus/AstralRinth
Add translation keys for Environment Indicator component (#136)
* Begin Work * Finish work
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<span v-if="typeOnly" class="environment">
|
<span v-if="typeOnly" class="environment">
|
||||||
<InfoIcon aria-hidden="true" />
|
<InfoIcon aria-hidden="true" />
|
||||||
A {{ type }}
|
{{ formatMessage(messages.typeLabel, { type: type }) }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-else-if="
|
v-else-if="
|
||||||
@@ -13,11 +13,11 @@
|
|||||||
>
|
>
|
||||||
<template v-if="clientSide === 'optional' && serverSide === 'optional'">
|
<template v-if="clientSide === 'optional' && serverSide === 'optional'">
|
||||||
<GlobeIcon aria-hidden="true" />
|
<GlobeIcon aria-hidden="true" />
|
||||||
Client or server
|
{{ formatMessage(messages.clientOrServerLabel) }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="clientSide === 'required' && serverSide === 'required'">
|
<template v-else-if="clientSide === 'required' && serverSide === 'required'">
|
||||||
<GlobeIcon aria-hidden="true" />
|
<GlobeIcon aria-hidden="true" />
|
||||||
Client and server
|
{{ formatMessage(messages.clientAndServerLabel) }}
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-else-if="
|
v-else-if="
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<ClientIcon aria-hidden="true" />
|
<ClientIcon aria-hidden="true" />
|
||||||
Client
|
{{ formatMessage(messages.clientLabel) }}
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-else-if="
|
v-else-if="
|
||||||
@@ -35,20 +35,48 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<ServerIcon aria-hidden="true" />
|
<ServerIcon aria-hidden="true" />
|
||||||
Server
|
{{ formatMessage(messages.serverLabel) }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="serverSide === 'unsupported' && clientSide === 'unsupported'">
|
<template v-else-if="serverSide === 'unsupported' && clientSide === 'unsupported'">
|
||||||
<GlobeIcon aria-hidden="true" />
|
<GlobeIcon aria-hidden="true" />
|
||||||
Unsupported
|
{{ formatMessage(messages.unsupportedLabel) }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="alwaysShow">
|
<template v-else-if="alwaysShow">
|
||||||
<InfoIcon aria-hidden="true" />
|
<InfoIcon aria-hidden="true" />
|
||||||
A {{ type }}
|
{{ formatMessage(messages.typeLabel, { type: type }) }}
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { GlobeIcon, ClientIcon, ServerIcon, InfoIcon } from '@'
|
import { GlobeIcon, ClientIcon, ServerIcon, InfoIcon } from '@'
|
||||||
|
import { useVIntl, defineMessages } from '@vintl/vintl'
|
||||||
|
const messages = defineMessages({
|
||||||
|
clientLabel: {
|
||||||
|
id: 'omorphia.component.environment-indicator.label.client',
|
||||||
|
defaultMessage: 'Client',
|
||||||
|
},
|
||||||
|
clientAndServerLabel: {
|
||||||
|
id: 'omorphia.component.environment-indicator.label.client-and-server',
|
||||||
|
defaultMessage: 'Client and server',
|
||||||
|
},
|
||||||
|
clientOrServerLabel: {
|
||||||
|
id: 'omorphia.component.environment-indicator.label.client-or-server',
|
||||||
|
defaultMessage: 'Client or server',
|
||||||
|
},
|
||||||
|
serverLabel: {
|
||||||
|
id: 'omorphia.component.environment-indicator.label.server',
|
||||||
|
defaultMessage: 'Server',
|
||||||
|
},
|
||||||
|
typeLabel: {
|
||||||
|
id: 'omorphia.component.environment-indicator.label.type',
|
||||||
|
defaultMessage: 'A {type}',
|
||||||
|
},
|
||||||
|
unsupportedLabel: {
|
||||||
|
id: 'omorphia.component.environment-indicator.label.unsupported',
|
||||||
|
defaultMessage: 'Unsupported',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const { formatMessage } = useVIntl()
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
|
|||||||
@@ -58,5 +58,23 @@
|
|||||||
},
|
},
|
||||||
"omorphia.component.copy.action.copy": {
|
"omorphia.component.copy.action.copy": {
|
||||||
"defaultMessage": "Copy code to clipboard"
|
"defaultMessage": "Copy code to clipboard"
|
||||||
|
},
|
||||||
|
"omorphia.component.environment-indicator.label.client": {
|
||||||
|
"defaultMessage": "Client"
|
||||||
|
},
|
||||||
|
"omorphia.component.environment-indicator.label.client-and-server": {
|
||||||
|
"defaultMessage": "Client and server"
|
||||||
|
},
|
||||||
|
"omorphia.component.environment-indicator.label.client-or-server": {
|
||||||
|
"defaultMessage": "Client or server"
|
||||||
|
},
|
||||||
|
"omorphia.component.environment-indicator.label.server": {
|
||||||
|
"defaultMessage": "Server"
|
||||||
|
},
|
||||||
|
"omorphia.component.environment-indicator.label.type": {
|
||||||
|
"defaultMessage": "A {type}"
|
||||||
|
},
|
||||||
|
"omorphia.component.environment-indicator.label.unsupported": {
|
||||||
|
"defaultMessage": "Unsupported"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user