🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Update localization files to restore missing translations for custom events and adding status across multiple languages. Ensure consistency in user interface messages by reintroducing translations for "No custom events found" and "Adding..." in cs.json, de.json, en.json, es.json, fr.json, it.json, ja.json, ko.json, pl.json, pt.json, and zh.json. Additionally, refactor PaidPlan component to enhance subscription usage display and management options.
Bill Yangcacc5e977db4
diff --git a/client/messages/cs.json b/client/messages/cs.jsonindex b55e9d4f8..45fa2f605 100644--- a/client/messages/cs.json+++ b/client/messages/cs.json@@ -195,8 +195,8 @@"Zx7WPP": "Všechny řady událostí skryty","AKRVhS": "Klikni na položku v legendě pro zobrazení","NuhCPH": "Zjisti, jak sledovat události",- "/aq5/F": "Žádné vlastní události nenalezeny","ES6IYH": "Zkus jiný časový rozsah nebo filtr",+ "/aq5/F": "Žádné vlastní události nenalezeny","j7BiRg": "Žádná událost nevybrána.","kF9XUo": "Časové razítko","EwRIOm": "Uživatel",@@ -597,8 +597,8 @@"zINlao": "Vlastník","iHN12u": "Administrátor","7L86Z5": "Člen",- "Nvr5Ce": "Přidávám...","v+BwPW": "Přidat do organizace",+ "Nvr5Ce": "Přidávám...","Msn3jj": "Filtrovat podle emailu...","gO9HzB": "Filtrovat podle role","9nrF+x": "Všechny role",diff --git a/client/messages/de.json b/client/messages/de.jsonindex b0c40ceb6..d1ea5bf69 100644--- a/client/messages/de.json+++ b/client/messages/de.json@@ -195,8 +195,8 @@"Zx7WPP": "Alle Event-Reihen ausgeblendet","AKRVhS": "Klicken Sie auf ein Legendenelement, um es anzuzeigen","NuhCPH": "Erfahren Sie, wie Sie Events verfolgen",- "/aq5/F": "Keine benutzerdefinierten Events gefunden","ES6IYH": "Versuchen Sie einen anderen Zeitraum oder Filter",+ "/aq5/F": "Keine benutzerdefinierten Events gefunden","j7BiRg": "Kein Event ausgewählt.","kF9XUo": "Zeitstempel","EwRIOm": "Benutzer",@@ -597,8 +597,8 @@"zINlao": "Inhaber","iHN12u": "Administrator","7L86Z5": "Mitglied",- "Nvr5Ce": "Wird hinzugefügt...","v+BwPW": "Zur Organisation hinzufügen",+ "Nvr5Ce": "Wird hinzugefügt...","Msn3jj": "Nach E-Mail filtern...","gO9HzB": "Nach Rolle filtern","9nrF+x": "Alle Rollen",diff --git a/client/messages/en.json b/client/messages/en.jsonindex b5429347f..9521f5836 100644--- a/client/messages/en.json+++ b/client/messages/en.json@@ -195,8 +195,8 @@"Zx7WPP": "All event series hidden","AKRVhS": "Click a legend item to show it","NuhCPH": "Learn how to track events",- "/aq5/F": "No custom events found","ES6IYH": "Try a different date range or filter",+ "/aq5/F": "No custom events found","j7BiRg": "No event selected.","kF9XUo": "Timestamp","EwRIOm": "User",@@ -597,8 +597,8 @@"zINlao": "Owner","iHN12u": "Admin","7L86Z5": "Member",- "Nvr5Ce": "Adding...","v+BwPW": "Add to Organization",+ "Nvr5Ce": "Adding...","Msn3jj": "Filter by email...","gO9HzB": "Filter by role","9nrF+x": "All Roles",diff --git a/client/messages/es.json b/client/messages/es.jsonindex 2fa5e6800..d3569a151 100644--- a/client/messages/es.json+++ b/client/messages/es.json@@ -195,8 +195,8 @@"Zx7WPP": "Todas las series de eventos ocultas","AKRVhS": "Haz clic en un elemento de la leyenda para mostrarlo","NuhCPH": "Aprende cómo rastrear eventos",- "/aq5/F": "No se encontraron eventos personalizados","ES6IYH": "Prueba un rango de fechas o filtro diferente",+ "/aq5/F": "No se encontraron eventos personalizados","j7BiRg": "Ningún evento seleccionado.","kF9XUo": "Marca de tiempo","EwRIOm": "Usuario",@@ -597,8 +597,8 @@"zINlao": "Propietario","iHN12u": "Administrador","7L86Z5": "Miembro",- "Nvr5Ce": "Añadiendo...","v+BwPW": "Añadir a la organización",+ "Nvr5Ce": "Añadiendo...","Msn3jj": "Filtrar por correo electrónico...","gO9HzB": "Filtrar por rol","9nrF+x": "Todos los roles",diff --git a/client/messages/fr.json b/client/messages/fr.jsonindex 9b8d743d4..265134998 100644--- a/client/messages/fr.json+++ b/client/messages/fr.json@@ -195,8 +195,8 @@"Zx7WPP": "Toutes les séries d'événements masquées","AKRVhS": "Cliquez sur un élément de la légende pour l'afficher","NuhCPH": "Apprenez à suivre les événements",- "/aq5/F": "Aucun événement personnalisé trouvé","ES6IYH": "Essayez une autre période ou un autre filtre",+ "/aq5/F": "Aucun événement personnalisé trouvé","j7BiRg": "Aucun événement sélectionné.","kF9XUo": "Horodatage","EwRIOm": "Utilisateur",@@ -597,8 +597,8 @@"zINlao": "Propriétaire","iHN12u": "Administrateur","7L86Z5": "Membre",- "Nvr5Ce": "Ajout en cours...","v+BwPW": "Ajouter à l'organisation",+ "Nvr5Ce": "Ajout en cours...","Msn3jj": "Filtrer par e-mail...","gO9HzB": "Filtrer par rôle","9nrF+x": "Tous les rôles",diff --git a/client/messages/it.json b/client/messages/it.jsonindex 29c3d1d6b..12a1e3ad0 100644--- a/client/messages/it.json+++ b/client/messages/it.json@@ -195,8 +195,8 @@"Zx7WPP": "Tutte le serie di eventi nascoste","AKRVhS": "Clicca un elemento della legenda per mostrarlo","NuhCPH": "Scopri come tracciare gli eventi",- "/aq5/F": "Nessun evento personalizzato trovato","ES6IYH": "Prova un intervallo di date diverso o un filtro",+ "/aq5/F": "Nessun evento personalizzato trovato","j7BiRg": "Nessun evento selezionato.","kF9XUo": "Timestamp","EwRIOm": "Utente",@@ -597,8 +597,8 @@"zINlao": "Proprietario","iHN12u": "Amministratore","7L86Z5": "Membro",- "Nvr5Ce": "Aggiunta in corso...","v+BwPW": "Aggiungi all'Organizzazione",+ "Nvr5Ce": "Aggiunta in corso...","Msn3jj": "Filtra per email...","gO9HzB": "Filtra per ruolo","9nrF+x": "Tutti i Ruoli",diff --git a/client/messages/ja.json b/client/messages/ja.jsonindex d57f7c3e8..7c524c71f 100644--- a/client/messages/ja.json+++ b/client/messages/ja.json@@ -195,8 +195,8 @@"Zx7WPP": "すべてのイベント系列が非表示です","AKRVhS": "凡例の項目をクリックして表示します","NuhCPH": "イベントのトラッキング方法を学ぶ",- "/aq5/F": "カスタムイベントが見つかりません","ES6IYH": "別の日付範囲またはフィルターをお試しください",+ "/aq5/F": "カスタムイベントが見つかりません","j7BiRg": "イベントが選択されていません。","kF9XUo": "タイムスタンプ","EwRIOm": "ユーザー",@@ -597,8 +597,8 @@"zINlao": "オーナー","iHN12u": "管理者","7L86Z5": "メンバー",- "Nvr5Ce": "追加中...","v+BwPW": "組織に追加",+ "Nvr5Ce": "追加中...","Msn3jj": "メールでフィルター...","gO9HzB": "ロールでフィルター","9nrF+x": "すべてのロール",diff --git a/client/messages/ko.json b/client/messages/ko.jsonindex c7ad5a88e..a3948d4d4 100644--- a/client/messages/ko.json+++ b/client/messages/ko.json@@ -195,8 +195,8 @@"Zx7WPP": "모든 이벤트 시리즈 숨김","AKRVhS": "범례 항목을 클릭하여 표시","NuhCPH": "이벤트 추적 방법 알아보기",- "/aq5/F": "사용자 정의 이벤트를 찾을 수 없음","ES6IYH": "다른 날짜 범위 또는 필터를 시도하세요",+ "/aq5/F": "사용자 정의 이벤트를 찾을 수 없음","j7BiRg": "이벤트가 선택되지 않았습니다.","kF9XUo": "타임스탬프","EwRIOm": "사용자",@@ -597,8 +597,8 @@"zINlao": "소유자","iHN12u": "관리자","7L86Z5": "멤버",- "Nvr5Ce": "추가 중...","v+BwPW": "조직에 추가",+ "Nvr5Ce": "추가 중...","Msn3jj": "이메일로 필터...","gO9HzB": "역할로 필터","9nrF+x": "모든 역할",diff --git a/client/messages/pl.json b/client/messages/pl.jsonindex d9c1f1579..64af1c0ff 100644--- a/client/messages/pl.json+++ b/client/messages/pl.json@@ -195,8 +195,8 @@"Zx7WPP": "Wszystkie serie zdarzeń ukryte","AKRVhS": "Kliknij element legendy, aby go wyświetlić","NuhCPH": "Dowiedz się, jak śledzić zdarzenia",- "/aq5/F": "Nie znaleziono niestandardowych zdarzeń","ES6IYH": "Spróbuj innego zakresu dat lub filtra",+ "/aq5/F": "Nie znaleziono niestandardowych zdarzeń","j7BiRg": "Nie wybrano zdarzenia.","kF9XUo": "Znacznik czasu","EwRIOm": "Użytkownik",@@ -597,8 +597,8 @@"zINlao": "Właściciel","iHN12u": "Administrator","7L86Z5": "Członek",- "Nvr5Ce": "Dodawanie...","v+BwPW": "Dodaj do organizacji",+ "Nvr5Ce": "Dodawanie...","Msn3jj": "Filtruj po e-mailu...","gO9HzB": "Filtruj po roli","9nrF+x": "Wszystkie role",diff --git a/client/messages/pt.json b/client/messages/pt.jsonindex a25718c75..f5a96cfd8 100644--- a/client/messages/pt.json+++ b/client/messages/pt.json@@ -195,8 +195,8 @@"Zx7WPP": "Todas as séries de eventos ocultas","AKRVhS": "Clique em um item da legenda para exibi-lo","NuhCPH": "Saiba como rastrear eventos",- "/aq5/F": "Nenhum evento personalizado encontrado","ES6IYH": "Tente um intervalo de datas diferente ou filtro",+ "/aq5/F": "Nenhum evento personalizado encontrado","j7BiRg": "Nenhum evento selecionado.","kF9XUo": "Data/Hora","EwRIOm": "Usuário",@@ -597,8 +597,8 @@"zINlao": "Proprietário","iHN12u": "Administrador","7L86Z5": "Membro",- "Nvr5Ce": "Adicionando...","v+BwPW": "Adicionar à Organização",+ "Nvr5Ce": "Adicionando...","Msn3jj": "Filtrar por email...","gO9HzB": "Filtrar por papel","9nrF+x": "Todos os Papéis",diff --git a/client/messages/zh.json b/client/messages/zh.jsonindex ccce923b8..b319b4bdc 100644--- a/client/messages/zh.json+++ b/client/messages/zh.json@@ -195,8 +195,8 @@"Zx7WPP": "所有事件系列已隐藏","AKRVhS": "点击图例项以显示它","NuhCPH": "了解如何追踪事件",- "/aq5/F": "未找到自定义事件","ES6IYH": "尝试不同的日期范围或过滤器",+ "/aq5/F": "未找到自定义事件","j7BiRg": "未选择事件。","kF9XUo": "时间戳","EwRIOm": "用户",@@ -597,8 +597,8 @@"zINlao": "所有者","iHN12u": "管理员","7L86Z5": "成员",- "Nvr5Ce": "正在添加...","v+BwPW": "添加到组织",+ "Nvr5Ce": "正在添加...","Msn3jj": "按电子邮件过滤...","gO9HzB": "按角色过滤","9nrF+x": "所有角色",diff --git a/client/src/app/[site]/components/Header/NoData.tsx b/client/src/app/[site]/components/Header/NoData.tsxindex 8aeeb6f92..f0c324517 100644--- a/client/src/app/[site]/components/Header/NoData.tsx+++ b/client/src/app/[site]/components/Header/NoData.tsx@@ -103,7 +103,7 @@ export function NoData() {</a>{" "}{t("if your script isn't sending traffic.")}</span>- {siteMetadata?.siteId && <VerifyInstallation siteId={siteMetadata.siteId} />}+ {/* {siteMetadata?.siteId && <VerifyInstallation siteId={siteMetadata.siteId} />} */}{/* Framework Guide Cards */}<div className=""><h2 className="text-sm font-medium mb-4">{t("Platform Guides")}</h2>diff --git a/client/src/components/subscription/PaidPlain/PaidPlan.tsx b/client/src/components/subscription/PaidPlain/PaidPlan.tsxindex 2f02d2d10..bcbcf167f 100644--- a/client/src/components/subscription/PaidPlain/PaidPlan.tsx+++ b/client/src/components/subscription/PaidPlain/PaidPlan.tsx@@ -11,6 +11,8 @@ import { formatDate } from "../../../lib/subscription/planUtils";import { useStripeSubscription } from "../../../lib/subscription/useStripeSubscription";import { UsageChart } from "../../UsageChart";import { authClient } from "@/lib/auth";+import { useGetSitesFromOrg } from "@/api/admin/hooks/useSites";+import { useOrganizationMembers } from "@/api/admin/hooks/useOrganizationMembers";import { InvoicesCard } from "../components/InvoicesCard";import { CancellationDialog } from "./CancellationDialog";import { PlanDialog } from "../components/PlanDialog";@@ -21,6 +23,9 @@ export function PaidPlan() {const { data: activeOrg } = authClient.useActiveOrganization();const organizationId = activeOrg?.id;+ const { data: sitesData } = useGetSitesFromOrg(organizationId);+ const { data: membersData } = useOrganizationMembers(organizationId ?? "");+const [isProcessing, setIsProcessing] = useState(false);const [actionError, setActionError] = useState<string | null>(null);const [showPlanDialog, setShowPlanDialog] = useState(false);@@ -153,37 +158,73 @@ export function PaidPlan() {<p className="text-neutral-400 text-sm">{formatRenewalDate()}</p></div><div className="space-x-2">+ <Button+ variant="outline"+ onClick={() => createPortalSession("payment_method_update")}+ disabled={isProcessing}+ >+ Manage Payment Details+ </Button><Button variant="success" onClick={handleChangePlan}>Change Plan</Button></div></div>- <div className="space-y-2">- <h3 className="font-medium mb-2">Usage this month</h3>- <div className="space-y-4">- <div>- <div className="flex justify-between mb-1">- <span className="text-sm">Events</span>- <span className="text-sm">- {currentUsage.toLocaleString()} / {eventLimit.toLocaleString()}- </span>- </div>- <Progress value={usagePercentage} />+++ {currentUsage >= eventLimit && (+ <div className="mt-4 p-3 bg-amber-50 dark:bg-amber-900/20 rounded-md border border-amber-200 dark:border-amber-800">+ <div className="flex items-center justify-between">+ <p className="text-sm text-amber-700 dark:text-amber-300">+ <strong>Usage limit reached!</strong> You've exceeded your plan's event limit.+ </p>+ <Button variant="success" size="sm" onClick={handleChangePlan}>+ Upgrade Plan+ </Button></div>+ </div>+ )}- {currentUsage >= eventLimit && (- <div className="mt-4 p-3 bg-amber-50 dark:bg-amber-900/20 rounded-md border border-amber-200 dark:border-amber-800">- <div className="flex items-center justify-between">- <p className="text-sm text-amber-700 dark:text-amber-300">- <strong>Usage limit reached!</strong> You've exceeded your plan's event limit.- </p>- <Button variant="success" size="sm" onClick={handleChangePlan}>- Upgrade Plan- </Button>- </div>- </div>- )}+ <div className="grid grid-cols-3 gap-4">+ <div className="rounded-lg border p-3 pb-0 overflow-hidden relative">+ <div className="text-sm text-muted-foreground">Events used this month</div>+ <div className="text-lg font-semibold mb-3">+ {currentUsage.toLocaleString()} / {eventLimit.toLocaleString()}+ </div>+ <div className="relative h-1.5 -mx-3">+ <div className="bg-neutral-100 dark:bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>+ <div+ style={{ width: `${usagePercentage}%` }}+ className={`h-1.5 absolute bottom-0 left-0 ${usagePercentage >= 100 ? "bg-red-500" : "bg-accent-400/75"}`}+ ></div>+ </div>+ </div>+ <div className="rounded-lg border p-3 pb-0 overflow-hidden relative">+ <div className="text-sm text-muted-foreground">Websites</div>+ <div className="text-lg font-semibold mb-3">+ {sitesData?.sites.length ?? 0} / {activeSubscription.siteLimit === null ? "Unlimited" : activeSubscription.siteLimit.toLocaleString()}+ </div>+ <div className="relative h-1.5 -mx-3">+ <div className="bg-neutral-100 dark:bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>+ <div+ style={{ width: activeSubscription.siteLimit === null ? "0%" : `${Math.min(((sitesData?.sites.length ?? 0) / activeSubscription.siteLimit) * 100, 100)}%` }}+ className="bg-accent-400/75 h-1.5 absolute bottom-0 left-0"+ ></div>+ </div>+ </div>+ <div className="rounded-lg border p-3 pb-0 overflow-hidden relative">+ <div className="text-sm text-muted-foreground">Team Members</div>+ <div className="text-lg font-semibold mb-3">+ {membersData?.data?.length ?? 0} / {activeSubscription.memberLimit === null ? "Unlimited" : activeSubscription.memberLimit.toLocaleString()}+ </div>+ <div className="relative h-1.5 -mx-3">+ <div className="bg-neutral-100 dark:bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>+ <div+ style={{ width: activeSubscription.memberLimit === null ? "0%" : `${Math.min(((membersData?.data?.length ?? 0) / activeSubscription.memberLimit) * 100, 100)}%` }}+ className="bg-accent-400/75 h-1.5 absolute bottom-0 left-0"+ ></div>+ </div></div></div>@@ -228,6 +269,6 @@ export function PaidPlan() {</CardContent></Card><InvoicesCard />- </div>+ </div >);}