Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Settings #114

Merged
merged 6 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 178 additions & 26 deletions locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
yes: 'Yes'
no: 'No'
female: Female
male: Male
other: Other
Monday: Monday
Tuesday: Tuesday
Wednesday: Wednesday
Thursday: Thursday
Friday: Friday
Saturday: Saturday
Sunday: Sunday
visibilityOptions:
public: Public
members: Members
unlisted: Unlisted
hero:
title: Do you like dancing?
subtitle: We help each other find interesting dance events and dance partners.
Expand Down Expand Up @@ -89,6 +105,148 @@ posts:
profiles:
add: Add profile
title: Community
profile:
username:
label: Username
before: Use only letters, numbers, underscores and periods.
community: I dance in
type: Type
name:
label: Name
before: If you want to remain anonym use your first name.
placeholder: (Required)
bio:
label: Teaser
before: Short introduction on top of your photo
hometown:
label: Hometown
before: Where were you born and raised?
birthday:
label: Birthday
description: We will show only your age'
gender:
label: Gender
placeholder: Gender
style: Dance styles
story:
label: Description
before: Tell your dance story. You can also use [widgets](https://wedance.vip/markdown), including images and videos
tips: 'Pitch yourself: Who are you? What do you offer? What do you want?


Tips for effective pitch:

- Uncomplicated: It should be catchy and roll off the tongue

- Concise: It shouldn’t take more than a minute to say or read

- Unique: It reflects your skills, goals, and desires

- Storyline: It covers who you are, what you offer, and where you want to be

- Appealing: Your elevator pitch is essentially a persuasive sales pitch; the emphasis should be on what you offer'
placeholder: Text (markdown)
locales: Your languages
skills: Non-dancing skills
days: Days
learning:
label: Which dance topics you are interested in?
description: 'For example: Musicality in Salsa, Men Styling, etc.'
teacher: Are you teaching?
partner: Are you looking for a dance partner?
height: Your height (cm)
weight:
label: Your weight (kg)
description: Leave this field blank if you think it's irrelevant.
partnerBio:
label: Question
description: 'What is important in your partner? Put it as a question, for example: Do you love dogs?'
objectives: Objectives
objective:
placeholder: Objective
meetingPlace: Where to meet?
visibility:
label: Visibility
description: '- Public profiles are searchable in Google and used in our social media to attract new members.

- Members profile are only visible for logged-in users.

- Unlisted profiles are possible to open with exact link, but they are not listed in members lists and search.'
photo: Photo
add: Add profile
title: Community
styles:
label: Dance
tips: Mark up to 4 favorite dances that will be highlighted in your poster
place:
label: Your city
placeholder: City
dance:
placeholder: Style
permission:
label: Do you want free promo?
description: 'Send us link to your profile on [Instagram](https://instagram.com/wedancevip) and we will promote it on our social media channels: Telegram, Instagram, Facebook and Twitter.'
jobs:
label: I can help with
description: 'How can you help our community? What are you good at? For example: design, programming, marketing, social media, etc.'
contacts: Do you use social media?
instagram:
label: instagram.com/
placeholder: username
facebook:
label: fb.com/
placeholder: username
whatsapp:
label: whatsapp.com/
placeholder: whatsapp chat
telegram:
label: t.me/
placeholder: username
twitter:
label: twitter.com/
placeholder: username
tiktok:
label: tiktok.com/
placeholder: username
youtube:
label: youtube.com/
placeholder: username
email:
label: Email
placeholder: for business requests
website:
label: Website
placeholder: for business requests
meetingPlaces:
myPlace: My place
yourPlace: Your place
private: Somewhere private
public: Somewhere public
typeList:
dancer: Dancer
artist: Artist
organiser: Organiser
venue: Venue
city: City
objectivesList:
talk: Talk about dance
learn: Learn together
outdoors: Dance outdoors
indoors: Dance indoors
teach: Teach together
project: Dance project
profileSorts:
username: Username
registered: Registered
lastSeen: Last seen
radiusOptions:
ten: around 10km
twenty: around 20km
fifty: around 50km
hundred: around 100km
fiveHundred: around 500km
thousand: around 1000km
anywhere: Anywhere
myprofile:
events:
add: Add event
Expand Down Expand Up @@ -121,6 +279,12 @@ settings:
will be shared with service providers or sellers only with your agreement.
changepassword: Change Password
delete: Delete Account
popup:
delete:
title: Confirm account deletion
deleteReason: Why are you leaving?
usernameConfirmation: Enter username
passwordError: Error
profile:
title: Profile
description:
Expand All @@ -137,37 +301,25 @@ city:
change: Change city
role:
label: Role
profile:
username: Username
community: I dance in
type: Type
name: Name
bio: Teaser
hometown: Hometown
birthday: Birthday
gender: Gender
styles: Your dance styles and level
style: Dance styles
story: Description
languages: Your languages
skills: Non-dancing skills
days: Days
topics: Which dance topics you are interested in?
teacher: Are you teaching?
partner: Are you looking for a dance partner?
height: Your height (cm)
weight: Your weight (kg)
partnerBio: About your partner
objectives: Objectives
place: Where to meet?
visibility: Visibility
photo: Photo
account:
email: Email
password: Password
name: Full Name
phone: Phone
newsletter: What kind of updated would you like to receive weekly?
zone: Timezone
newsletter:
label: What kind of updated would you like to receive weekly?
options:
party: 'Social/party events'
class: Dance classes
workshop: Workshops and bootcamps
online: Online dance classes
festival: International festivals
comment: Comment
withPartner:
label: Do you have a partner?
partnerName: Partner's name
partnerEmail: Partner's email
agreement: By signing in, you agree to {terms} and {privacy}.
terms: Terms of service
privacy: Privacy policy
Expand Down
10 changes: 6 additions & 4 deletions pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,23 @@
>
<TPopup
v-if="deleteAccountPopupVisible"
title="Confirm account deletion"
:title="$t('settings.account.popup.delete.title')"
@close="deleteAccountPopupVisible = false"
>
<div class="py-4 space-y-4">
<TField
v-model="deleteReason"
label-position="vertical"
component="TInputTextarea"
label="Why are you leaving?"
:label="$t('settings.account.popup.delete.deleteReason')"
/>
<TField
v-model="usernameConfirmation"
label-position="vertical"
:placeholder="profile.username"
label="Enter username"
:label="
$t('settings.account.popup.delete.usernameConfirmation')
"
/>
<div class="flex justify-end">
<TButton type="danger" @click="deleteAccountAction()">{{
Expand All @@ -80,7 +82,7 @@
</div>
<TPopup
v-if="passwordError"
title="Error"
:title="$t('settings.passwordError')"
@close="passwordError = ''"
>
<div class="py-4 max-w-md">{{ passwordError.message }}</div>
Expand Down
36 changes: 20 additions & 16 deletions use/accounts.js
Original file line number Diff line number Diff line change
@@ -1,94 +1,98 @@
import moment from 'moment-timezone'
import { useCollection } from '~/use/collection'
import { useI18n } from '~/use/i18n'
import { useCommon } from '~/use/common'

export const useAccounts = () => {
const { t } = useI18n()
const { getById, find } = useCollection('accounts')
const { yesNoOptions } = useCommon()

const getAccount = (uid) => getById(uid) || {}
const getAccountByEmail = (email) => find('email', email)

const accountFields = [
{
name: 'name',
key: 'account.name',
label: t('account.name'),
required: true,
event: true,
},
{
name: 'email',
key: 'account.email',
label: t('account.email'),
register: true,
required: true,
event: true,
},
{
name: 'password',
type: 'password',
label: 'New Password',
label: t('account.password'),
register: true,
},
{
name: 'phone',
key: 'account.phone',
label: t('account.phone'),
required: true,
event: true,
},
{
name: 'zone',
label: 'Timezone',
label: t('account.zone'),
component: 'TRichSelect',
options: moment.tz.names(),
require: true,
},
{
name: 'newsletter',
key: 'account.newsletter',
label: t('account.newsletter.label'),
component: 'TInputMulti',
options: [
{
value: 'party',
label: 'Social/party events',
label: t('account.newsletter.options.party'),
},
{
value: 'class',
label: 'Dance classes',
label: t('account.newsletter.options.class'),
},
{
value: 'workshop',
label: 'Workshops and bootcamps',
label: t('account.newsletter.options.workshop'),
},
{
value: 'online',
label: 'Online dance classes',
label: t('account.newsletter.options.online'),
},
{
value: 'festival',
label: 'International festivals',
label: t('account.newsletter.options.festival'),
},
],
},
{
name: 'comment',
label: 'Comment',
label: t('account.comment'),
type: 'text',
event: true,
},
{
name: 'withPartner',
component: 'TInputSelect',
label: 'Do you have a partner?',
options: ['Yes', 'No'],
label: t('account.withPartner.label'),
options: yesNoOptions,
event: false,
},
{
name: 'partnerName',
label: "Partner's name",
label: t('account.partnerName'),
when: (answers) => answers?.withPartner === 'Yes',
event: false,
},
{
name: 'partnerEmail',
label: "Partner's email",
label: t('account.partnerEmail'),
when: (answers) => answers?.withPartner === 'Yes',
event: false,
},
Expand Down
Loading