@live-change/user-frontend 0.9.131 → 0.9.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,49 @@
1
1
  {
2
+ "auth": {
3
+ "welcomeBack": "Welcome Back",
4
+ "dontHaveAccount": "Don't have an account?",
5
+ "createToday": "Create today!",
6
+ "emailAddress": "Email address",
7
+ "passwordOptional": "Password (optional)",
8
+ "forgotPassword": "Forgot password?",
9
+ "signIn": "Sign In",
10
+ "signInWith": "Sign In with {provider}",
11
+ "signUp": "Sign Up",
12
+ "signUpWith": "Sign Up with {provider}",
13
+ "currentPassword": "Current password",
14
+ "newPassword": "New password",
15
+ "reenterPassword": "Re-enter password",
16
+ "resetPassword": "Reset password",
17
+ "changePassword": "Change password",
18
+ "setPassword": "Set password",
19
+ "passwordChanged": "Password changed",
20
+ "passwordChangedSuccess": "You have successfully set your password.",
21
+ "passwordResetSuccess": "You have successfully changed your password.",
22
+ "unknownLink": "Unknown link",
23
+ "unknownLinkDesc": "We can't find your secret link. Check if you copied the address correctly.",
24
+ "linkUsed": "Link used",
25
+ "linkUsedDesc": "This link was already used.",
26
+ "linkExpired": "Link expired",
27
+ "linkExpiredDesc": "Your password reset authentication already expired.",
28
+ "passwordSuggestions": "Suggestions",
29
+ "suggestionLowercase": "At least one lowercase",
30
+ "suggestionUppercase": "At least one uppercase",
31
+ "suggestionNumeric": "At least one numeric",
32
+ "suggestionMinLength": "Minimum 8 characters",
33
+ "alreadyHaveAccount": "Already have an account?",
34
+ "signInToday": "Sign in today!",
35
+ "signUpWithEmail": "Sign Up with email",
36
+ "privacyConsent": "By providing your email address or google account, you consent to its processing solely for registration and account verification purposes, in accordance with our",
37
+ "privacyPolicy": "Privacy Policy",
38
+ "authenticating": "Authenticating...",
39
+ "authentication": "Authentication",
40
+ "authenticationCanceled": "Authentication canceled by user",
41
+ "authenticationError": "Error during authentication",
42
+ "goBack": "Go back",
43
+ "tryAgain": "Try again",
44
+ "confirmEmail": "Confirm email",
45
+ "confirmPhone": "Confirm phone"
46
+ },
2
47
  "errors": {
3
48
  "emailTaken": "Email is already registered, try to sign-in.",
4
49
  "phoneTaken": "Phone is already registered, try to sign-in.",
@@ -9,9 +54,104 @@
9
54
  "unsafePassword": "Password is unsafe, try to use a stronger one.",
10
55
  "passwordNotMatch": "Passwords do not match."
11
56
  },
57
+ "common": {
58
+ "or": "OR",
59
+ "error": "Error",
60
+ "success": "Success",
61
+ "cancel": "Cancel",
62
+ "save": "Save",
63
+ "delete": "Delete",
64
+ "edit": "Edit",
65
+ "view": "View",
66
+ "close": "Close",
67
+ "testIndex": "Test Index",
68
+ "addTestNotification": "Add test notification"
69
+ },
12
70
  "app": {
13
71
  "updateAvailable": "Update available!",
14
72
  "newVersions": "New version of app is available!",
15
73
  "reload": "Reload"
74
+ },
75
+ "settings": {
76
+ "settings": "SETTINGS",
77
+ "identification": "Identification",
78
+ "generalSettings": "General Settings",
79
+ "languageAndLocale": "Language and Locale",
80
+ "notifications": "Notifications",
81
+ "authorization": "AUTHORIZATION",
82
+ "connectedAccounts": "Connected Accounts",
83
+ "changePassword": "Change Password",
84
+ "deleteAccount": "Delete Account",
85
+ "localeSettings": "Locale settings",
86
+ "language": "Language",
87
+ "autoDetect": "Auto-detect",
88
+ "apply": "Apply",
89
+ "settingsUpdated": "Settings updated",
90
+ "localeSettingsSaved": "Your locale settings have been saved",
91
+ "profile": "Profile",
92
+ "yourName": "Your name",
93
+ "saveName": "Save name",
94
+ "imageEditor": "Image Editor",
95
+ "userImageSaved": "User image saved",
96
+ "userNameSaved": "User name saved"
97
+ },
98
+ "connected": {
99
+ "connectedAccounts": "Connected accounts",
100
+ "addContactType": "Add {type}",
101
+ "addAccountType": "Add {type}",
102
+ "addEmail": "Add Email",
103
+ "addPhone": "Add Phone",
104
+ "addPhoneNumber": "Add phone number",
105
+ "phoneNumber": "Phone number",
106
+ "confirmDisconnectContact": "Do you want to disconnect {type} account {contact}?",
107
+ "confirmDisconnectAccount": "Do you want to disconnect {type} account {account}?",
108
+ "accountDisconnected": "Account disconnected",
109
+ "unknownAccount": "Unknown account",
110
+ "email": "email",
111
+ "phone": "phone",
112
+ "google": "Google",
113
+ "linkedin": "LinkedIn",
114
+ "github": "GitHub"
115
+ },
116
+ "messageAuth": {
117
+ "authenticationDone": "Authentication done",
118
+ "authenticatedInDifferentTab": "You authenticated in a different tab.",
119
+ "code": "Code",
120
+ "messageSent": "Message sent",
121
+ "messageSentDescription": "We sent special secret message to the contact you already provided.",
122
+ "callToAction": "Click on the link or enter the code you found in that message.",
123
+ "toSendAnotherCode": "To send another code click button below.",
124
+ "resendSecretCode": "Resend secret code",
125
+ "codeSent": "Code sent",
126
+ "newCodeSent": "New code sent to you",
127
+ "linkExpiredDesc": "Your secret link already expired. To send another link click button below.",
128
+ "resend": "Resend"
129
+ },
130
+ "common": {
131
+ "or": "OR",
132
+ "error": "Error",
133
+ "success": "Success",
134
+ "cancel": "Cancel",
135
+ "save": "Save",
136
+ "delete": "Delete",
137
+ "edit": "Edit",
138
+ "view": "View",
139
+ "close": "Close",
140
+ "ok": "OK",
141
+ "testIndex": "Test Index",
142
+ "addTestNotification": "Add test notification",
143
+ "rejected": "Rejected",
144
+ "rejectedDetail": "You have rejected"
145
+ },
146
+ "deleteAccount": {
147
+ "deleteAccount": "Delete account",
148
+ "warning": "Account deletion is irreversible, check the box below only if you are 100% sure that you want to delete your account.",
149
+ "confirmCheckbox": "I want to delete my account.",
150
+ "alreadyDeleted": "Account already deleted.",
151
+ "accountDeleted": "Account deleted",
152
+ "feedbackRequest": "Account has been deleted, please leave feedback why you are leaving us.",
153
+ "send": "Send",
154
+ "feedbackSent": "Feedback sent",
155
+ "thankYou": "Thank you for your feedback."
16
156
  }
17
157
  }
