From 5d9321d3d69228896e713b96dfe6a37dda21b7d3 Mon Sep 17 00:00:00 2001 From: Rob Gordon Date: Sun, 12 Jan 2025 09:06:35 -0600 Subject: [PATCH 1/6] Add Missing Theme Tab Labels --- app/scripts/autotranslations.mjs | 6 +- app/src/components/RenameButton.tsx | 10 +- app/src/components/Tabs/ThemeTab.tsx | 55 +- app/src/lib/queries.ts | 1 + app/src/locales/de/messages.js | 2 +- app/src/locales/de/messages.po | 149 +- app/src/locales/en/messages.js | 2 +- app/src/locales/en/messages.po | 149 +- app/src/locales/es/messages.js | 2 +- app/src/locales/es/messages.po | 149 +- app/src/locales/fr/messages.js | 2 +- app/src/locales/fr/messages.po | 149 +- app/src/locales/hi/messages.js | 2 +- app/src/locales/hi/messages.po | 149 +- app/src/locales/ko/messages.js | 2 +- app/src/locales/ko/messages.po | 149 +- app/src/locales/pt-br/messages.js | 2 +- app/src/locales/pt-br/messages.po | 149 +- app/src/locales/zh/messages.js | 2 +- app/src/locales/zh/messages.po | 149 +- pnpm-lock.yaml | 32860 +++++++++++-------------- 21 files changed, 14550 insertions(+), 19590 deletions(-) diff --git a/app/scripts/autotranslations.mjs b/app/scripts/autotranslations.mjs index e85080e89..2aaa90dba 100644 --- a/app/scripts/autotranslations.mjs +++ b/app/scripts/autotranslations.mjs @@ -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 @@ -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`; diff --git a/app/src/components/RenameButton.tsx b/app/src/components/RenameButton.tsx index 32961d7bf..5864fa1ab 100644 --- a/app/src/components/RenameButton.tsx +++ b/app/src/components/RenameButton.tsx @@ -121,11 +121,13 @@ export const RenameButton = memo(function RenameButton({ Rename {hasProAccess && !isHosted ? ( -