Skip to content

Commit

Permalink
Add translations; Boost rate-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Aug 24, 2024
1 parent ad84a4f commit feef72d
Show file tree
Hide file tree
Showing 17 changed files with 273 additions and 137 deletions.
2 changes: 1 addition & 1 deletion api/prompt/_shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function handleRateLimit(
redis: kv,
limiter: isPro
? Ratelimit.slidingWindow(3, "1m")
: Ratelimit.fixedWindow(1, "30d"),
: Ratelimit.fixedWindow(3, "30d"),
});

const rateLimitKey = isPro ? `pro_${customerId}` : `unauth_${ip}`;
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/de/messages.js

Large diffs are not rendered by default.

49 changes: 33 additions & 16 deletions app/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ msgstr "Werden Sie ein Pro-Benutzer"
msgid "Begin your journey"
msgstr "Beginne deine Reise"

#: src/components/Checkout.tsx:144
#: src/components/Checkout.tsx:142
msgid "Billed annually at $24"
msgstr "Jährlich abgerechnet für $24"

#: src/components/Checkout.tsx:156
#: src/components/Checkout.tsx:154
msgid "Billed monthly at $4"
msgstr "Monatlich für $4 berechnet"

Expand Down Expand Up @@ -198,6 +198,10 @@ msgstr "In die Breite"
msgid "Cancel"
msgstr "Abbrechen"

#: src/components/Checkout.tsx:191
msgid "Cancel anytime"
msgstr "Jederzeit kündbar"

#: src/pages/Account.tsx:326
msgid "Cancel your subscription. Your hosted charts will become read-only."
msgstr "Kündigen Sie Ihr Abonnement. Ihre gehosteten Diagramme werden schreibgeschützt."
Expand Down Expand Up @@ -237,10 +241,6 @@ msgstr "Wählen"
msgid "Choose Template"
msgstr "Vorlage auswählen"

#: src/components/Checkout.tsx:130
msgid "Choose a Plan"
msgstr "Wählen Sie einen Plan"

#: src/components/LearnSyntaxDialog.tsx:327
msgid "Choose from a variety of arrow shapes for the source and target of an edge. Shapes include triangle, triangle-tee, circle-triangle, triangle-cross, triangle-backcurve, vee, tee, square, circle, diamond, chevron, none. ."
msgstr "Wählen Sie aus einer Vielzahl von Pfeilformen für die Quelle und das Ziel einer Kante aus. Formen beinhalten Dreieck, Dreieck-Tee, Kreis-Dreieck, Dreieck-Kreuz, Dreieck-Rückbiegung, Vee, Tee, Quadrat, Kreis, Diamant, Chevron und keine."
Expand Down Expand Up @@ -692,14 +692,14 @@ msgstr "Kostenlos"
msgid "Fullscreen"
msgstr "Vollbild"

#: src/components/Checkout.tsx:133
msgid "Gain access to AI Features and never lose your work with a Pro account."
msgstr "Erhalten Sie Zugang zu KI-Funktionen und verlieren Sie nie Ihre Arbeit mit einem Pro-Konto."

#: src/components/Tabs/ThemeTab.tsx:155
msgid "General"
msgstr "Allgemein"

#: src/components/Checkout.tsx:177
msgid "Get Pro Access Now"
msgstr "Erhalten Sie jetzt Pro-Zugang"

#: src/lib/usePromptStore.ts:99
msgid "Get Unlimited AI Requests"
msgstr "Erhalten Sie unbegrenzte KI-Anfragen"
Expand Down Expand Up @@ -956,7 +956,7 @@ msgstr "Abmelden"
msgid "Log in to Save"
msgstr "Einloggen, um zu speichern"

#: src/components/Checkout.tsx:74
#: src/components/Checkout.tsx:73
msgid "Log in to upgrade your account"
msgstr "Melde dich an, um dein Konto zu aktualisieren"