@@ -0,0 +1,34 @@
1
+ import messages from "./pl.json"
2
+
3
+ import { locales as autoFormLocales } from "@live-change/frontend-auto-form"
4
+
5
+ export { messages }
6
+
7
+ export const numberFormats = {
8
+ "pln": {
9
+ "style": "currency",
10
+ "currency": "PLN",
11
+ "notation": "standard"
12
+ },
13
+ "usd": {
14
+ "style": "currency",
15
+ "currency": "USD",
16
+ "notation": "standard"
17
+ }
18
+ }
19
+
20
+ export const datetimeFormats = {
21
+ "short": {
22
+ "year": "numeric", "month": "short", "day": "numeric"
23
+ },
24
+ "shortTime": {
25
+ "dateStyle": "short", "timeStyle": "short", "hour12": false
26
+ },
27
+ "shortestTime": {
28
+ "month": "numeric", "day": "numeric", "hour": "numeric", "minute": "numeric", "hour12": false
29
+ },
30
+ "long": {
31
+ "year": "numeric", "month": "short", "day": "numeric",
32
+ "weekday": "short", "hour": "numeric", "minute": "numeric"
33
+ }
34
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "auth": {
3
+ "welcomeBack": "Witaj ponownie",
4
+ "dontHaveAccount": "Nie masz konta?",
5
+ "createToday": "Utwórz dzisiaj!",
6
+ "emailAddress": "Adres email",
7
+ "passwordOptional": "Hasło (opcjonalne)",
8
+ "forgotPassword": "Zapomniałeś hasła?",
9
+ "signIn": "Zaloguj się",
10
+ "signInWith": "Zaloguj się przez {provider}",
11
+ "signUp": "Zarejestruj się",
12
+ "signUpWith": "Zarejestruj się przez {provider}",
13
+ "currentPassword": "Aktualne hasło",
14
+ "newPassword": "Nowe hasło",
15
+ "reenterPassword": "Powtórz hasło",
16
+ "resetPassword": "Resetuj hasło",
17
+ "changePassword": "Zmień hasło",
18
+ "setPassword": "Ustaw hasło",
19
+ "passwordChanged": "Hasło zmienione",
20
+ "passwordChangedSuccess": "Pomyślnie ustawiłeś swoje hasło.",
21
+ "passwordResetSuccess": "Pomyślnie zmieniłeś swoje hasło.",
22
+ "unknownLink": "Nieznany link",
23
+ "unknownLinkDesc": "Nie możemy znaleźć twojego tajnego linku. Sprawdź, czy skopiowałeś adres poprawnie.",
24
+ "linkUsed": "Link użyty",
25
+ "linkUsedDesc": "Ten link został już użyty.",
26
+ "linkExpired": "Link wygasł",
27
+ "linkExpiredDesc": "Twoja autoryzacja resetu hasła już wygasła.",
28
+ "passwordSuggestions": "Sugestie",
29
+ "suggestionLowercase": "Co najmniej jedna mała litera",
30
+ "suggestionUppercase": "Co najmniej jedna wielka litera",
31
+ "suggestionNumeric": "Co najmniej jedna cyfra",
32
+ "suggestionMinLength": "Minimum 8 znaków",
33
+ "alreadyHaveAccount": "Masz już konto?",
34
+ "signInToday": "Zaloguj się dzisiaj!",
35
+ "signUpWithEmail": "Zarejestruj się przez email",
36
+ "privacyConsent": "Podając swój adres email lub konto google, wyrażasz zgodę na jego przetwarzanie wyłącznie w celach rejestracji i weryfikacji konta, zgodnie z naszą",
37
+ "privacyPolicy": "Polityką Prywatności",
38
+ "authenticating": "Uwierzytelnianie...",
39
+ "authentication": "Uwierzytelnianie",
40
+ "authenticationCanceled": "Uwierzytelnianie anulowane przez użytkownika",
41
+ "authenticationError": "Błąd podczas uwierzytelniania",
42
+ "goBack": "Wróć",
43
+ "tryAgain": "Spróbuj ponownie",
44
+ "confirmEmail": "Potwierdź email",
45
+ "confirmPhone": "Potwierdź telefon"
46
+ },
47
+ "errors": {
48
+ "emailTaken": "Email jest już zarejestrowany, spróbuj się zalogować.",
49
+ "phoneTaken": "Telefon jest już zarejestrowany, spróbuj się zalogować.",
50
+ "codeNotFound": "Tajny kod nierozpoznany.",
51
+ "codeExpired": "Tajny kod wygasł.",
52
+ "wrongPassword": "Błędne hasło.",
53
+ "emailNotFound": "Email nie znaleziony.",
54
+ "unsafePassword": "Hasło niebezpieczne, spróbuj użyć silniejszego.",
55
+ "passwordNotMatch": "Hasła nie pasują."
56
+ },
57
+ "common": {
58
+ "or": "LUB",
59
+ "error": "Błąd",
60
+ "success": "Sukces",
61
+ "cancel": "Anuluj",
62
+ "save": "Zapisz",
63
+ "delete": "Usuń",
64
+ "edit": "Edytuj",
65
+ "view": "Pokaż",
66
+ "close": "Zamknij",
67
+ "testIndex": "Indeks testowy",
68
+ "addTestNotification": "Dodaj testowe powiadomienie"
69
+ },
70
+ "app": {
71
+ "updateAvailable": "Dostępna aktualizacja!",
72
+ "newVersions": "Dostępna nowa wersja aplikacji!",
73
+ "reload": "Odśwież"
74
+ },
75
+ "settings": {
76
+ "settings": "USTAWIENIA",
77
+ "identification": "Identyfikacja",
78
+ "generalSettings": "Ustawienia ogólne",
79
+ "languageAndLocale": "Język i lokalizacja",
80
+ "notifications": "Powiadomienia",
81
+ "authorization": "AUTORYZACJA",
82
+ "connectedAccounts": "Połączone konta",
83
+ "changePassword": "Zmień hasło",
84
+ "deleteAccount": "Usuń konto",
85
+ "localeSettings": "Ustawienia lokalizacji",
86
+ "language": "Język",
87
+ "autoDetect": "Automatyczne wykrywanie",
88
+ "apply": "Zastosuj",
89
+ "settingsUpdated": "Ustawienia zaktualizowane",
90
+ "localeSettingsSaved": "Twoje ustawienia lokalizacji zostały zapisane",
91
+ "profile": "Profil",
92
+ "yourName": "Twoje imię",
93
+ "saveName": "Zapisz imię",
94
+ "imageEditor": "Edytor obrazów",
95
+ "userImageSaved": "Obraz użytkownika zapisany",
96
+ "userNameSaved": "Imię użytkownika zapisane"
97
+ },
98
+ "connected": {
99
+ "connectedAccounts": "Połączone konta",
100
+ "addContactType": "Dodaj {type}",
101
+ "addAccountType": "Dodaj {type}",
102
+ "addEmail": "Dodaj Email",
103
+ "addPhone": "Dodaj Telefon",
104
+ "addPhoneNumber": "Dodaj numer telefonu",
105
+ "phoneNumber": "Numer telefonu",
106
+ "confirmDisconnectContact": "Czy chcesz odłączyć konto {type} {contact}?",
107
+ "confirmDisconnectAccount": "Czy chcesz odłączyć konto {type} {account}?",
108
+ "accountDisconnected": "Konto odłączone",
109
+ "unknownAccount": "Nieznane konto",
110
+ "email": "email",
111
+ "phone": "telefon",
112
+ "google": "Google",
113
+ "linkedin": "LinkedIn",
114
+ "github": "GitHub"
115
+ },
116
+ "messageAuth": {
117
+ "authenticationDone": "Uwierzytelnianie zakończone",
118
+ "authenticatedInDifferentTab": "Uwierzytelniłeś się w innej karcie.",
119
+ "code": "Kod",
120
+ "messageSent": "Wiadomość wysłana",
121
+ "messageSentDescription": "Wysłaliśmy specjalną tajną wiadomość na podany przez Ciebie kontakt.",
122
+ "callToAction": "Kliknij w link lub wprowadź kod, który znalazłeś w tej wiadomości.",
123
+ "toSendAnotherCode": "Aby wysłać kolejny kod, kliknij przycisk poniżej.",
124
+ "resendSecretCode": "Wyślij ponownie tajny kod",
125
+ "codeSent": "Kod wysłany",
126
+ "newCodeSent": "Nowy kod został do Ciebie wysłany",
127
+ "linkExpiredDesc": "Twój tajny link już wygasł. Aby wysłać kolejny link, kliknij przycisk poniżej.",
128
+ "resend": "Wyślij ponownie"
129
+ },
130
+ "common": {
131
+ "or": "LUB",
132
+ "error": "Błąd",
133
+ "success": "Sukces",
134
+ "cancel": "Anuluj",
135
+ "save": "Zapisz",
136
+ "delete": "Usuń",
137
+ "edit": "Edytuj",
138
+ "view": "Pokaż",
139
+ "close": "Zamknij",
140
+ "ok": "OK",
141
+ "testIndex": "Indeks testowy",
142
+ "addTestNotification": "Dodaj testowe powiadomienie",
143
+ "rejected": "Odrzucone",
144
+ "rejectedDetail": "Odrzuciłeś"
145
+ },
146
+ "deleteAccount": {
147
+ "deleteAccount": "Usuń konto",
148
+ "warning": "Usunięcie konta jest nieodwracalne, zaznacz pole poniżej tylko jeśli jesteś w 100% pewny, że chcesz usunąć swoje konto.",
149
+ "confirmCheckbox": "Chcę usunąć moje konto.",
150
+ "alreadyDeleted": "Konto już usunięte.",
151
+ "accountDeleted": "Konto usunięte",
152
+ "feedbackRequest": "Konto zostało usunięte, zostaw opinię dlaczego nas opuszczasz.",
153
+ "send": "Wyślij",
154
+ "feedbackSent": "Opinia wysłana",
155
+ "thankYou": "Dziękujemy za Twoją opinię."
156
+ }
157
+ }
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="w-full lg:w-6/12 md:w-9/12">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 rounded-border shadow p-6">
4
- <div class="text-surface-900 dark:text-surface-0 text-red-500 font-medium mb-4 text-xl">Test Index</div>
4
+ <div class="text-surface-900 dark:text-surface-0 text-red-500 font-medium mb-4 text-xl">{{ t('common.testIndex') }}</div>
5
5
  <div>
