fix(ui): [WIP] remove translation mechanism
TODO: Replace with
This commit is contained in:
parent
ebc85d2a19
commit
10683f327c
|
@ -5,7 +5,7 @@ import { uniq } from 'lodash-es'
|
|||
import { useVModel } from '@vueuse/core'
|
||||
import { ref, computed, watch, nextTick } from 'vue'
|
||||
import { useStore } from '~/store'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
// import { useGettext } from 'vue3-gettext'
|
||||
|
||||
interface Props {
|
||||
show: boolean
|
||||
|
@ -32,7 +32,10 @@ const suggestedInstances = computed(() => {
|
|||
|
||||
watch(() => store.state.instance.instanceUrl, () => store.dispatch('instance/fetchSettings'))
|
||||
|
||||
const { $pgettext } = useGettext()
|
||||
|
||||
// TODO: replace translation mechanism { $pgettext } with { t }
|
||||
|
||||
// const { $pgettext } = useGettext()
|
||||
const isError = ref(false)
|
||||
const isLoading = ref(false)
|
||||
const checkAndSwitch = async (url: string) => {
|
||||
|
@ -45,7 +48,8 @@ const checkAndSwitch = async (url: string) => {
|
|||
|
||||
show.value = false
|
||||
store.commit('ui/addMessage', {
|
||||
content: $pgettext('*/Instance/Message', 'You are now using the Funkwhale instance at %{ url }', { url: instanceUrl }),
|
||||
content: 'You are now using the Funkwhale instance at %{ url }',
|
||||
// $pgettext('*/Instance/Message', 'You are now using the Funkwhale instance at %{ url }', { url: instanceUrl }),
|
||||
date: new Date()
|
||||
})
|
||||
|
||||
|
@ -65,9 +69,10 @@ const checkAndSwitch = async (url: string) => {
|
|||
@update:show="isError = false"
|
||||
>
|
||||
<h3 class="header">
|
||||
<translate translate-context="Popup/Instance/Title">
|
||||
Choose your instance
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
Choose your instance
|
||||
<!-- <translate translate-context="Popup/Instance/Title">
|
||||
</translate> -->
|
||||
</h3>
|
||||
<div class="scrolling content">
|
||||
<div
|
||||
|
@ -76,20 +81,23 @@ const checkAndSwitch = async (url: string) => {
|
|||
class="ui negative message"
|
||||
>
|
||||
<h4 class="header">
|
||||
<translate translate-context="Popup/Instance/Error message.Title">
|
||||
It is not possible to connect to the given URL
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
It is not possible to connect to the given URL
|
||||
<!-- <translate translate-context="Popup/Instance/Error message.Title">
|
||||
</translate> -->
|
||||
</h4>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<translate translate-context="Popup/Instance/Error message.List item">
|
||||
The server might be down
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
The server might be down
|
||||
<!-- <translate translate-context="Popup/Instance/Error message.List item">
|
||||
</translate> -->
|
||||
</li>
|
||||
<li>
|
||||
<translate translate-context="Popup/Instance/Error message.List item">
|
||||
The given address is not a Funkwhale server
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
The given address is not a Funkwhale server
|
||||
<!-- <translate translate-context="Popup/Instance/Error message.List item">
|
||||
</translate> -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -98,8 +106,8 @@ const checkAndSwitch = async (url: string) => {
|
|||
@submit.prevent="checkAndSwitch(instanceUrl)"
|
||||
>
|
||||
<p
|
||||
v-if="$store.state.instance.instanceUrl"
|
||||
v-translate="{url: $store.state.instance.instanceUrl, hostname: $store.getters['instance/domain'] }"
|
||||
v-if="store.state.instance.instanceUrl"
|
||||
v-translate="{url: store.state.instance.instanceUrl, hostname: store.getters['instance/domain'] }"
|
||||
class="description"
|
||||
translate-context="Popup/Login/Paragraph"
|
||||
>
|
||||
|
@ -109,12 +117,17 @@ const checkAndSwitch = async (url: string) => {
|
|||
>%{ hostname } <i class="external icon" /></a>. If you continue, you will be disconnected from your current instance and all your local data will be deleted.
|
||||
</p>
|
||||
<p v-else>
|
||||
<translate translate-context="Popup/Instance/Paragraph">
|
||||
To continue, please select the Funkwhale instance you want to connect to. Enter the address directly, or select one of the suggested choices.
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
To continue, please select the Funkwhale instance you want to connect to. Enter the address directly, or select one of the suggested choices.
|
||||
<!-- <translate translate-context="Popup/Instance/Paragraph">
|
||||
</translate> -->
|
||||
</p>
|
||||
<div class="field">
|
||||
<label for="instance-picker"><translate translate-context="Popup/Instance/Input.Label/Noun">Instance URL</translate></label>
|
||||
<label for="instance-picker">
|
||||
<!-- TODO: translate -->
|
||||
<!-- <translate translate-context="Popup/Instance/Input.Label/Noun">Instance URL</translate>
|
||||
-->
|
||||
</label>
|
||||
<div class="ui action input">
|
||||
<input
|
||||
id="instance-picker"
|
||||
|
@ -126,9 +139,10 @@ const checkAndSwitch = async (url: string) => {
|
|||
type="submit"
|
||||
:class="['ui', 'icon', {loading: isLoading}, 'button']"
|
||||
>
|
||||
<translate translate-context="*/*/Button.Label/Verb">
|
||||
Submit
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
Submit
|
||||
<!-- <translate translate-context="*/*/Button.Label/Verb">
|
||||
</translate> -->
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -140,9 +154,10 @@ const checkAndSwitch = async (url: string) => {
|
|||
>
|
||||
<div class="field">
|
||||
<h4>
|
||||
<translate translate-context="Popup/Instance/List.Label">
|
||||
Suggested choices
|
||||
</translate>
|
||||
<!-- TODO: translate -->
|
||||
Suggested choices
|
||||
<!-- <translate translate-context="Popup/Instance/List.Label">
|
||||
</translate> -->
|
||||
</h4>
|
||||
<button
|
||||
v-for="(url, key) in suggestedInstances"
|
||||
|
@ -157,9 +172,11 @@ const checkAndSwitch = async (url: string) => {
|
|||
</div>
|
||||
<div class="actions">
|
||||
<button class="ui basic cancel button">
|
||||
<translate translate-context="*/*/Button.Label/Verb">
|
||||
Cancel
|
||||
</translate>
|
||||
|
||||
<!-- TODO: translate -->
|
||||
Cancel
|
||||
<!-- <translate translate-context="*/*/Button.Label/Verb">
|
||||
</translate> -->
|
||||
</button>
|
||||
</div>
|
||||
</semantic-modal>
|
||||
|
|
Loading…
Reference in New Issue