🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Update localization files to restore missing translations for various languages, ensuring consistency across the application. Added back translations for "Clone Funnel" and "Add to Organization" in multiple language files, including cs.json, de.json, en.json, es.json, fr.json, it.json, ja.json, ko.json, pl.json, pt.json, and zh.json. Additionally, refactored the subscription utility to optimize fetching of active and trialing subscriptions in parallel, improving performance and reliability.
Bill Yang9028704f5509
diff --git a/client/messages/cs.json b/client/messages/cs.jsonindex a6f53a2e9..b55e9d4f8 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",- "ES6IYH": "Zkus jiný časový rozsah nebo filtr","/aq5/F": "Žádné vlastní události nenalezeny",+ "ES6IYH": "Zkus jiný časový rozsah nebo filtr","j7BiRg": "Žádná událost nevybrána.","kF9XUo": "Časové razítko","EwRIOm": "Uživatel",@@ -235,8 +235,8 @@"Um1u7W": "Trychtýř úspěšně aktualizován","F9J0jM": "Nepodařilo se naklonovat trychtýř: {message}","4gZ72q": "Nepodařilo se aktualizovat trychtýř: {message}",- "gMhqKV": "Naklonovat trychtýř","IZnwKa": "Upravit trychtýř",+ "gMhqKV": "Naklonovat trychtýř","rIc2Hm": "Aktualizovat trychtýř","29V0Ci": "relací","lHFZhY": "{count} odpadlo",@@ -597,8 +597,8 @@"zINlao": "Vlastník","iHN12u": "Administrátor","7L86Z5": "Člen",- "v+BwPW": "Přidat do organizace","Nvr5Ce": "Přidávám...",+ "v+BwPW": "Přidat do organizace","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 bbb6ff3ae..b0c40ceb6 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",- "ES6IYH": "Versuchen Sie einen anderen Zeitraum oder Filter","/aq5/F": "Keine benutzerdefinierten Events gefunden",+ "ES6IYH": "Versuchen Sie einen anderen Zeitraum oder Filter","j7BiRg": "Kein Event ausgewählt.","kF9XUo": "Zeitstempel","EwRIOm": "Benutzer",@@ -235,8 +235,8 @@"Um1u7W": "Trichter erfolgreich aktualisiert","F9J0jM": "Trichter konnte nicht dupliziert werden: {message}","4gZ72q": "Trichter konnte nicht aktualisiert werden: {message}",- "gMhqKV": "Trichter duplizieren","IZnwKa": "Trichter bearbeiten",+ "gMhqKV": "Trichter duplizieren","rIc2Hm": "Trichter aktualisieren","29V0Ci": "Sitzungen","lHFZhY": "{count} abgebrochen",@@ -597,8 +597,8 @@"zINlao": "Inhaber","iHN12u": "Administrator","7L86Z5": "Mitglied",- "v+BwPW": "Zur Organisation hinzufügen","Nvr5Ce": "Wird hinzugefügt...",+ "v+BwPW": "Zur Organisation hinzufügen","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 c72982d66..b5429347f 100644--- a/client/messages/en.json+++ b/client/messages/en.json@@ -235,8 +235,8 @@"Um1u7W": "Funnel updated successfully","F9J0jM": "Failed to clone funnel: {message}","4gZ72q": "Failed to update funnel: {message}",- "gMhqKV": "Clone Funnel","IZnwKa": "Edit Funnel",+ "gMhqKV": "Clone Funnel","rIc2Hm": "Update Funnel","29V0Ci": "sessions","lHFZhY": "{count} dropped",diff --git a/client/messages/es.json b/client/messages/es.jsonindex ef1717a72..2fa5e6800 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",- "ES6IYH": "Prueba un rango de fechas o filtro diferente","/aq5/F": "No se encontraron eventos personalizados",+ "ES6IYH": "Prueba un rango de fechas o filtro diferente","j7BiRg": "Ningún evento seleccionado.","kF9XUo": "Marca de tiempo","EwRIOm": "Usuario",@@ -235,8 +235,8 @@"Um1u7W": "Embudo actualizado correctamente","F9J0jM": "Error al clonar el embudo: {message}","4gZ72q": "Error al actualizar el embudo: {message}",- "gMhqKV": "Clonar embudo","IZnwKa": "Editar embudo",+ "gMhqKV": "Clonar embudo","rIc2Hm": "Actualizar embudo","29V0Ci": "sesiones","lHFZhY": "{count} abandonados",@@ -597,8 +597,8 @@"zINlao": "Propietario","iHN12u": "Administrador","7L86Z5": "Miembro",- "v+BwPW": "Añadir a la organización","Nvr5Ce": "Añadiendo...",+ "v+BwPW": "Añadir a la organización","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 ea3a42034..9b8d743d4 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",- "ES6IYH": "Essayez une autre période ou un autre filtre","/aq5/F": "Aucun événement personnalisé trouvé",+ "ES6IYH": "Essayez une autre période ou un autre filtre","j7BiRg": "Aucun événement sélectionné.","kF9XUo": "Horodatage","EwRIOm": "Utilisateur",@@ -235,8 +235,8 @@"Um1u7W": "Entonnoir mis à jour avec succès","F9J0jM": "Échec de la duplication de l'entonnoir : {message}","4gZ72q": "Échec de la mise à jour de l'entonnoir : {message}",- "gMhqKV": "Dupliquer l'entonnoir","IZnwKa": "Modifier l'entonnoir",+ "gMhqKV": "Dupliquer l'entonnoir","rIc2Hm": "Mettre à jour l'entonnoir","29V0Ci": "sessions","lHFZhY": "{count} abandonnées",@@ -597,8 +597,8 @@"zINlao": "Propriétaire","iHN12u": "Administrateur","7L86Z5": "Membre",- "v+BwPW": "Ajouter à l'organisation","Nvr5Ce": "Ajout en cours...",+ "v+BwPW": "Ajouter à l'organisation","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 940cdbeac..29c3d1d6b 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",- "ES6IYH": "Prova un intervallo di date diverso o un filtro","/aq5/F": "Nessun evento personalizzato trovato",+ "ES6IYH": "Prova un intervallo di date diverso o un filtro","j7BiRg": "Nessun evento selezionato.","kF9XUo": "Timestamp","EwRIOm": "Utente",@@ -235,8 +235,8 @@"Um1u7W": "Funnel aggiornato con successo","F9J0jM": "Impossibile clonare il funnel: {message}","4gZ72q": "Impossibile aggiornare il funnel: {message}",- "gMhqKV": "Clona Funnel","IZnwKa": "Modifica Funnel",+ "gMhqKV": "Clona Funnel","rIc2Hm": "Aggiorna Funnel","29V0Ci": "sessioni","lHFZhY": "{count} abbandonati",@@ -597,8 +597,8 @@"zINlao": "Proprietario","iHN12u": "Amministratore","7L86Z5": "Membro",- "v+BwPW": "Aggiungi all'Organizzazione","Nvr5Ce": "Aggiunta in corso...",+ "v+BwPW": "Aggiungi all'Organizzazione","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 471d4b811..d57f7c3e8 100644--- a/client/messages/ja.json+++ b/client/messages/ja.json@@ -195,8 +195,8 @@"Zx7WPP": "すべてのイベント系列が非表示です","AKRVhS": "凡例の項目をクリックして表示します","NuhCPH": "イベントのトラッキング方法を学ぶ",- "ES6IYH": "別の日付範囲またはフィルターをお試しください","/aq5/F": "カスタムイベントが見つかりません",+ "ES6IYH": "別の日付範囲またはフィルターをお試しください","j7BiRg": "イベントが選択されていません。","kF9XUo": "タイムスタンプ","EwRIOm": "ユーザー",@@ -235,8 +235,8 @@"Um1u7W": "ファネルを更新しました","F9J0jM": "ファネルの複製に失敗しました:{message}","4gZ72q": "ファネルの更新に失敗しました:{message}",- "gMhqKV": "ファネルを複製","IZnwKa": "ファネルを編集",+ "gMhqKV": "ファネルを複製","rIc2Hm": "ファネルを更新","29V0Ci": "セッション","lHFZhY": "{count}件離脱",@@ -597,8 +597,8 @@"zINlao": "オーナー","iHN12u": "管理者","7L86Z5": "メンバー",- "v+BwPW": "組織に追加","Nvr5Ce": "追加中...",+ "v+BwPW": "組織に追加","Msn3jj": "メールでフィルター...","gO9HzB": "ロールでフィルター","9nrF+x": "すべてのロール",diff --git a/client/messages/ko.json b/client/messages/ko.jsonindex b7c2bb2b6..c7ad5a88e 100644--- a/client/messages/ko.json+++ b/client/messages/ko.json@@ -195,8 +195,8 @@"Zx7WPP": "모든 이벤트 시리즈 숨김","AKRVhS": "범례 항목을 클릭하여 표시","NuhCPH": "이벤트 추적 방법 알아보기",- "ES6IYH": "다른 날짜 범위 또는 필터를 시도하세요","/aq5/F": "사용자 정의 이벤트를 찾을 수 없음",+ "ES6IYH": "다른 날짜 범위 또는 필터를 시도하세요","j7BiRg": "이벤트가 선택되지 않았습니다.","kF9XUo": "타임스탬프","EwRIOm": "사용자",@@ -235,8 +235,8 @@"Um1u7W": "퍼널이 성공적으로 업데이트되었습니다","F9J0jM": "퍼널 복제 실패: {message}","4gZ72q": "퍼널 업데이트 실패: {message}",- "gMhqKV": "퍼널 복제","IZnwKa": "퍼널 편집",+ "gMhqKV": "퍼널 복제","rIc2Hm": "퍼널 업데이트","29V0Ci": "세션","lHFZhY": "{count}명 이탈",@@ -597,8 +597,8 @@"zINlao": "소유자","iHN12u": "관리자","7L86Z5": "멤버",- "v+BwPW": "조직에 추가","Nvr5Ce": "추가 중...",+ "v+BwPW": "조직에 추가","Msn3jj": "이메일로 필터...","gO9HzB": "역할로 필터","9nrF+x": "모든 역할",diff --git a/client/messages/pl.json b/client/messages/pl.jsonindex e1cbe06d1..d9c1f1579 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",- "ES6IYH": "Spróbuj innego zakresu dat lub filtra","/aq5/F": "Nie znaleziono niestandardowych zdarzeń",+ "ES6IYH": "Spróbuj innego zakresu dat lub filtra","j7BiRg": "Nie wybrano zdarzenia.","kF9XUo": "Znacznik czasu","EwRIOm": "Użytkownik",@@ -235,8 +235,8 @@"Um1u7W": "Lejek zaktualizowany pomyślnie","F9J0jM": "Nie udało się sklonować lejka: {message}","4gZ72q": "Nie udało się zaktualizować lejka: {message}",- "gMhqKV": "Klonuj lejek","IZnwKa": "Edytuj lejek",+ "gMhqKV": "Klonuj lejek","rIc2Hm": "Zaktualizuj lejek","29V0Ci": "sesje","lHFZhY": "{count} porzuciło",@@ -597,8 +597,8 @@"zINlao": "Właściciel","iHN12u": "Administrator","7L86Z5": "Członek",- "v+BwPW": "Dodaj do organizacji","Nvr5Ce": "Dodawanie...",+ "v+BwPW": "Dodaj do organizacji","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 0202928b6..a25718c75 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",- "ES6IYH": "Tente um intervalo de datas diferente ou filtro","/aq5/F": "Nenhum evento personalizado encontrado",+ "ES6IYH": "Tente um intervalo de datas diferente ou filtro","j7BiRg": "Nenhum evento selecionado.","kF9XUo": "Data/Hora","EwRIOm": "Usuário",@@ -235,8 +235,8 @@"Um1u7W": "Funil atualizado com sucesso","F9J0jM": "Falha ao clonar funil: {message}","4gZ72q": "Falha ao atualizar funil: {message}",- "gMhqKV": "Clonar Funil","IZnwKa": "Editar Funil",+ "gMhqKV": "Clonar Funil","rIc2Hm": "Atualizar Funil","29V0Ci": "sessões","lHFZhY": "{count} abandonaram",@@ -597,8 +597,8 @@"zINlao": "Proprietário","iHN12u": "Administrador","7L86Z5": "Membro",- "v+BwPW": "Adicionar à Organização","Nvr5Ce": "Adicionando...",+ "v+BwPW": "Adicionar à Organização","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 6064e1e4f..ccce923b8 100644--- a/client/messages/zh.json+++ b/client/messages/zh.json@@ -195,8 +195,8 @@"Zx7WPP": "所有事件系列已隐藏","AKRVhS": "点击图例项以显示它","NuhCPH": "了解如何追踪事件",- "ES6IYH": "尝试不同的日期范围或过滤器","/aq5/F": "未找到自定义事件",+ "ES6IYH": "尝试不同的日期范围或过滤器","j7BiRg": "未选择事件。","kF9XUo": "时间戳","EwRIOm": "用户",@@ -235,8 +235,8 @@"Um1u7W": "漏斗更新成功","F9J0jM": "克隆漏斗失败:{message}","4gZ72q": "更新漏斗失败:{message}",- "gMhqKV": "克隆漏斗","IZnwKa": "编辑漏斗",+ "gMhqKV": "克隆漏斗","rIc2Hm": "更新漏斗","29V0Ci": "个会话","lHFZhY": "{count} 人流失",@@ -597,8 +597,8 @@"zINlao": "所有者","iHN12u": "管理员","7L86Z5": "成员",- "v+BwPW": "添加到组织","Nvr5Ce": "正在添加...",+ "v+BwPW": "添加到组织","Msn3jj": "按电子邮件过滤...","gO9HzB": "按角色过滤","9nrF+x": "所有角色",diff --git a/server/src/lib/subscriptionUtils.ts b/server/src/lib/subscriptionUtils.tsindex 7f8a3a65a..652bb535b 100644--- a/server/src/lib/subscriptionUtils.ts+++ b/server/src/lib/subscriptionUtils.ts@@ -181,33 +181,30 @@ export async function getStripeSubscription(stripeCustomerId: string | null): Pr}try {- const subscriptions = await (stripe as Stripe).subscriptions.list({- customer: stripeCustomerId,- status: "active",- limit: 1,- expand: ["data.plan.product"],- });-- let subscription: Stripe.Subscription;- let isTrial = false;-- if (subscriptions.data.length === 0) {- // Check for trialing subscriptions- const trialSubs = await (stripe as Stripe).subscriptions.list({+ // Fetch both active and trialing subscriptions in parallel+ const [activeSubs, trialSubs] = await Promise.all([+ (stripe as Stripe).subscriptions.list({+ customer: stripeCustomerId,+ status: "active",+ expand: ["data.plan.product"],+ }),+ (stripe as Stripe).subscriptions.list({customer: stripeCustomerId,status: "trialing",- limit: 1,expand: ["data.plan.product"],- });- if (trialSubs.data.length === 0) {- return null;- }- subscription = trialSubs.data[0];- isTrial = true;- } else {- subscription = subscriptions.data[0];+ }),+ ]);++ const allSubs = [...activeSubs.data, ...trialSubs.data];++ if (allSubs.length === 0) {+ return null;}+ // Pick the most recently created subscription across both active and trialing+ const subscription = allSubs.sort((a, b) => b.created - a.created)[0];+ const isTrial = subscription.status === "trialing";+const subscriptionItem = subscription.items.data[0];const priceId = subscriptionItem.price.id;