6
- <Button @click="testNotification" label="Add test notification" />
6
+ <Button @click="testNotification" :label="t('common.addTestNotification')" />
7
7
  </div>
8
8
  </div>
9
9
  </div>
@@ -12,6 +12,8 @@
12
12
  <script setup>
13
13
 
14
14
  import { useApi } from '@live-change/vue3-ssr'
15
+ import { useI18n } from 'vue-i18n'
16
+ const { t } = useI18n()
15
17
 
16
18
  const api = useApi()
17
19
 
@@ -2,7 +2,7 @@
2
2
  <div class="w-full lg:w-6/12 md:w-9/12 max-w-[32rem]" v-shared-element:form="{ duration: '300ms', includeChildren: true }">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border">
4
4
  <div class="text-center mb-8">
5
- <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">Add email</div>
5
+ <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">{{ t('connected.addEmail') }}</div>
6
6
  </div>
7
7
 
8
8
  <command-form service="messageAuthentication" action="connectEmail" v-slot="{ data }"
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="p-field mb-4">
12
12
  <label for="email" class="block text-surface-900 dark:text-surface-0 font-medium mb-2">
13
- Email address
13
+ {{ t('auth.emailAddress') }}
14
14
  </label>
15
15
  <InputText id="email" type="text" class="w-full"
