Skip to content

Commit

Permalink
Text updates (#313)
Browse files Browse the repository at this point in the history
* text updates from legal

text updates #

* update pkg version

* remove unused schema

* overwrite i18n instead of new schema
  • Loading branch information
deetz99 authored Nov 15, 2024
1 parent 7a840a2 commit e5ccf63
Show file tree
Hide file tree
Showing 19 changed files with 210 additions and 101 deletions.
31 changes: 31 additions & 0 deletions strr-base-web/app/components/contact/STRR.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<ul :aria-label="$t('contactInfo.strr.listTitle')">
<li>
<span class="inline-flex items-center gap-1">
<UIcon name="i-mdi-phone" class="mr-2 size-5 text-blue-500" />
{{ $t('contactInfo.strr.tollFree.title') }}
<a class="text-blue-500 underline" href="tel:+1-833-828-2240">1-833-828-2240</a>
</span>
</li>
<li>
<span class="inline-flex items-center gap-1">
<UIcon name="i-mdi-phone" class="mr-2 size-5 text-blue-500" />
{{ $t('contactInfo.strr.victoriaOffice.title') }}
<a class="text-blue-500 underline" href="tel:+1-604-630-4058">604-630-4058</a>
</span>
</li>
<li>
<span class="inline-flex items-center gap-1">
<UIcon name="i-mdi-email" class="mr-2 size-5 text-blue-500" />
{{ $t('contactInfo.strr.email.title') }}
<a
class="text-blue-500 underline"
href="mailto:[email protected]"
target="_blank"
>
[email protected]
</a>
</span>
</li>
</ul>
</template>
27 changes: 27 additions & 0 deletions strr-base-web/app/components/modal/group/HelpAndInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<script setup lng="ts">
const strrModal = useStrrModals()
</script>
<template>
<div class="flex flex-col gap-2 sm:flex-row sm:gap-4">
<UButton
:label="$t('modal.help.registerStr.triggerBtn')"
:padded="false"
icon="i-mdi-help-circle-outline"
variant="link"
@click="strrModal.openHelpRegisterModal()"
/>

<UDivider
orientation="vertical"
class="hidden sm:block"
/>

<UButton
:label="$t('modal.info.collectionNotice.triggerBtn')"
:padded="false"
icon="i-mdi-information-circle-outline"
variant="link"
@click="strrModal.openInfoCollectionNoticeModal()"
/>
</div>
</template>
20 changes: 20 additions & 0 deletions strr-base-web/app/components/modal/help/RegisterStr.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<ModalBase :title="$t('modal.help.registerStr.title')">
<div class="space-y-8">
<i18n-t keypath="modal.help.registerStr.content" tag="p" scope="global">
<template #link>
<a
href="https://www.STRregistry.gov.bc.ca"
target="_blank"
class="text-bcGovColor-activeBlue underline"
>
STRregistry.gov.bc.ca
</a>
</template>
</i18n-t>
<div class="h-20 w-full">
<ContactSTRR />
</div>
</div>
</ModalBase>
</template>
21 changes: 21 additions & 0 deletions strr-base-web/app/components/modal/info/CollectionNotice.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<ModalBase :title="$t('modal.info.collectionNotice.title')">
<div class="space-y-8">
<i18n-t keypath="modal.info.collectionNotice.content" tag="p" scope="global">
<template #act>
<em class="italic">{{ $t('act.strrAccomodations') }}</em>
</template>

<template #email>
<a
class="text-blue-500 underline"
href="mailto:[email protected]"
target="_blank"
>
[email protected]
</a>
</template>
</i18n-t>
</div>
</ModalBase>
</template>
2 changes: 1 addition & 1 deletion strr-base-web/app/composables/useStrrBaseBusiness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useStrrBaseBusiness = () => {
const getBaseBusinessSchema = (business: StrrBusiness) => {
return z.object({
legalName: getRequiredNonEmptyString(t('validation.business.legalName')),
homeJurisdiction: getRequiredNonEmptyString(t('validation.business.jurisdiction')),
homeJurisdiction: optionalOrEmptyString,
businessNumber: optionalOrEmptyString,
mailingAddress: getRequiredAddress(
t('validation.address.street'),
Expand Down
20 changes: 19 additions & 1 deletion strr-base-web/app/composables/useStrrModals.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// https://ui.nuxt.com/components/modal#control-programmatically
import { ModalBase } from '#components'
import {
ModalBase,
ModalHelpRegisterStr,
ModalInfoCollectionNotice
} from '#components'

export const useStrrModals = () => {
const modal = useModal()
Expand Down Expand Up @@ -93,6 +97,18 @@ export const useStrrModals = () => {
})
}

function openHelpRegisterModal () {
modal.open(ModalHelpRegisterStr, {
actions: [{ label: t('btn.close'), handler: () => close() }]
})
}

function openInfoCollectionNoticeModal () {
modal.open(ModalInfoCollectionNotice, {
actions: [{ label: t('btn.close'), handler: () => close() }]
})
}

function close () {
modal.close()
}
Expand All @@ -103,6 +119,8 @@ export const useStrrModals = () => {
openConfirmDeclineTosModal,
openPatchTosErrorModal,
openConfirmSwitchAccountModal,
openHelpRegisterModal,
openInfoCollectionNoticeModal,
close
}
}
38 changes: 34 additions & 4 deletions strr-base-web/app/locales/en-CA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ export default {
title: 'Hours of Operation:',
value: 'Monday to Friday, 8:30am - 4:30pm Pacific Time'
}
},
strr: {
listTitle: 'Short-Term Rental Registry Contact Information',
tollFree: {
title: 'Canada and U.S. Toll Free:',
value: '1-833-828-2240'
},
victoriaOffice: {
title: 'Victoria Office:',
value: '604-630-4058'
},
email: {
title: 'Email:',
value: "STRregistry{'@'}gov.bc.ca"
}
}
},
currency: {
Expand Down Expand Up @@ -159,14 +174,15 @@ export default {
socialInsuranceNumber: 'Social Insurance Number (SIN)',
taxNumber: 'Tax Number',
busName: 'Business Name',
busNameLegal: 'Business Legal Name',
busNameLegal: 'Legal Name',
corpNum: 'Incorporation Number',
busNum: 'Business Number',
busNumOpt: 'Business Number (Optional)',
cpbcLicNum: 'CPBC Licence Number',
registrationNum: 'Registration Number',
applicationNum: 'Application Number',
homeJurisdiction: 'Home Jurisdiction',
homeJurisdictionOpt: 'Home Jurisdiction (Optional)',
name: 'Name',
mailingAddress: 'Mailing Address',
deliveryAddress: 'Delivery Address',
Expand Down Expand Up @@ -239,6 +255,20 @@ export default {
title: 'Leave Site?',
content: 'Changes you made may not be saved.',
leaveBtn: 'Leave'
},
help: {
registerStr: {
triggerBtn: 'Help with registering',
title: 'Need Help?',
content: 'For more information about registration requirements, visit {link}. If you need help registering, using the dashboard, or resolving a technical issue, you can also contact us directly.'
}
},
info: {
collectionNotice: {
triggerBtn: 'Information collection notice',
title: 'Information Collection Notice',
content: 'Any personal information required is collected to support the administration and enforcement of the {act}, under the authority of section 33(1) of that Act. Any questions about the collection of any information can be directed to the Executive Director of the Short-Term Rental Branch, at {email}.'
}
}
},
word: {
Expand Down Expand Up @@ -334,7 +364,7 @@ export default {
site: 'Please enter a valid full url for this brand (i.e. https://www.bcregistry.gov.bc.ca)'
},
business: {
legalName: 'Please enter the business legal name',
legalName: 'Please enter the legal name',
jurisdiction: 'Please enter the business home jurisdiction',
cpbc: 'Please enter the CPBC number'
},
Expand Down Expand Up @@ -391,10 +421,10 @@ export default {
registeredOfficeAttorney: 'Registered Office / Attorney'
},
hint: {
businessLegalNamePlatform: 'The full legal name of the business that is operating the platform. Include corporate designations (e.g., "Ltd.", "Inc.", "LLC.")',
businessLegalNamePlatform: 'The full legal name of the platform service provider',
businessLegalNameStrataHotel: 'The full legal name of the business that is operating the strata hotel. Include corporate designations (e.g., "Ltd.", "Inc.", "LLC.")',
businessNumber: 'Canada Revenue Agency (CRA) Business Number',
humeJurisdiction: 'The regional or federal jurisdiction where the business was incorporated or registered',
humeJurisdiction: 'The regional or federal jurisdiction where the business was incorporated or registered, if applicable',
position: 'Enter your current job title or position'
},
text: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ onMounted(async () => {
<ConnectFormFieldGroup
id="platform-business-home-jur"
v-model="platformBusiness.homeJurisdiction"
:aria-label="$t('label.homeJurisdiction')"
:aria-label="$t('label.homeJurisdictionOpt')"
:help="$t('strr.hint.humeJurisdiction')"
name="homeJurisdiction"
:placeholder="t('label.homeJurisdiction')"
:placeholder="t('label.homeJurisdictionOpt')"
:is-required="true"
/>
<ConnectFormFieldGroup
Expand Down
17 changes: 9 additions & 8 deletions strr-platform-web/app/components/form/platform/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ onMounted(async () => {
:key="'brand' + i"
>
<ConnectFormSection
:title="$t('strr.section.subTitle.brand') + ((i > 0) ? ` ${ i + 1 }` : '')"
:title="$t('strr.section.subTitle.platform') + ((i > 0) ? ` ${ i + 1 }` : '')"
:error="hasFormErrors(platformDetailsFormRef, [`brands.${i}.name`, `brands.${i}.website`])"
>
<div class="space-y-5">
<span>{{ $t('strr.text.listEachPlatform') }}</span>
<div class="flex flex-col gap-5 sm:flex-row-reverse">
<div>
<UButton
Expand All @@ -59,27 +60,27 @@ onMounted(async () => {
<ConnectFormFieldGroup
:id="'platform-brand-name-' + i"
v-model="brand.name"
:aria-label="$t('strr.label.brandName')"
:help="$t('strr.hint.brandName')"
:aria-label="$t('strr.label.platformName')"
:help="$t('strr.hint.platformName')"
:name="`brands.${i}.name`"
:placeholder="$t('strr.label.brandName')"
:placeholder="$t('strr.label.platformName')"
:is-required="true"
/>
<ConnectFormFieldGroup
:id="'platform-brand-site-' + i"
v-model="brand.website"
:aria-label="$t('strr.label.brandSite')"
:help="$t('strr.hint.brandSite')"
:aria-label="$t('strr.label.platformSite')"
:help="$t('strr.hint.platformSite')"
:name="`brands.${i}.website`"
:placeholder="$t('strr.label.brandSite')"
:placeholder="$t('strr.label.platformSite')"
:is-required="true"
type="url"
/>
</div>
</div>
<UButton
v-if="i === platformDetails.brands.length - 1"
:label="$t('strr.label.addBrand')"
:label="$t('strr.label.addPlatform')"
class="px-5 py-3"
color="primary"
icon="i-mdi-domain-plus"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ onMounted(async () => {
class="grid grid-cols-3"
>
<ConnectInfoBox
:title="$t('strr.review.platInfo.brandName', 0)"
:title="$t('strr.review.platInfo.platformName', 0)"
title-class="font-bold text-bcGovGray-900"
content="-"
/>
<ConnectInfoBox
:title="$t('strr.review.platInfo.brandSite', 0)"
:title="$t('strr.review.platInfo.platformSite', 0)"
title-class="font-bold text-bcGovGray-900"
content="-"
/>
Expand All @@ -302,12 +302,12 @@ onMounted(async () => {
]"
>
<ConnectInfoBox
:title="$t('strr.review.platInfo.brandName', { count: i + 1})"
:title="$t('strr.review.platInfo.platformName', { count: i + 1})"
title-class="font-bold text-bcGovGray-900"
:content="brand.name || '-'"
/>
<ConnectInfoBox
:title="$t('strr.review.platInfo.brandSite', { count: i + 1})"
:title="$t('strr.review.platInfo.platformSite', { count: i + 1})"
title-class="font-bold text-bcGovGray-900"
:content="brand.website || '-'"
/>
Expand Down
Loading

0 comments on commit e5ccf63

Please sign in to comment.