Expand All @@ -980,7 +980,7 @@ msgstr "Abrechnung verwalten"
msgid "Map Data"
msgstr "Daten abbilden"

#: src/components/Checkout.tsx:155
#: src/components/Checkout.tsx:153
msgid "Monthly"
msgstr "Monatlich"

Expand Down Expand Up @@ -1149,6 +1149,10 @@ msgstr "Datenschutzerklärung"
msgid "Processing Data"
msgstr "Datenverarbeitung"

#: src/components/Checkout.tsx:176
msgid "Processing..."
msgstr "Verarbeitung..."

#: src/components/AiToolbar.tsx:32
msgid "Prompt"
msgstr "Aufforderung"
Expand Down Expand Up @@ -1279,6 +1283,10 @@ msgstr "Label drehen"
msgid "SVG Export is a Pro Feature"
msgstr "SVG-Export ist eine Pro-Funktion"

#: src/components/Checkout.tsx:197
msgid "Satisfaction guaranteed or first payment refunded"
msgstr "Zufriedenheitsgarantie oder erste Zahlung erstattet"

#: src/components/FlowchartHeader.tsx:123
#: src/components/FlowchartHeader.tsx:147
msgid "Save"
Expand All @@ -1300,6 +1308,10 @@ msgstr "In Datei speichern"
msgid "Save your Work"
msgstr "Speichern Sie Ihre Arbeit"

#: src/components/Checkout.tsx:185
msgid "Secure payment"
msgstr "Sichere Zahlung"

#: src/components/Tabs/ThemeTab.tsx:326
msgid "Set Fixed Node Height"
msgstr "Fester Knotenhöhe festlegen"
Expand Down Expand Up @@ -1650,6 +1662,10 @@ msgstr "Unbegrenzte permanente Flowcharts"
msgid "Unlimited cloud-saved flowcharts"
msgstr "Unbegrenzte in der Cloud gespeicherte Flussdiagramme"

#: src/components/Checkout.tsx:132
msgid "Unlock AI Features and never lose your work with a Pro account."
msgstr "Entsperren Sie KI-Funktionen und verlieren Sie nie wieder Ihre Arbeit mit einem Pro-Konto."

#: src/lib/hooks.ts:86
msgid "Unpaid"
msgstr "Unbezahlt"
Expand All @@ -1674,6 +1690,7 @@ msgstr "Upgrade auf Flowchart Fun Pro und schalte frei:"
msgid "Upgrade to Flowchart Fun Pro to unlock SVG exports and enjoy more advanced features for your diagrams."
msgstr "Upgrade auf Flowchart Fun Pro, um SVG-Export freizuschalten und mehr fortschrittliche Funktionen für Ihre Diagramme zu nutzen."

#: src/components/Checkout.tsx:129
#: src/components/Header.tsx:410
msgid "Upgrade to Pro"
msgstr "Auf Pro upgraden"
Expand Down Expand Up @@ -1808,7 +1825,7 @@ msgstr "Schreiben Sie wie eine Gliederung"
msgid "Write your prompt here or click to enable the microphone, then press and hold to record."
msgstr "Schreiben Sie hier Ihre Aufforderung oder klicken Sie auf das Mikrofon, um es zu aktivieren, dann halten Sie es gedrückt, um aufzunehmen."

#: src/components/Checkout.tsx:143
#: src/components/Checkout.tsx:141
msgid "Yearly"
msgstr "Jährlich"

Expand All @@ -1824,7 +1841,7 @@ msgstr "Mit <0>Flowchart Fun Pro</0> können Sie unbegrenzt dauerhafte Flussdiag
msgid "You need to log in to access this page."
msgstr "Sie müssen sich anmelden, um auf diese Seite zuzugreifen."