16
16
  aria-describedby="email-help" :invalid="!!data.emailError"
@@ -20,14 +20,14 @@
20
20
  </Message>
21
21
  </div>
22
22
 
23
- <Button label="Add Email" icon="pi pi-envelope" class="w-full" type="submit" />
23
+ <Button :label="t('connected.addEmail')" icon="pi pi-envelope" class="w-full" type="submit" />
24
24
 
25
25
  <Divider align="center" class="my-6">
26
- <span class="text-surface-600 dark:text-surface-200 font-normal text-sm">OR</span>
26
+ <span class="text-surface-600 dark:text-surface-200 font-normal text-sm">{{ t('common.or') }}</span>
27
27
  </Divider>
28
28
 
29
29
  <router-link :to="{ name: 'user:connect-phone' }">
30
- <Button label="Add Phone" icon="pi pi-mobile" class="w-full p-button-secondary mb-2" />
30
+ <Button :label="t('connected.addPhone')" icon="pi pi-mobile" class="w-full p-button-secondary mb-2" />
31
31
  </router-link>
32
32
 
33
33
  <!-- <Button label="Connect GitHub account" icon="pi pi-github" class="w-full p-button-secondary mb-2"></Button>
@@ -2,7 +2,7 @@
2
2
  <div class="w-full lg:w-6/12 md:w-9/12 max-w-[32rem]" v-shared-element:form="{ duration: '300ms', includeChildren: true }">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border">
