Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update translation files to restore "Edit Funnel" key across multiple languages

Bill Yangc0959ef19e5c
diff --git a/client/messages/de.json b/client/messages/de.json
index b094c174a..d70469aeb 100644
--- a/client/messages/de.json
+++ b/client/messages/de.json
@@ -234,8 +234,8 @@
"Um1u7W": "Trichter erfolgreich aktualisiert",
"F9J0jM": "Trichter konnte nicht dupliziert werden: {message}",
"4gZ72q": "Trichter konnte nicht aktualisiert werden: {message}",
- "IZnwKa": "Trichter bearbeiten",
"gMhqKV": "Trichter duplizieren",
+ "IZnwKa": "Trichter bearbeiten",
"rIc2Hm": "Trichter aktualisieren",
"29V0Ci": "Sitzungen",
"lHFZhY": "{count} abgebrochen",
diff --git a/client/messages/en.json b/client/messages/en.json
index 8d19ad4d3..1434e09a3 100644
--- a/client/messages/en.json
+++ b/client/messages/en.json
@@ -234,8 +234,8 @@
"Um1u7W": "Funnel updated successfully",
"F9J0jM": "Failed to clone funnel: {message}",
"4gZ72q": "Failed to update funnel: {message}",
- "IZnwKa": "Edit Funnel",
"gMhqKV": "Clone Funnel",
+ "IZnwKa": "Edit Funnel",
"rIc2Hm": "Update Funnel",
"29V0Ci": "sessions",
"lHFZhY": "{count} dropped",
diff --git a/client/messages/es.json b/client/messages/es.json
index 85b2ddf19..a8b42aa7e 100644
--- a/client/messages/es.json
+++ b/client/messages/es.json
@@ -234,8 +234,8 @@
"Um1u7W": "Embudo actualizado correctamente",
"F9J0jM": "Error al clonar el embudo: {message}",
"4gZ72q": "Error al actualizar el embudo: {message}",
- "IZnwKa": "Editar embudo",
"gMhqKV": "Clonar embudo",
+ "IZnwKa": "Editar embudo",
"rIc2Hm": "Actualizar embudo",
"29V0Ci": "sesiones",
"lHFZhY": "{count} abandonados",
diff --git a/client/messages/fr.json b/client/messages/fr.json
index 64e002050..55246cf30 100644
--- a/client/messages/fr.json
+++ b/client/messages/fr.json
@@ -234,8 +234,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}",
- "IZnwKa": "Modifier l'entonnoir",
"gMhqKV": "Dupliquer l'entonnoir",
+ "IZnwKa": "Modifier l'entonnoir",
"rIc2Hm": "Mettre à jour l'entonnoir",
"29V0Ci": "sessions",
"lHFZhY": "{count} abandonnées",
diff --git a/client/messages/it.json b/client/messages/it.json
index 711c482df..ee5e3510e 100644
--- a/client/messages/it.json
+++ b/client/messages/it.json
@@ -234,8 +234,8 @@
"Um1u7W": "Funnel aggiornato con successo",
"F9J0jM": "Impossibile clonare il funnel: {message}",
"4gZ72q": "Impossibile aggiornare il funnel: {message}",
- "IZnwKa": "Modifica Funnel",
"gMhqKV": "Clona Funnel",
+ "IZnwKa": "Modifica Funnel",
"rIc2Hm": "Aggiorna Funnel",
"29V0Ci": "sessioni",
"lHFZhY": "{count} abbandonati",
diff --git a/client/messages/ja.json b/client/messages/ja.json
index e2000e072..9d7c6cc61 100644
--- a/client/messages/ja.json
+++ b/client/messages/ja.json
@@ -234,8 +234,8 @@
"Um1u7W": "ファネルを更新しました",
"F9J0jM": "ファネルの複製に失敗しました:{message}",
"4gZ72q": "ファネルの更新に失敗しました:{message}",
- "IZnwKa": "ファネルを編集",
"gMhqKV": "ファネルを複製",
+ "IZnwKa": "ファネルを編集",
"rIc2Hm": "ファネルを更新",
"29V0Ci": "セッション",
"lHFZhY": "{count}件離脱",
diff --git a/client/messages/ko.json b/client/messages/ko.json
index 66ffb8271..7ee1bce3d 100644
--- a/client/messages/ko.json
+++ b/client/messages/ko.json
@@ -234,8 +234,8 @@
"Um1u7W": "퍼널이 성공적으로 업데이트되었습니다",
"F9J0jM": "퍼널 복제 실패: {message}",
"4gZ72q": "퍼널 업데이트 실패: {message}",
- "IZnwKa": "퍼널 편집",
"gMhqKV": "퍼널 복제",
+ "IZnwKa": "퍼널 편집",
"rIc2Hm": "퍼널 업데이트",
"29V0Ci": "세션",
"lHFZhY": "{count}명 이탈",
diff --git a/client/messages/pl.json b/client/messages/pl.json
index 941313c92..a072207a5 100644
--- a/client/messages/pl.json
+++ b/client/messages/pl.json
@@ -234,8 +234,8 @@
"Um1u7W": "Lejek zaktualizowany pomyślnie",
"F9J0jM": "Nie udało się sklonować lejka: {message}",
"4gZ72q": "Nie udało się zaktualizować lejka: {message}",
- "IZnwKa": "Edytuj lejek",
"gMhqKV": "Klonuj lejek",
+ "IZnwKa": "Edytuj lejek",
"rIc2Hm": "Zaktualizuj lejek",
"29V0Ci": "sesje",
"lHFZhY": "{count} porzuciło",
diff --git a/client/messages/pt.json b/client/messages/pt.json
index f61c5a181..18f44e20b 100644
--- a/client/messages/pt.json
+++ b/client/messages/pt.json
@@ -234,8 +234,8 @@
"Um1u7W": "Funil atualizado com sucesso",
"F9J0jM": "Falha ao clonar funil: {message}",
"4gZ72q": "Falha ao atualizar funil: {message}",
- "IZnwKa": "Editar Funil",
"gMhqKV": "Clonar Funil",
+ "IZnwKa": "Editar Funil",
"rIc2Hm": "Atualizar Funil",
"29V0Ci": "sessões",
"lHFZhY": "{count} abandonaram",
diff --git a/client/messages/zh.json b/client/messages/zh.json
index 4c15a9473..96c4f40a5 100644
--- a/client/messages/zh.json
+++ b/client/messages/zh.json
@@ -234,8 +234,8 @@
"Um1u7W": "漏斗更新成功",
"F9J0jM": "克隆漏斗失败:{message}",
"4gZ72q": "更新漏斗失败:{message}",
- "IZnwKa": "编辑漏斗",
"gMhqKV": "克隆漏斗",
+ "IZnwKa": "编辑漏斗",
"rIc2Hm": "更新漏斗",
"29V0Ci": "个会话",
"lHFZhY": "{count} 人流失",
diff --git a/server/src/api/stripe/previewSubscriptionUpdate.ts b/server/src/api/stripe/previewSubscriptionUpdate.ts
index 90f4afc58..709ecf702 100644
--- a/server/src/api/stripe/previewSubscriptionUpdate.ts
+++ b/server/src/api/stripe/previewSubscriptionUpdate.ts
@@ -58,18 +58,17 @@ export async function previewSubscriptionUpdate(
return reply.status(404).send({ error: "Organization or Stripe customer ID not found" });
}
- // 3. Get the active subscription
- const subscriptions = await stripe!.subscriptions.list({
- customer: org.stripeCustomerId,
- status: "active",
- limit: 1,
- });
+ // 3. Get the active or trialing subscription
+ const [activeSubscriptions, trialingSubscriptions] = await Promise.all([
+ stripe!.subscriptions.list({ customer: org.stripeCustomerId, status: "active", limit: 1 }),
+ stripe!.subscriptions.list({ customer: org.stripeCustomerId, status: "trialing", limit: 1 }),
+ ]);
- if (subscriptions.data.length === 0) {
+ const subscription = activeSubscriptions.data[0] ?? trialingSubscriptions.data[0];
+
+ if (!subscription) {
return reply.status(404).send({ error: "No active subscription found" });
}
-
- const subscription = subscriptions.data[0];
const currentItem = subscription.items.data[0];
const currentPeriodEnd = currentItem.current_period_end;
diff --git a/server/src/api/stripe/updateSubscription.ts b/server/src/api/stripe/updateSubscription.ts
index d94f81da9..126f80d3f 100644
--- a/server/src/api/stripe/updateSubscription.ts
+++ b/server/src/api/stripe/updateSubscription.ts
@@ -58,18 +58,17 @@ export async function updateSubscription(
return reply.status(404).send({ error: "Organization or Stripe customer ID not found" });
}
- // 3. Get the active subscription
- const subscriptions = await (stripe as Stripe).subscriptions.list({
- customer: org.stripeCustomerId,
- status: "active",
- limit: 1,
- });
+ // 3. Get the active or trialing subscription
+ const [activeSubscriptions, trialingSubscriptions] = await Promise.all([
+ (stripe as Stripe).subscriptions.list({ customer: org.stripeCustomerId, status: "active", limit: 1 }),
+ (stripe as Stripe).subscriptions.list({ customer: org.stripeCustomerId, status: "trialing", limit: 1 }),
+ ]);
+
+ const subscription = activeSubscriptions.data[0] ?? trialingSubscriptions.data[0];
- if (subscriptions.data.length === 0) {
+ if (!subscription) {
return reply.status(404).send({ error: "No active subscription found" });
}
-
- const subscription = subscriptions.data[0];
const subscriptionItem = subscription.items.data[0];
// 4. Validate the new price exists