Skip to content

Commit

Permalink
Add Missing Theme Tab Labels
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Jan 12, 2025
1 parent c0405ed commit 5d9321d
Show file tree
Hide file tree
Showing 21 changed files with 14,550 additions and 19,590 deletions.
6 changes: 4 additions & 2 deletions app/scripts/autotranslations.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Configuration, OpenAIApi } from "openai";

import dotenv from "dotenv";
import fs from "fs";
import { Configuration, OpenAIApi } from "openai";
import path from "path";

dotenv.config("./env");

// Between Calls To Avoid Rate Limiting
Expand Down Expand Up @@ -124,7 +126,7 @@ for (const locale of locales) {
/** pop off the first 6 phrases */
const batch = phrases.splice(0, 6);

const prompt = `Translate phrases from en to ${locale}\n\nEN\n${batch
const prompt = `Translate the following UI text strings for a flowcharting app from English to ${locale}.\n\nEN\n${batch
.map((phrase) => `- ${phrase.text}`)
.join("\n")}\n\n${locale.toUpperCase()}\n`;

Expand Down
10 changes: 6 additions & 4 deletions app/src/components/RenameButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ export const RenameButton = memo(function RenameButton({
<Trans>Rename</Trans>
</SectionTitle>
{hasProAccess && !isHosted ? (
<label className="flex gap-2 item-center mt-2">
<span className="text-xs opacity-80">
<Trans>Convert to hosted chart?</Trans>
</span>
<label
htmlFor="convert-to-hosted"
className="flex gap-2 items-center mt-2 text-xs opacity-80"
>
<Trans>Convert to hosted chart?</Trans>
<input
id="convert-to-hosted"
type="checkbox"
checked={convertToHosted}
onChange={(e) => {
Expand Down
55 changes: 51 additions & 4 deletions app/src/components/Tabs/ThemeTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,19 @@ const Form = createForm<{
},
{
label: t`Text Max Width`,
title: () => <Article className="w-5 h-5" />,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<Article className="w-5 h-5" />
<span className="font-semibold">
<Trans>Text Max Width</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Maximum width of text inside nodes</Trans>
</span>
</div>
),
id: "textMaxWidth",
control: "range",
value(data) {
Expand Down Expand Up @@ -348,7 +360,18 @@ const Form = createForm<{
},
{
label: t`Text Horizontal Offset`,
title: () => t`Set Fixed Node Height`,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<span className="font-semibold">
<Trans>Fixed Node Height</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Enable to set a consistent height for all nodes</Trans>
</span>
</div>
),
id: "useFixedHeight",
control: "checkbox",
value(data) {
Expand All @@ -360,7 +383,19 @@ const Form = createForm<{
},
{
label: t`Fixed Node Height`,
title: () => <ArrowsOutLineVertical className="w-5 h-5" />,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<ArrowsOutLineVertical className="w-5 h-5" />
<span className="font-semibold">
<Trans>Fixed Height</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Set a consistent height for all nodes</Trans>
</span>
</div>
),
id: "fixedHeight",
control: "range",
hidden(data) {
Expand Down Expand Up @@ -389,7 +424,19 @@ const Form = createForm<{
elements: [
{
label: t`Curve Style`,
title: () => <LineSegment className="w-5 h-5" />,
title: () => (
<div className="grid gap-1">
<div className="flex items-center gap-2">
<LineSegment className="w-5 h-5" />
<span className="font-semibold">
<Trans>Edge Style</Trans>
</span>
</div>
<span className="text-xs text-neutral-500 font-normal">
<Trans>Choose how edges connect between nodes</Trans>
</span>
</div>
),
id: "curveStyle",
control: "select",
value(data) {
Expand Down
1 change: 1 addition & 0 deletions app/src/lib/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export async function makeChartPublic(id: number, isPublic: boolean) {
message: "Duplicate key value violates unique constraint",
details: "",
hint: "",
name: "PostgrestError",
};
// If unique violation, generate a new public id
let result;
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/de/messages.js

Large diffs are not rendered by default.

Loading

0 comments on commit 5d9321d

Please sign in to comment.