4
4
  <div class="text-center mb-8">
5
- <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">Add phone number</div>
5
+ <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">{{ t('connected.addPhoneNumber') }}</div>
6
6
  </div>
7
7
 
8
8
  <command-form service="messageAuthentication" action="connectPhone" v-slot="{ data }"
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="p-field mb-4">
12
12
  <label for="email" class="block text-surface-900 dark:text-surface-0 font-medium mb-2">
13
- Phone number
13
+ {{ t('connected.phoneNumber') }}
14
14
  </label>
15
15
  <PhoneInput id="phone" class="w-full"
16
16
  aria-describedby="phone-help" :class="{ 'p-invalid': data.phoneError }"
@@ -20,14 +20,14 @@
20
20
  </Message>
21
21
  </div>
22
22
 
23
- <Button label="Add Phone" icon="pi pi-mobile" class="w-full" type="submit" />
23
+ <Button :label="t('connected.addPhone')" icon="pi pi-mobile" class="w-full" type="submit" />
24
24
 
25
25
  <Divider align="center" class="my-6">
26
- <span class="text-surface-600 dark:text-surface-200 font-normal text-sm">OR</span>
26
+ <span class="text-surface-600 dark:text-surface-200 font-normal text-sm">{{ t('common.or') }}</span>
27
27
  </Divider>
