Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
Remove UI language toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
curtgrimes committed Sep 3, 2020
1 parent 88e71ee commit ed3e85d
Showing 1 changed file with 18 additions and 45 deletions.
63 changes: 18 additions & 45 deletions app/pages/captioner/settings/language/index.vue
Original file line number Diff line number Diff line change
@@ -1,64 +1,36 @@
<template>
<div class="settings-language-view">
<h3>{{$t('settings.language.interface')}}</h3>
<p>{{$t('settings.language.interfaceDescription')}}</p>
<div class="list-group">
<router-link
tag="button"
v-for="locale in $i18n.locales"
v-bind:key="locale.code"
:to="switchLocalePath(locale.code)"
class="list-group-item list-group-item-action"
v-bind:class="{'active': locale.code === $i18n.locale}"
>
<span class="row m-0">
<span class="col-1 text-center">
<span class="d-block">
<fa v-if="locale.code === $i18n.locale" icon="check-circle"/>
</span>
</span>
<span
class="col-10 col-sm-9 pl-md-0"
>{{$t('settings.language.list[\''+ locale.code +'\']')}}</span>
</span>
</router-link>
<i18n
tag="div"
path="settings.language.wouldYouLikeYourLanguage"
class="list-group-item p-3 text-center text-muted small"
>
<a
place="contactWebCaptionerOnFacebook"
href="https://www.messenger.com/t/webcaptioner"
>{{$t('settings.language.contactWebCaptionerOnFacebook')}}</a>
<fa place="heartIcon" icon="heart" class="text-danger"/>
</i18n>
</div>
<h3 class="mt-4">{{$t('settings.language.spoken')}}</h3>
<i18n path="settings.language.spokenDescription.text" tag="p">
<a
place="supportedLanguagesAndDialects"
href="/help/general/supported-languages/"
target="_blank"
>{{$t('settings.language.spokenDescription.supportedLanguagesAndDialects')}}</a>
>{{
$t(
'settings.language.spokenDescription.supportedLanguagesAndDialects'
)
}}</a
>
</i18n>
<div class="row mb-3">
<div class="col-sm-7" :class="{'col-9': showClearButton}">
<div class="col-sm-7" :class="{ 'col-9': showClearButton }">
<input
ref="search"
type="text"
v-model="searchQuery"
:placeholder="$t('common.search')"
class="form-control"
>
/>
</div>
<div class="col-3 col-sm-3 col-lg-2 pl-0" v-if="showClearButton">
<button
v-bind:class="{'show' : showClearButton, 'invisible' : !showClearButton}"
v-bind:class="{ show: showClearButton, invisible: !showClearButton }"
class="btn btn-sm btn-outline-dark fade w-100"
type="button"
@click="clearSearch()"
>{{$t('common.clear')}}</button>
>
{{ $t('common.clear') }}
</button>
</div>
</div>
<div class="list-group">
Expand All @@ -67,21 +39,22 @@
v-bind:key="locale.code"
@click="localeFrom = locale.code"
class="list-group-item list-group-item-action px-0"
v-bind:class="{'active': localeFrom == locale.code}"
v-bind:class="{ active: localeFrom == locale.code }"
>
<span class="row m-0">
<span class="col-1 text-center">
<span class="d-block">
<fa v-if="localeFrom == locale.code" icon="check-circle"/>
<fa v-if="localeFrom == locale.code" icon="check-circle" />
</span>
</span>
<span class="col-10 col-sm-9 pl-md-0">
{{locale.nameEnglish}}
{{ locale.nameEnglish }}
<span
v-if="locale.nameEnglish !== locale.name"
class="small"
:class="(localeFrom == locale.code ? 'text-primary' : 'text-muted')"
>&middot; {{locale.name}}</span>
:class="localeFrom == locale.code ? 'text-primary' : 'text-muted'"
>&middot; {{ locale.name }}</span
>
</span>
</span>
</button>
Expand Down

0 comments on commit ed3e85d

Please sign in to comment.