#: src/components/Checkout.tsx:101
#: src/components/Checkout.tsx:100
msgid "You're already a Pro User. <0>Manage Subscription</0><1/>Have questions or feature requests? <2>Let Us Know</2>"
msgstr "Sie sind bereits ein Pro-Benutzer. <0>Abonnement verwalten</0><1/>Haben Sie Fragen oder Feature-Anfragen? <2>Lassen Sie es uns wissen</2>"

Expand Down Expand Up @@ -1862,15 +1879,15 @@ msgstr "Vergrößern"
msgid "Zoom Out"
msgstr "Verkleinern"

#: src/components/Checkout.tsx:213
#: src/components/Checkout.tsx:232
msgid "month"
msgstr "Monat"

#: src/pages/LogIn.tsx:205
msgid "or"
msgstr "oder"

#: src/components/Checkout.tsx:176
#: src/components/Checkout.tsx:174
msgid "{0}"
msgstr "{0}"

Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/en/messages.js

Large diffs are not rendered by default.

49 changes: 33 additions & 16 deletions app/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ msgstr "Become a Pro User"
msgid "Begin your journey"
msgstr "Begin your journey"

#: src/components/Checkout.tsx:144
#: src/components/Checkout.tsx:142
msgid "Billed annually at $24"
msgstr "Billed annually at $24"

#: src/components/Checkout.tsx:156
#: src/components/Checkout.tsx:154
msgid "Billed monthly at $4"
msgstr "Billed monthly at $4"

Expand Down Expand Up @@ -198,6 +198,10 @@ msgstr "Breadthfirst"
msgid "Cancel"
msgstr "Cancel"

#: src/components/Checkout.tsx:191
msgid "Cancel anytime"
msgstr "Cancel anytime"

#: src/pages/Account.tsx:326
msgid "Cancel your subscription. Your hosted charts will become read-only."
msgstr "Cancel your subscription. Your hosted charts will become read-only."
Expand Down Expand Up @@ -237,10 +241,6 @@ msgstr "Choose"
msgid "Choose Template"
msgstr "Choose Template"

#: src/components/Checkout.tsx:130
msgid "Choose a Plan"
msgstr "Choose a Plan"

#: src/components/LearnSyntaxDialog.tsx:327
msgid "Choose from a variety of arrow shapes for the source and target of an edge. Shapes include triangle, triangle-tee, circle-triangle, triangle-cross, triangle-backcurve, vee, tee, square, circle, diamond, chevron, none. ."
msgstr "Choose from a variety of arrow shapes for the source and target of an edge. Shapes include triangle, triangle-tee, circle-triangle, triangle-cross, triangle-backcurve, vee, tee, square, circle, diamond, chevron, none. ."
Expand Down Expand Up @@ -692,14 +692,14 @@ msgstr "Free"
msgid "Fullscreen"
msgstr "Fullscreen"

#: src/components/Checkout.tsx:133
msgid "Gain access to AI Features and never lose your work with a Pro account."
msgstr "Gain access to AI Features and never lose your work with a Pro account."

#: src/components/Tabs/ThemeTab.tsx:155
msgid "General"
msgstr "General"

#: src/components/Checkout.tsx:177
msgid "Get Pro Access Now"
msgstr "Get Pro Access Now"

#: src/lib/usePromptStore.ts:99
msgid "Get Unlimited AI Requests"
msgstr "Get Unlimited AI Requests"
Expand Down Expand Up @@ -956,7 +956,7 @@ msgstr "Log Out"
msgid "Log in to Save"
msgstr "Log in to Save"

#: src/components/Checkout.tsx:74
#: src/components/Checkout.tsx:73
msgid "Log in to upgrade your account"
msgstr "Log in to upgrade your account"

Expand All @@ -980,7 +980,7 @@ msgstr "Manage Billing"
msgid "Map Data"
msgstr "Map Data"

#: src/components/Checkout.tsx:155
#: src/components/Checkout.tsx:153
msgid "Monthly"
msgstr "Monthly"