28
28
 
29
29
  <router-link :to="{ name: 'user:connect-email' }">
30
- <Button label="Add Email" icon="pi pi-envelope" class="w-full p-button-secondary mb-2" />
30
+ <Button :label="t('connected.addEmail')" icon="pi pi-envelope" class="w-full p-button-secondary mb-2" />
31
31
  </router-link>
32
32
 
33
33
  <!-- <Button label="Connect GitHub account" icon="pi pi-github" class="w-full p-button-secondary mb-2"></Button>-->
@@ -5,7 +5,7 @@
5
5
  <Toast v-if="isMounted" />
6
6
 
7
7
  <div class="bg-surface-0 dark:bg-surface-900 rounded-border shadow p-6">
8
- <div class="text-surface-900 dark:text-surface-0 font-medium mb-4 text-xl">Connected accounts</div>
8
+ <div class="text-surface-900 dark:text-surface-0 font-medium mb-4 text-xl">{{ t('connected.connectedAccounts') }}</div>
9
9
 
10
10
  <ul class="list-none p-0 m-0 mt-8 mb-6">
11
11
 
@@ -40,15 +40,15 @@
40
40
  <router-link v-for="contactType in contactsTypes"
41
41
  :to="{ name: 'user:connect-'+contactType.contactType }" class="mr-2 no-underline block mb-1">
42
42
  <Button v-if="contactType.contactType === 'email'"
43
- :label="'Add '+contactType.contactType" icon="pi pi-envelope" id="connect" />
43
+ :label="t('connected.addEmail')" icon="pi pi-envelope" id="connect" />
44
44
  <Button v-else-if="contactType.contactType === 'phone'"
45
- :label="'Add '+contactType.contactType" icon="pi pi-phone" id="connect" />
46
- <Button v-else :label="'Add '+contactType.contactType" icon="pi pi-envelope" id="connect" />
45
+ :label="t('connected.addPhone')" icon="pi pi-phone" id="connect" />
46
+ <Button v-else :label="t('connected.addContactType', { type: t(`connected.${contactType.contactType}`) })" icon="pi pi-envelope" id="connect" />
47
47
  </router-link>
48
48
  <template v-for="accountType in accountTypes">
49
49
  <router-link v-if="connectAccountRoute(accountType)"
50
50
  :to="connectAccountRoute(accountType)" class="mr-2 no-underline block mb-1">
