@greatapps/common 1.1.670 → 1.1.672
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.
- package/dist/components/layouts/NavBar.mjs +5 -3
- package/dist/components/layouts/NavBar.mjs.map +1 -1
- package/dist/components/layouts/NotificationsPopover.mjs +5 -3
- package/dist/components/layouts/NotificationsPopover.mjs.map +1 -1
- package/dist/components/layouts/ProfilePopover.mjs +6 -4
- package/dist/components/layouts/ProfilePopover.mjs.map +1 -1
- package/dist/components/layouts/UsersSelectorPopover.mjs +9 -7
- package/dist/components/layouts/UsersSelectorPopover.mjs.map +1 -1
- package/dist/components/modals/BuyCreditsModal.mjs +17 -18
- package/dist/components/modals/BuyCreditsModal.mjs.map +1 -1
- package/dist/components/modals/CreditsDisabledModal.mjs +6 -4
- package/dist/components/modals/CreditsDisabledModal.mjs.map +1 -1
- package/dist/components/modals/PaidPlanRequiredModal.mjs +5 -3
- package/dist/components/modals/PaidPlanRequiredModal.mjs.map +1 -1
- package/dist/components/modals/cards/AddCardModal.mjs +27 -24
- package/dist/components/modals/cards/AddCardModal.mjs.map +1 -1
- package/dist/components/modals/cards/CannotDeleteCardModal.mjs +9 -7
- package/dist/components/modals/cards/CannotDeleteCardModal.mjs.map +1 -1
- package/dist/components/modals/cards/CardFormFields.mjs +25 -22
- package/dist/components/modals/cards/CardFormFields.mjs.map +1 -1
- package/dist/components/modals/cards/DeleteCardModal.mjs +10 -8
- package/dist/components/modals/cards/DeleteCardModal.mjs.map +1 -1
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs +4 -2
- package/dist/components/navigation/CancelledSubscriptionBanner.mjs.map +1 -1
- package/dist/components/navigation/OverdueInvoiceBanner.mjs +4 -2
- package/dist/components/navigation/OverdueInvoiceBanner.mjs.map +1 -1
- package/dist/components/navigation/PendingCancellationBanner.mjs +4 -6
- package/dist/components/navigation/PendingCancellationBanner.mjs.map +1 -1
- package/dist/components/navigation/ProjectSelectorPopover.mjs +8 -6
- package/dist/components/navigation/ProjectSelectorPopover.mjs.map +1 -1
- package/dist/components/navigation/UpcomingInvoiceBanner.mjs +4 -6
- package/dist/components/navigation/UpcomingInvoiceBanner.mjs.map +1 -1
- package/dist/components/navigation/subcomponents/BottomLinks.mjs +5 -3
- package/dist/components/navigation/subcomponents/BottomLinks.mjs.map +1 -1
- package/dist/components/navigation/subcomponents/CreditsCard.mjs +3 -1
- package/dist/components/navigation/subcomponents/CreditsCard.mjs.map +1 -1
- package/dist/components/navigation/subcomponents/PlanCard.mjs +3 -1
- package/dist/components/navigation/subcomponents/PlanCard.mjs.map +1 -1
- package/dist/components/navigation/subcomponents/ProjectSelector.mjs +5 -3
- package/dist/components/navigation/subcomponents/ProjectSelector.mjs.map +1 -1
- package/dist/components/pages/NotFoundPage.mjs +5 -3
- package/dist/components/pages/NotFoundPage.mjs.map +1 -1
- package/dist/components/pages/notifications/Notifications.mjs +13 -10
- package/dist/components/pages/notifications/Notifications.mjs.map +1 -1
- package/dist/components/ui/buttons/CopyButton.mjs +9 -5
- package/dist/components/ui/buttons/CopyButton.mjs.map +1 -1
- package/dist/components/ui/data-display/CardItem.mjs +7 -5
- package/dist/components/ui/data-display/CardItem.mjs.map +1 -1
- package/dist/components/ui/data-display/PaymentInfoCard.mjs +10 -8
- package/dist/components/ui/data-display/PaymentInfoCard.mjs.map +1 -1
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs +3 -1
- package/dist/components/ui/feedback/DefaultCircularProgress.mjs.map +1 -1
- package/dist/components/ui/form/ComboboxField.mjs +11 -6
- package/dist/components/ui/form/ComboboxField.mjs.map +1 -1
- package/dist/components/ui/form/DatePicker.mjs +5 -2
- package/dist/components/ui/form/DatePicker.mjs.map +1 -1
- package/dist/components/ui/form/DateRangePicker.mjs +5 -2
- package/dist/components/ui/form/DateRangePicker.mjs.map +1 -1
- package/dist/components/ui/form/PhoneInput.mjs +5 -3
- package/dist/components/ui/form/PhoneInput.mjs.map +1 -1
- package/dist/components/ui/form/SelectField.mjs +6 -3
- package/dist/components/ui/form/SelectField.mjs.map +1 -1
- package/dist/components/widgets/ImageUpload/ImageCropModal.mjs +11 -18
- package/dist/components/widgets/ImageUpload/ImageCropModal.mjs.map +1 -1
- package/dist/components/widgets/ImageUpload/ImageTooSmallModal.mjs +6 -15
- package/dist/components/widgets/ImageUpload/ImageTooSmallModal.mjs.map +1 -1
- package/dist/i18n/messages/en-us.mjs +231 -0
- package/dist/i18n/messages/en-us.mjs.map +1 -1
- package/dist/i18n/messages/es-es.mjs +231 -0
- package/dist/i18n/messages/es-es.mjs.map +1 -1
- package/dist/i18n/messages/pt-br.mjs +239 -0
- package/dist/i18n/messages/pt-br.mjs.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/dist/modules/cards/hooks/handle-delete-card.hook.mjs +2 -1
- package/dist/modules/cards/hooks/handle-delete-card.hook.mjs.map +1 -1
- package/dist/modules/plans/utils/map-api-plan-to-ui.mjs +7 -2
- package/dist/modules/plans/utils/map-api-plan-to-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/layouts/NavBar.tsx +5 -3
- package/src/components/layouts/NotificationsPopover.tsx +5 -3
- package/src/components/layouts/ProfilePopover.tsx +6 -4
- package/src/components/layouts/UsersSelectorPopover.tsx +9 -7
- package/src/components/modals/BuyCreditsModal.tsx +18 -16
- package/src/components/modals/CreditsDisabledModal.tsx +6 -6
- package/src/components/modals/PaidPlanRequiredModal.tsx +5 -3
- package/src/components/modals/cards/AddCardModal.tsx +29 -27
- package/src/components/modals/cards/CannotDeleteCardModal.tsx +9 -8
- package/src/components/modals/cards/CardFormFields.tsx +25 -22
- package/src/components/modals/cards/DeleteCardModal.tsx +10 -8
- package/src/components/navigation/CancelledSubscriptionBanner.tsx +4 -2
- package/src/components/navigation/OverdueInvoiceBanner.tsx +4 -2
- package/src/components/navigation/PendingCancellationBanner.tsx +4 -2
- package/src/components/navigation/ProjectSelectorPopover.tsx +8 -6
- package/src/components/navigation/UpcomingInvoiceBanner.tsx +4 -2
- package/src/components/navigation/subcomponents/BottomLinks.tsx +5 -3
- package/src/components/navigation/subcomponents/CreditsCard.tsx +3 -1
- package/src/components/navigation/subcomponents/PlanCard.tsx +3 -1
- package/src/components/navigation/subcomponents/ProjectSelector.tsx +5 -3
- package/src/components/pages/NotFoundPage.tsx +5 -3
- package/src/components/pages/notifications/Notifications.tsx +13 -10
- package/src/components/ui/buttons/CopyButton.tsx +10 -5
- package/src/components/ui/data-display/CardItem.tsx +7 -5
- package/src/components/ui/data-display/PaymentInfoCard.tsx +10 -8
- package/src/components/ui/feedback/DefaultCircularProgress.tsx +3 -1
- package/src/components/ui/form/ComboboxField.tsx +11 -6
- package/src/components/ui/form/DatePicker.tsx +5 -2
- package/src/components/ui/form/DateRangePicker.tsx +5 -2
- package/src/components/ui/form/PhoneInput.tsx +5 -3
- package/src/components/ui/form/SelectField.tsx +6 -3
- package/src/components/widgets/ImageUpload/ImageCropModal.tsx +19 -11
- package/src/components/widgets/ImageUpload/ImageTooSmallModal.tsx +6 -5
- package/src/i18n/messages/en-us.ts +234 -0
- package/src/i18n/messages/es-es.ts +234 -0
- package/src/i18n/messages/pt-br.ts +248 -0
- package/src/index.ts +4 -1
- package/src/modules/cards/hooks/handle-delete-card.hook.ts +8 -3
- package/src/modules/plans/utils/map-api-plan-to-ui.ts +19 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useState, forwardRef, useEffect } from "react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
4
5
|
import { format } from "date-fns";
|
|
5
6
|
import { Calendar } from "./Calendar";
|
|
6
7
|
import { Popover, PopoverContent, PopoverTrigger } from "../overlay/Popover";
|
|
@@ -23,9 +24,11 @@ interface DatePickerProps {
|
|
|
23
24
|
|
|
24
25
|
export const DatePicker = forwardRef<HTMLButtonElement, DatePickerProps>(
|
|
25
26
|
(
|
|
26
|
-
{ value, onChange, placeholder
|
|
27
|
+
{ value, onChange, placeholder, className, disabled },
|
|
27
28
|
ref,
|
|
28
29
|
) => {
|
|
30
|
+
const translate = useTranslations();
|
|
31
|
+
const resolvedPlaceholder = placeholder ?? translate('common.forms.datePicker.placeholder');
|
|
29
32
|
const [open, setOpen] = useState(false);
|
|
30
33
|
const [date, setDate] = useState<Date | undefined>(() => {
|
|
31
34
|
return value ? isoParaDataLocal(value) : undefined;
|
|
@@ -51,7 +54,7 @@ export const DatePicker = forwardRef<HTMLButtonElement, DatePickerProps>(
|
|
|
51
54
|
}
|
|
52
55
|
};
|
|
53
56
|
|
|
54
|
-
const displayText = date ? format(date, "dd/MM/yyyy") :
|
|
57
|
+
const displayText = date ? format(date, "dd/MM/yyyy") : resolvedPlaceholder;
|
|
55
58
|
|
|
56
59
|
return (
|
|
57
60
|
<Popover open={open} onOpenChange={setOpen}>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useState, forwardRef, useEffect } from "react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
4
5
|
import { format } from "date-fns";
|
|
5
6
|
import { IconCalendar } from '@tabler/icons-react';
|
|
6
7
|
import { DateRange } from "react-day-picker";
|
|
@@ -24,7 +25,9 @@ interface DateRangePickerProps {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export const DateRangePicker = forwardRef<HTMLButtonElement, DateRangePickerProps>(
|
|
27
|
-
({ value, onChange, placeholder
|
|
28
|
+
({ value, onChange, placeholder, className, disabled }, ref) => {
|
|
29
|
+
const translate = useTranslations();
|
|
30
|
+
const resolvedPlaceholder = placeholder ?? translate('common.forms.dateRangePicker.placeholder');
|
|
28
31
|
const [open, setOpen] = useState(false);
|
|
29
32
|
const [range, setRange] = useState<DateRange | undefined>(() => {
|
|
30
33
|
if (value?.from && value?.to) {
|
|
@@ -62,7 +65,7 @@ export const DateRangePicker = forwardRef<HTMLButtonElement, DateRangePickerProp
|
|
|
62
65
|
|
|
63
66
|
const displayText = range?.from && range?.to
|
|
64
67
|
? `${format(range.from, "dd/MM/yyyy")} - ${format(range.to, "dd/MM/yyyy")}`
|
|
65
|
-
:
|
|
68
|
+
: resolvedPlaceholder;
|
|
66
69
|
|
|
67
70
|
return (
|
|
68
71
|
<Popover open={open} onOpenChange={setOpen}>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import { useTranslations } from 'next-intl';
|
|
4
5
|
import { AsYouType, CountryCode } from 'libphonenumber-js';
|
|
5
6
|
import { Input, Separator, Popover, PopoverTrigger, PopoverContent, cn } from '@greatapps/common';
|
|
6
7
|
import { IconChevronDown, IconSearch } from '@tabler/icons-react';
|
|
@@ -41,6 +42,7 @@ export default function PhoneInput({
|
|
|
41
42
|
classnameContainer,
|
|
42
43
|
className,
|
|
43
44
|
}: PhoneInputProps) {
|
|
45
|
+
const translate = useTranslations();
|
|
44
46
|
const parsed = parsePhoneValue(value ?? '');
|
|
45
47
|
const [selectedCountry, setSelectedCountry] = useState<Country>(parsed.country);
|
|
46
48
|
const [phoneNumber, setPhoneNumber] = useState(parsed.number);
|
|
@@ -115,7 +117,7 @@ export default function PhoneInput({
|
|
|
115
117
|
{label && (
|
|
116
118
|
<div className="flex items-center gap-1 paragraph-xsmall-semibold">
|
|
117
119
|
<span className="text-zinc-600">{label}</span>
|
|
118
|
-
{optional && <span className="text-zinc-500">(
|
|
120
|
+
{optional && <span className="text-zinc-500">{translate('common.forms.phoneInput.optional')}</span>}
|
|
119
121
|
{required && <span className="text-red-600">*</span>}
|
|
120
122
|
</div>
|
|
121
123
|
)}
|
|
@@ -148,7 +150,7 @@ export default function PhoneInput({
|
|
|
148
150
|
<input
|
|
149
151
|
type="text"
|
|
150
152
|
className="flex-1 text-sm outline-none placeholder:text-zinc-400"
|
|
151
|
-
placeholder=
|
|
153
|
+
placeholder={translate('common.forms.phoneInput.searchPlaceholder')}
|
|
152
154
|
value={search}
|
|
153
155
|
onChange={(e) => setSearch(e.target.value)}
|
|
154
156
|
autoFocus
|
|
@@ -175,7 +177,7 @@ export default function PhoneInput({
|
|
|
175
177
|
</button>
|
|
176
178
|
))}
|
|
177
179
|
{filtered.length === 0 && (
|
|
178
|
-
<p className="text-sm text-zinc-500 p-3 text-center">
|
|
180
|
+
<p className="text-sm text-zinc-500 p-3 text-center">{translate('common.forms.phoneInput.emptyMessage')}</p>
|
|
179
181
|
)}
|
|
180
182
|
</div>
|
|
181
183
|
</PopoverContent>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { useTranslations } from 'next-intl';
|
|
4
5
|
import {
|
|
5
6
|
Select,
|
|
6
7
|
SelectContent,
|
|
@@ -41,7 +42,7 @@ export function SelectField({
|
|
|
41
42
|
hintMessage,
|
|
42
43
|
error = false,
|
|
43
44
|
errorMessage,
|
|
44
|
-
placeholder
|
|
45
|
+
placeholder,
|
|
45
46
|
options,
|
|
46
47
|
value,
|
|
47
48
|
defaultValue,
|
|
@@ -51,6 +52,8 @@ export function SelectField({
|
|
|
51
52
|
className,
|
|
52
53
|
containerClassName,
|
|
53
54
|
}: SelectFieldProps) {
|
|
55
|
+
const translate = useTranslations();
|
|
56
|
+
const resolvedPlaceholder = placeholder ?? translate('common.forms.select.placeholder');
|
|
54
57
|
const handleValueChange = (selectedValue: string) => {
|
|
55
58
|
if (!onChange) return;
|
|
56
59
|
const selectedOption = options.find((option) => String(option.value) === selectedValue);
|
|
@@ -67,7 +70,7 @@ export function SelectField({
|
|
|
67
70
|
{label && (
|
|
68
71
|
<div className="flex items-center gap-1 paragraph-xsmall-semibold">
|
|
69
72
|
<span className="text-gray-600">{label}</span>
|
|
70
|
-
{optional && <span className="text-gray-500">(
|
|
73
|
+
{optional && <span className="text-gray-500">{translate('common.forms.select.optional')}</span>}
|
|
71
74
|
{required && <span className="text-red-600">*</span>}
|
|
72
75
|
</div>
|
|
73
76
|
)}
|
|
@@ -89,7 +92,7 @@ export function SelectField({
|
|
|
89
92
|
)}
|
|
90
93
|
icon={icon}
|
|
91
94
|
>
|
|
92
|
-
<SelectValue placeholder={
|
|
95
|
+
<SelectValue placeholder={resolvedPlaceholder}>
|
|
93
96
|
{value !== undefined &&
|
|
94
97
|
(() => {
|
|
95
98
|
const selectedOption = options.find((opt) => String(opt.value) === String(value));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { useEffect, useRef, useState } from 'react'
|
|
4
|
+
import { useTranslations } from 'next-intl'
|
|
4
5
|
import ReactCrop, {
|
|
5
6
|
type Crop,
|
|
6
7
|
centerCrop,
|
|
@@ -178,6 +179,7 @@ export function ImageCropModal({
|
|
|
178
179
|
fileName,
|
|
179
180
|
onSelectAnother,
|
|
180
181
|
}: ImageCropModalProps) {
|
|
182
|
+
const translate = useTranslations()
|
|
181
183
|
const imgRef = useRef<HTMLImageElement>(null)
|
|
182
184
|
const [crop, setCrop] = useState<Crop>()
|
|
183
185
|
const [imageSize, setImageSize] = useState({ width: 0, height: 0 })
|
|
@@ -301,22 +303,28 @@ export function ImageCropModal({
|
|
|
301
303
|
<>
|
|
302
304
|
<DialogHeader className="p-5">
|
|
303
305
|
<DialogTitle className="text-center text-[16px]!">
|
|
304
|
-
{dimensionText
|
|
306
|
+
{dimensionText
|
|
307
|
+
? translate('common.imageUpload.tooSmallTitleWithDimension', { dimensionText })
|
|
308
|
+
: translate('common.imageUpload.tooSmallTitleGeneric')}
|
|
305
309
|
</DialogTitle>
|
|
306
310
|
</DialogHeader>
|
|
307
311
|
|
|
308
312
|
<div className="px-5 pb-5">
|
|
309
313
|
<p className="paragraph-small-regular text-zinc-600 text-center">
|
|
310
|
-
{fileName
|
|
311
|
-
|
|
312
|
-
|
|
314
|
+
{fileName && dimensionText
|
|
315
|
+
? translate('common.imageUpload.tooSmallBodyFileWithDimension', { fileName, dimensionText })
|
|
316
|
+
: fileName && !dimensionText
|
|
317
|
+
? translate('common.imageUpload.tooSmallBodyFileGeneric', { fileName })
|
|
318
|
+
: !fileName && dimensionText
|
|
319
|
+
? translate('common.imageUpload.tooSmallBodyNoFileWithDimension', { dimensionText })
|
|
320
|
+
: translate('common.imageUpload.tooSmallBodyNoFileGeneric')}
|
|
313
321
|
</p>
|
|
314
322
|
</div>
|
|
315
323
|
|
|
316
324
|
<DialogFooter className="flex-row! items-center justify-start! gap-3 p-5 border-t border-zinc-200">
|
|
317
|
-
{onSelectAnother && <Button onClick={onSelectAnother}>
|
|
325
|
+
{onSelectAnother && <Button onClick={onSelectAnother}>{translate('common.imageUpload.sendAnother')}</Button>}
|
|
318
326
|
<Button variant="secondary" onClick={handleCancel}>
|
|
319
|
-
|
|
327
|
+
{translate('common.actions.cancel')}
|
|
320
328
|
</Button>
|
|
321
329
|
</DialogFooter>
|
|
322
330
|
</>
|
|
@@ -324,7 +332,7 @@ export function ImageCropModal({
|
|
|
324
332
|
<>
|
|
325
333
|
<DialogHeader className="p-5">
|
|
326
334
|
<DialogTitle className="text-center text-[16px]!">
|
|
327
|
-
|
|
335
|
+
{translate('common.imageUpload.cropTitle')}
|
|
328
336
|
</DialogTitle>
|
|
329
337
|
</DialogHeader>
|
|
330
338
|
|
|
@@ -344,7 +352,7 @@ export function ImageCropModal({
|
|
|
344
352
|
<img
|
|
345
353
|
ref={imgRef}
|
|
346
354
|
src={imageSrc}
|
|
347
|
-
alt=
|
|
355
|
+
alt={translate('common.imageUpload.cropAlt')}
|
|
348
356
|
onLoad={onCropImgLoad}
|
|
349
357
|
draggable={false}
|
|
350
358
|
className="max-h-[50vh] object-contain select-none"
|
|
@@ -354,16 +362,16 @@ export function ImageCropModal({
|
|
|
354
362
|
</div>
|
|
355
363
|
|
|
356
364
|
<p className="paragraph-small-regular text-zinc-500 text-center">
|
|
357
|
-
|
|
365
|
+
{translate('common.imageUpload.cropHint')}
|
|
358
366
|
</p>
|
|
359
367
|
</div>
|
|
360
368
|
|
|
361
369
|
<DialogFooter className="flex-row! items-center justify-start! gap-3 p-5 border-t border-zinc-200">
|
|
362
370
|
<Button onClick={handleConfirm} disabled={imageStatus !== 'ok' || !crop}>
|
|
363
|
-
|
|
371
|
+
{translate('common.actions.confirm')}
|
|
364
372
|
</Button>
|
|
365
373
|
<Button variant="secondary" onClick={handleCancel}>
|
|
366
|
-
|
|
374
|
+
{translate('common.actions.cancel')}
|
|
367
375
|
</Button>
|
|
368
376
|
</DialogFooter>
|
|
369
377
|
</>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import { useTranslations } from 'next-intl'
|
|
3
4
|
import {
|
|
4
5
|
Dialog,
|
|
5
6
|
DialogContent,
|
|
@@ -28,6 +29,7 @@ export function ImageTooSmallModal({
|
|
|
28
29
|
onSelectAnother,
|
|
29
30
|
onCancel,
|
|
30
31
|
}: ImageTooSmallModalProps) {
|
|
32
|
+
const translate = useTranslations()
|
|
31
33
|
const dimensionText = `${minWidth}x${minHeight}px`
|
|
32
34
|
|
|
33
35
|
return (
|
|
@@ -38,21 +40,20 @@ export function ImageTooSmallModal({
|
|
|
38
40
|
>
|
|
39
41
|
<DialogHeader className="p-5">
|
|
40
42
|
<DialogTitle className="text-center text-[16px]!">
|
|
41
|
-
|
|
43
|
+
{translate('common.imageUpload.tooSmallTitleWithDimension', { dimensionText })}
|
|
42
44
|
</DialogTitle>
|
|
43
45
|
</DialogHeader>
|
|
44
46
|
|
|
45
47
|
<div className="px-5 pb-5">
|
|
46
48
|
<p className="paragraph-small-regular text-zinc-600 text-center">
|
|
47
|
-
|
|
48
|
-
uma imagem com pelo menos {dimensionText} para continuar.
|
|
49
|
+
{translate('common.imageUpload.tooSmallBodyFileWithDimension', { fileName, dimensionText })}
|
|
49
50
|
</p>
|
|
50
51
|
</div>
|
|
51
52
|
|
|
52
53
|
<DialogFooter className="flex-row! items-center justify-start! gap-3 p-5 border-t border-zinc-200">
|
|
53
|
-
<Button onClick={onSelectAnother}>
|
|
54
|
+
<Button onClick={onSelectAnother}>{translate('common.imageUpload.sendAnother')}</Button>
|
|
54
55
|
<Button variant="secondary" onClick={onCancel}>
|
|
55
|
-
|
|
56
|
+
{translate('common.actions.cancel')}
|
|
56
57
|
</Button>
|
|
57
58
|
</DialogFooter>
|
|
58
59
|
</DialogContent>
|
|
@@ -224,6 +224,240 @@ const messages = {
|
|
|
224
224
|
},
|
|
225
225
|
},
|
|
226
226
|
|
|
227
|
+
credits: {
|
|
228
|
+
buy: {
|
|
229
|
+
title: 'Buy AI credits',
|
|
230
|
+
externalTitle: 'AI Credits',
|
|
231
|
+
externalDescription: 'To purchase AI credits, visit your subscription area.',
|
|
232
|
+
externalButton: 'Go to subscription area',
|
|
233
|
+
creditsOptionLabel: '{credits} AI credits',
|
|
234
|
+
creditsOptionDisplayValue: '{credits} AI credits',
|
|
235
|
+
paymentOnConfirm: 'Payment will be processed at the time of confirmation.',
|
|
236
|
+
nextInvoiceChanges: 'Changes will take effect from your next invoice.',
|
|
237
|
+
defaultPrice: 'Default',
|
|
238
|
+
immediateCharge: 'Immediate charge',
|
|
239
|
+
totalPlanValue: 'Total plan value',
|
|
240
|
+
confirmAndPay: 'Confirm and pay',
|
|
241
|
+
creditsChangedToast: 'AI credits changed to {credits}',
|
|
242
|
+
},
|
|
243
|
+
disabled: {
|
|
244
|
+
title: 'Credit purchase unavailable',
|
|
245
|
+
descriptionLine1: 'Only administrators and owners can purchase AI credits.',
|
|
246
|
+
descriptionLine2:
|
|
247
|
+
'Ask an account administrator or owner to purchase more credits.',
|
|
248
|
+
understood: 'Got it',
|
|
249
|
+
},
|
|
250
|
+
paidPlanRequired: {
|
|
251
|
+
defaultTitle: 'Feature available on paid plans',
|
|
252
|
+
defaultDescription: 'To access this feature, upgrade to a paid plan',
|
|
253
|
+
knowPlans: 'View plans',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
cards: {
|
|
258
|
+
add: {
|
|
259
|
+
stepBilling: 'Billing',
|
|
260
|
+
stepCard: 'Card',
|
|
261
|
+
externalTitle: 'Card management unavailable',
|
|
262
|
+
externalDescription: 'Access your subscription area to manage payment methods.',
|
|
263
|
+
externalButton: 'Go to subscription area',
|
|
264
|
+
title: 'Add card',
|
|
265
|
+
billingHeading: 'Add your billing information',
|
|
266
|
+
cardHeading: 'Add your card information',
|
|
267
|
+
authenticating: 'Authenticating...',
|
|
268
|
+
submitting: 'Adding card...',
|
|
269
|
+
submit: 'Add card',
|
|
270
|
+
errorInitAuth: 'Unable to start card authentication, please try again.',
|
|
271
|
+
errorAuth: 'Card authentication failed.',
|
|
272
|
+
errorAuthStatus: 'Authentication not completed (status: {status}).',
|
|
273
|
+
statusUnknown: 'unknown',
|
|
274
|
+
successToast: 'Card added successfully.',
|
|
275
|
+
errorSave: 'Unable to save your new card, please try again.',
|
|
276
|
+
},
|
|
277
|
+
form: {
|
|
278
|
+
nameOnCard: 'Name on card',
|
|
279
|
+
typeHere: 'Type here',
|
|
280
|
+
cardNumber: 'Card number',
|
|
281
|
+
cardExpiry: 'Expiration date',
|
|
282
|
+
cardCvc: 'CVC',
|
|
283
|
+
country: 'Country',
|
|
284
|
+
select: 'Select',
|
|
285
|
+
personType: 'Person type',
|
|
286
|
+
personTypePf: 'Individual',
|
|
287
|
+
personTypePj: 'Business',
|
|
288
|
+
cpf: 'CPF',
|
|
289
|
+
cnpj: 'CNPJ',
|
|
290
|
+
fullName: 'Full name',
|
|
291
|
+
cep: 'CEP',
|
|
292
|
+
street: 'Address',
|
|
293
|
+
streetNumber: 'Number',
|
|
294
|
+
city: 'City',
|
|
295
|
+
state: 'UF',
|
|
296
|
+
neighborhood: 'Neighborhood',
|
|
297
|
+
complement: 'Complement',
|
|
298
|
+
cardNumberRequired: 'Card number is required',
|
|
299
|
+
cardExpiryRequired: 'Expiration date is required',
|
|
300
|
+
cardCvcRequired: 'Security code is required',
|
|
301
|
+
},
|
|
302
|
+
delete: {
|
|
303
|
+
title: 'Delete card',
|
|
304
|
+
description: 'Are you sure you want to delete the card:',
|
|
305
|
+
confirmLabel: 'Type DELETE below',
|
|
306
|
+
confirmPlaceholder: 'DELETE',
|
|
307
|
+
deleting: 'Deleting...',
|
|
308
|
+
successToast: 'Card •••• {digits} deleted successfully',
|
|
309
|
+
errorToast: 'Unable to delete card',
|
|
310
|
+
},
|
|
311
|
+
cannotDelete: {
|
|
312
|
+
title: 'Cannot delete this card',
|
|
313
|
+
description: 'This card is in use and has an active subscription linked to it. Select another card as default or add a new one.',
|
|
314
|
+
selectDefault: 'Select a card as default:',
|
|
315
|
+
addNewCard: 'Add new card',
|
|
316
|
+
errorUpdateCard: 'Error updating subscription card',
|
|
317
|
+
},
|
|
318
|
+
item: {
|
|
319
|
+
defaultBadge: 'Default',
|
|
320
|
+
makeDefault: 'Make default',
|
|
321
|
+
setDefaultSuccess: 'Card set as default',
|
|
322
|
+
setDefaultError: 'Error setting card as default',
|
|
323
|
+
},
|
|
324
|
+
paymentInfo: {
|
|
325
|
+
email: 'Email',
|
|
326
|
+
payment: 'Payment',
|
|
327
|
+
addCard: 'Add card',
|
|
328
|
+
selectPaymentMethod: 'Select payment method',
|
|
329
|
+
manageCards: 'Manage cards',
|
|
330
|
+
newPaymentMethod: 'New payment method',
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
navigation: {
|
|
334
|
+
banners: {
|
|
335
|
+
cancelled: {
|
|
336
|
+
message: 'Subscription cancelled! Your pages are now offline.',
|
|
337
|
+
choosePlan: 'Choose a new plan',
|
|
338
|
+
},
|
|
339
|
+
overdue: {
|
|
340
|
+
message: 'Your subscription is overdue and your pages may be taken offline at any time.',
|
|
341
|
+
details: 'Details',
|
|
342
|
+
},
|
|
343
|
+
pending: {
|
|
344
|
+
message: 'Your subscription was cancelled. You have until {limitDate} with your pages online.',
|
|
345
|
+
reactivate: 'Reactivate subscription',
|
|
346
|
+
},
|
|
347
|
+
upcoming: {
|
|
348
|
+
message: 'Invoice pending. Pay by {dueDate} to avoid suspension of your pages.',
|
|
349
|
+
details: 'Details',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
projectSelector: {
|
|
353
|
+
title: 'Projects',
|
|
354
|
+
searchPlaceholder: 'Search here',
|
|
355
|
+
emptyLine1: 'No projects found.',
|
|
356
|
+
emptyLine2: 'Create a project to get started.',
|
|
357
|
+
noResults: 'No results found.',
|
|
358
|
+
manageProjects: 'Manage projects',
|
|
359
|
+
},
|
|
360
|
+
bottomLinks: {
|
|
361
|
+
news: 'News',
|
|
362
|
+
helpCenter: 'Help center',
|
|
363
|
+
sendSuggestions: 'Send suggestions',
|
|
364
|
+
},
|
|
365
|
+
creditsCard: {
|
|
366
|
+
label: 'Credits used',
|
|
367
|
+
},
|
|
368
|
+
planCard: {
|
|
369
|
+
knowPlans: 'View plans',
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
forms: {
|
|
373
|
+
combobox: {
|
|
374
|
+
placeholder: 'Select an option',
|
|
375
|
+
searchPlaceholder: 'Search...',
|
|
376
|
+
emptyMessage: 'No options found.',
|
|
377
|
+
},
|
|
378
|
+
datePicker: {
|
|
379
|
+
placeholder: 'Select date',
|
|
380
|
+
},
|
|
381
|
+
dateRangePicker: {
|
|
382
|
+
placeholder: 'Select period',
|
|
383
|
+
},
|
|
384
|
+
phoneInput: {
|
|
385
|
+
optional: '(Optional)',
|
|
386
|
+
searchPlaceholder: 'Search country...',
|
|
387
|
+
emptyMessage: 'No countries found',
|
|
388
|
+
},
|
|
389
|
+
select: {
|
|
390
|
+
placeholder: 'Select an option',
|
|
391
|
+
optional: '(Optional)',
|
|
392
|
+
},
|
|
393
|
+
copyButton: {
|
|
394
|
+
tooltipDefault: 'Copy link',
|
|
395
|
+
successDefault: 'Link copied',
|
|
396
|
+
errorMessage: 'Unable to copy link',
|
|
397
|
+
},
|
|
398
|
+
circularProgress: {
|
|
399
|
+
ariaLabel: 'Export progress',
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
imageUpload: {
|
|
403
|
+
cropTitle: 'Adjust image',
|
|
404
|
+
cropHint: 'Drag to adjust the crop area',
|
|
405
|
+
cropAlt: 'Crop',
|
|
406
|
+
tooSmallTitleWithDimension: 'Image smaller than {dimensionText}',
|
|
407
|
+
tooSmallTitleGeneric: 'Image too small',
|
|
408
|
+
tooSmallBodyFileWithDimension: 'The file "{fileName}" is smaller than {dimensionText}. Upload an image with at least {dimensionText} to continue.',
|
|
409
|
+
tooSmallBodyFileGeneric: 'The file "{fileName}" is smaller than the minimum required size. Upload a larger image to continue.',
|
|
410
|
+
tooSmallBodyNoFileWithDimension: 'The selected image is smaller than {dimensionText}. Upload an image with at least {dimensionText} to continue.',
|
|
411
|
+
tooSmallBodyNoFileGeneric: 'The selected image is smaller than the minimum required size. Upload a larger image to continue.',
|
|
412
|
+
sendAnother: 'Upload another',
|
|
413
|
+
},
|
|
414
|
+
notifications: {
|
|
415
|
+
page: {
|
|
416
|
+
title: 'Notifications',
|
|
417
|
+
subtitle: 'Have full control over pages, experiences, and conversions.',
|
|
418
|
+
markAllReadDesktop: 'Mark all as read',
|
|
419
|
+
markAllReadMobile: 'Mark as read',
|
|
420
|
+
tabAll: 'All notifications',
|
|
421
|
+
tabUnread: 'Unread',
|
|
422
|
+
details: 'Details',
|
|
423
|
+
empty: 'No notifications found.',
|
|
424
|
+
markAllSuccess: 'All notifications marked as read',
|
|
425
|
+
markAllError: 'Error marking notifications as read',
|
|
426
|
+
},
|
|
427
|
+
popover: {
|
|
428
|
+
title: 'Latest notifications',
|
|
429
|
+
empty: 'No notifications yet',
|
|
430
|
+
viewAll: 'All notifications',
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
layout: {
|
|
434
|
+
navbar: {
|
|
435
|
+
expandMenu: 'Expand menu',
|
|
436
|
+
greatPages: 'GreatPages',
|
|
437
|
+
pages: 'Pages',
|
|
438
|
+
},
|
|
439
|
+
profile: {
|
|
440
|
+
usedCredits: 'Credits used',
|
|
441
|
+
loggingOut: 'Signing out...',
|
|
442
|
+
logout: 'Sign out',
|
|
443
|
+
},
|
|
444
|
+
usersSelector: {
|
|
445
|
+
title: 'Users',
|
|
446
|
+
add: 'Add',
|
|
447
|
+
searchPlaceholder: 'Search here',
|
|
448
|
+
empty: 'No users found.',
|
|
449
|
+
noResults: 'No results found.',
|
|
450
|
+
addToProject: 'Add to project',
|
|
451
|
+
removeFromProject: 'Remove from project',
|
|
452
|
+
manageTeam: 'Manage team',
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
notFound: {
|
|
456
|
+
title: 'Page not found!',
|
|
457
|
+
description: 'The page you are looking for does not exist. Check that you typed the link correctly.',
|
|
458
|
+
backToHome: 'Back to home',
|
|
459
|
+
},
|
|
460
|
+
|
|
227
461
|
languages: {
|
|
228
462
|
'pt-br': 'Portuguese (Brazil)',
|
|
229
463
|
'en-us': 'English (US)',
|