Expand Down Expand Up @@ -1149,6 +1149,10 @@ msgstr "Privacy Policy"
msgid "Processing Data"
msgstr "Processing Data"

#: src/components/Checkout.tsx:176
msgid "Processing..."
msgstr "Processing..."

#: src/components/AiToolbar.tsx:32
msgid "Prompt"
msgstr "Prompt"
Expand Down Expand Up @@ -1279,6 +1283,10 @@ msgstr "Rotate Label"
msgid "SVG Export is a Pro Feature"
msgstr "SVG Export is a Pro Feature"

#: src/components/Checkout.tsx:197
msgid "Satisfaction guaranteed or first payment refunded"
msgstr "Satisfaction guaranteed or first payment refunded"

#: src/components/FlowchartHeader.tsx:123
#: src/components/FlowchartHeader.tsx:147
msgid "Save"
Expand All @@ -1300,6 +1308,10 @@ msgstr "Save to File"
msgid "Save your Work"
msgstr "Save your Work"

#: src/components/Checkout.tsx:185
msgid "Secure payment"
msgstr "Secure payment"

#: src/components/Tabs/ThemeTab.tsx:326
msgid "Set Fixed Node Height"
msgstr "Set Fixed Node Height"
Expand Down Expand Up @@ -1650,6 +1662,10 @@ msgstr "Unlimited Permanent Flowcharts"
msgid "Unlimited cloud-saved flowcharts"
msgstr "Unlimited cloud-saved flowcharts"

#: src/components/Checkout.tsx:132
msgid "Unlock AI Features and never lose your work with a Pro account."
msgstr "Unlock AI Features and never lose your work with a Pro account."

#: src/lib/hooks.ts:86
msgid "Unpaid"
msgstr "Unpaid"
Expand All @@ -1674,6 +1690,7 @@ msgstr "Upgrade to Flowchart Fun Pro and unlock:"
msgid "Upgrade to Flowchart Fun Pro to unlock SVG exports and enjoy more advanced features for your diagrams."
msgstr "Upgrade to Flowchart Fun Pro to unlock SVG exports and enjoy more advanced features for your diagrams."

#: src/components/Checkout.tsx:129
#: src/components/Header.tsx:410
msgid "Upgrade to Pro"
msgstr "Upgrade to Pro"
Expand Down Expand Up @@ -1808,7 +1825,7 @@ msgstr "Write like an outline"
msgid "Write your prompt here or click to enable the microphone, then press and hold to record."
msgstr "Write your prompt here or click to enable the microphone, then press and hold to record."

#: src/components/Checkout.tsx:143
#: src/components/Checkout.tsx:141
msgid "Yearly"
msgstr "Yearly"

Expand All @@ -1824,7 +1841,7 @@ msgstr "You can create unlimited permanent flowcharts with <0>Flowchart Fun Pro<
msgid "You need to log in to access this page."
msgstr "You need to log in to access this page."

#: src/components/Checkout.tsx:101
#: src/components/Checkout.tsx:100
msgid "You're already a Pro User. <0>Manage Subscription</0><1/>Have questions or feature requests? <2>Let Us Know</2>"
msgstr "You're already a Pro User. <0>Manage Subscription</0><1/>Have questions or feature requests? <2>Let Us Know</2>"

Expand Down Expand Up @@ -1862,15 +1879,15 @@ msgstr "Zoom In"
msgid "Zoom Out"
msgstr "Zoom Out"

#: src/components/Checkout.tsx:213
#: src/components/Checkout.tsx:232
msgid "month"
msgstr "month"

#: src/pages/LogIn.tsx:205
msgid "or"
msgstr "or"

#: src/components/Checkout.tsx:176
#: src/components/Checkout.tsx:174
msgid "{0}"
msgstr "{0}"

Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/es/messages.js

Large diffs are not rendered by default.

Loading

0 comments on commit feef72d

Please sign in to comment.