51
- <Button v :label="'Add '+accountType.accountType" icon="pi pi-google" id="connect" />
51
+ <Button v :label="t('connected.addAccountType', { type: t(`connected.${accountType.accountType}`) })" icon="pi pi-google" id="connect" />
52
52
  </router-link>
53
53
  </template>
54
54
 
@@ -86,6 +86,9 @@
86
86
 
87
87
  import { formatPhoneNumber } from '../phone/phoneNumber.js'
88
88
 
89
+ import { useI18n } from 'vue-i18n'
90
+ const { t } = useI18n()
91
+
89
92
  const workingZone = inject('workingZone')
90
93
 
91
94
  import { useApi, live, usePath, useActions } from '@live-change/vue3-ssr'
@@ -98,18 +101,18 @@
98
101
  const { contactType, id: contact } = contactData
99
102
  confirm.require({
100
103
  target: event.currentTarget,
101
- message: `Do you want to disconnect ${contactType.contactType} account ${contact}?`,
104
+ message: t('connected.confirmDisconnectContact', { type: t(`connected.${contactType.contactType}`), contact }),
102
105
  icon: 'pi pi-info-circle',
103
106
  acceptClass: 'p-button-danger',
104
107
  accept: async () => {
105
108
  const upperCaseType = contactType.contactType[0].toUpperCase() + contactType.contactType.slice(1)
106
109
  workingZone.addPromise('disconnectContact', (async () => {
107
110
  await messageAuthenticationApi['disconnect'+upperCaseType]({ [contactType.contactType]: contact })
108
- toast.add({ severity: 'info', summary: 'Account disconnected', life: 1500 })
111
+ toast.add({ severity: 'info', summary: t('connected.accountDisconnected'), life: 1500 })
109
112
  })())
110
113
  },
111
114
  reject: () => {
112
- toast.add({ severity: 'error', summary: 'Rejected', detail: 'You have rejected', life: 3000 })
115
+ toast.add({ severity: 'error', summary: t('common.rejected'), detail: t('common.rejectedDetail'), life: 3000 })
113
116
  }
114
117
  })
115
118
  }
@@ -118,18 +121,18 @@
118
121
  const { accountType, id: account } = contactData
119
122
  confirm.require({
120
123
  target: event.currentTarget,
121
- message: `Do you want to disconnect ${accountType.accountType} account ${name || account}?`,
124
+ message: t('connected.confirmDisconnectAccount', { type: t(`connected.${accountType.accountType}`), account: name || account }),
122
125
  icon: 'pi pi-info-circle',
123
126
  acceptClass: 'p-button-danger',
124
127
  accept: async () => {
125
128
  const upperCaseType = accountType.accountType[0].toUpperCase() + accountType.accountType.slice(1)
126
129
  workingZone.addPromise('disconnectAccount', (async () => {
127
130
  await api.actions[accountType.accountType+'Authentication']['disconnect'+upperCaseType]({ account })
128
- toast.add({ severity: 'info', summary: 'Account disconnected', life: 1500 })
131
+ toast.add({ severity: 'info', summary: t('connected.accountDisconnected'), life: 1500 })
129
132
  })())
130
133
  },
131
134
  reject: () => {
132
- toast.add({ severity: 'error', summary: 'Rejected', detail: 'You have rejected', life: 3000 })
135
+ toast.add({ severity: 'error', summary: t('common.rejected'), detail: t('common.rejectedDetail'), life: 3000 })
133
136
  }
134
137
  })
135
138
  }
@@ -17,8 +17,11 @@
17
17
 
18
18
  const { account } = toRefs(props)
19
19
 
20
+ import { useI18n } from 'vue-i18n'
21
+ const { t } = useI18n()
22
+
20
23
  const cleanAccountInfo = computed(() => {
21
- if(!account.value) return "Unknown account"
24
+ if(!account.value) return t('connected.unknownAccount')
22
25
  const { accountType, ...rest } = account.value
23
26
  return { ...rest, accountType: accountType.accountType }
24
27
  })
@@ -3,24 +3,23 @@
3
3
 
4
4
  <div class="bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border">
5
5
  <div class="text-center mb-8">
6
- <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">Delete account</div>
6
+ <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">{{ t('deleteAccount.deleteAccount') }}</div>
7
7
  </div>
8
8
 
9
9
  <div v-if="client.user">
10
10
  <p>
11
- Account deletion is irreversible, check the box below only if you are
12
- 100% sure that you want to delete your account.
11
+ {{ t('deleteAccount.warning') }}
13
12
  </p>
14
13
  <div class="p-field-checkbox mb-4">
15
14
  <Checkbox id="deleteCheckbox" v-model="wantDelete" :binary="true" />
16
- <label for="deleteCheckbox" class="ml-2">I want to delete my account.</label>
15
+ <label for="deleteCheckbox" class="ml-2">{{ t('deleteAccount.confirmCheckbox') }}</label>
17
16
  </div>
18
17
 
19
- <Button id="delete" label="Delete account" icon="pi pi-user-minus" class="p-button-lg"
18
+ <Button id="delete" :label="t('deleteAccount.deleteAccount')" icon="pi pi-user-minus" class="p-button-lg"
20
19
  :disabled="!wantDelete" @click="deleteUser" />
21
20
  </div>
22
21
  <div v-else>
23
- Account already deleted.
22
+ {{ t('deleteAccount.alreadyDeleted') }}
24
23
  </div>
25
24
  </div>
26
25
  </div>
@@ -37,6 +36,9 @@
37
36
  import { useClient } from '@live-change/vue3-ssr'
38
37
  const client = useClient()
39
38
 
39
+ import { useI18n } from 'vue-i18n'
40
+ const { t } = useI18n()
41
+
40
42
  const workingZone = inject('workingZone')
41
43
 
42
44
  const wantDelete = ref(false)
@@ -1,14 +1,15 @@
1
1
  <template>
2
2
  <div class="w-full lg:w-6/12 md:w-9/12 max-w-[32rem]" v-shared-element:form="{ duration: '300ms', includeChildren: true }">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 rounded-border shadow p-6">
4
- <div class="text-surface-900 dark:text-surface-0 font-medium mb-4 text-xl mb-6">Feedback sent</div>
5
- <p class="mt-0 p-0 leading-normal">Thank you for your feedback.</p>
4
+ <div class="text-surface-900 dark:text-surface-0 font-medium mb-4 text-xl mb-6">{{ t('deleteAccount.feedbackSent') }}</div>
5
+ <p class="mt-0 p-0 leading-normal">{{ t('deleteAccount.thankYou') }}</p>
6
6
  </div>
7
7
  </div>
8
8
  </template>
9
9
 
10
10
  <script setup>
11
-
11
+ import { useI18n } from 'vue-i18n'
12
+ const { t } = useI18n()
12
13
  </script>
13
14
 
14
15
  <style>
@@ -2,16 +2,16 @@
2
2
  <div class="w-full lg:w-6/12 md:w-9/12 max-w-[32rem]" v-shared-element:form="{ duration: '300ms', includeChildren: true }">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border">
4
4
  <div class="text-center mb-8">
5
- <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">Account deleted</div>
5
+ <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">{{ t('deleteAccount.accountDeleted') }}</div>
6
6
  </div>
7
7
 
8
8
  <div class="mb-4">
9
- Account has been deleted, please leave feedback why you are leaving us.
9
+ {{ t('deleteAccount.feedbackRequest') }}
10
10
  </div>
11
11
 
12
12
  <Textarea class="w-full" :autoResize="true" rows="4" cols="30" />
13
13
  <div class="flex flex-row items-end">
14
- <Button label="Send" icon="pi pi-send" class="ml-auto p-button-lg"></Button>
14
+ <Button :label="t('deleteAccount.send')" icon="pi pi-send" class="ml-auto p-button-lg"></Button>
15
15
  </div>
16
16
 
17
17
  </div>
@@ -25,6 +25,9 @@
25
25
  import Divider from "primevue/divider"
26
26
  import Textarea from "primevue/textarea"
27
27
 
28
+ import { useI18n } from 'vue-i18n'
29
+ const { t } = useI18n()
30
+
28
31
  </script>
29
32
 
30
33
  <style>