From 154326061d9c963861d5b3a93c14b9fc409ab937 Mon Sep 17 00:00:00 2001 From: mrbusysky <58412572+mrbusysky@users.noreply.github.com> Date: Mon, 19 Sep 2022 18:39:44 -0700 Subject: [PATCH] Translation update part 2 --- .../build_src/src/Translation/config.ts | 4 +- .../src/Translation/locales/en/home.json | 4 +- .../src/Translation/locales/es/home.json | 122 +++++++++++++++--- .../components/molecules/betaMode/index.tsx | 5 +- .../improvementSettings/index.tsx | 10 +- .../propertySettings/index.tsx | 15 ++- .../workflowSettings/index.tsx | 12 +- .../basicCreation/seedImage/index.tsx | 3 +- ui/frontend/dist/index.js | 43 +++--- 9 files changed, 168 insertions(+), 50 deletions(-) diff --git a/ui/frontend/build_src/src/Translation/config.ts b/ui/frontend/build_src/src/Translation/config.ts index ec1a50be..18878a0f 100644 --- a/ui/frontend/build_src/src/Translation/config.ts +++ b/ui/frontend/build_src/src/Translation/config.ts @@ -1,7 +1,7 @@ import i18n from "i18next"; // this should be updated to an interface import ENTranslation from "./locales/en/home.json"; -import ESTranlation from "./locales/es/home.json"; +import ESTranslation from "./locales/es/home.json"; import { initReactI18next } from "react-i18next"; export const resources = { @@ -9,7 +9,7 @@ export const resources = { translation: ENTranslation, }, es: { - translation: ESTranlation, + translation: ESTranslation, }, } as const; diff --git a/ui/frontend/build_src/src/Translation/locales/en/home.json b/ui/frontend/build_src/src/Translation/locales/en/home.json index 93be356c..1c7fe6f5 100644 --- a/ui/frontend/build_src/src/Translation/locales/en/home.json +++ b/ui/frontend/build_src/src/Translation/locales/en/home.json @@ -45,9 +45,11 @@ "height": "Height:", "steps": "Number of inference steps:", "guide-scale": "Guidance Scale:", + "prompt-str": "Prompt Strength:", "live-preview": "Show a live preview of the image (disable this for faster image generation)", "fix-face": "Fix incorrect faces and eyes (uses GFPGAN)", - "upscale": "Upscale the image to 4x resolution using:", + "ups": "Upscale the image to 4x resolution using:", + "no-ups": "No Upscaling", "corrected": "Show only the corrected/upscaled image" }, "tags": { diff --git a/ui/frontend/build_src/src/Translation/locales/es/home.json b/ui/frontend/build_src/src/Translation/locales/es/home.json index ad9b9636..1c7fe6f5 100644 --- a/ui/frontend/build_src/src/Translation/locales/es/home.json +++ b/ui/frontend/build_src/src/Translation/locales/es/home.json @@ -1,20 +1,108 @@ { - "title": "Stable Diffusion UI en EspaƱol", + "title": "Stable Diffusion UI", "description": "", - "navbar": {}, - "land-cre": {}, - "land-pre": {}, - "home": {}, - "in-paint": {}, - "settings": {}, - "tags": {}, - "preview-prompt": {}, - "current-task": "", - "recent-create": "", - "popup": {}, - "history": {}, - "advanced-settings": {}, - "storage": {}, - "import": {}, - "about": "" + "navbar": { + "home": "Home", + "history": "History", + "community": "Community", + "settings": "Settings" + }, + "land-cre": { + "cp": "Create Profile", + "cp-place": "Profile name", + "pp": "Profile Picture", + "pp-disc": "", + "ast": "Automatically save to", + "ast-disc": "File path to auto save your creations", + "place": "File path", + "cre": "Create" + }, + "land-pre": { + "user": "Username", + "add": "Add Profile" + }, + "home": { + "status-starting": "Stable Diffusion is starting...", + "status-ready": "Stable Diffusion is ready to use!", + "status-error": "Stable Diffusion is not running!", + "editor-title": "Prompt", + "initial-img-txt": "Initial Image: (optional)", + "initial-img-btn": "Browse...", + "initial-img-text2": "No file selected.", + "make-img-btn": "Make Image", + "make-img-btn-stop": "Stop" + }, + "in-paint": { + "txt": "In-Painting (select the area which the AI will paint into)", + "clear": "Clear" + }, + "settings": { + "base-img": "Use base image:", + "seed": "Seed:", + "amount-of-img": "Amount of images to make:", + "how-many": "How many at once:", + "width": "Width:", + "height": "Height:", + "steps": "Number of inference steps:", + "guide-scale": "Guidance Scale:", + "prompt-str": "Prompt Strength:", + "live-preview": "Show a live preview of the image (disable this for faster image generation)", + "fix-face": "Fix incorrect faces and eyes (uses GFPGAN)", + "ups": "Upscale the image to 4x resolution using:", + "no-ups": "No Upscaling", + "corrected": "Show only the corrected/upscaled image" + }, + "tags": { + "txt": "Image Modifiers (art styles, tags etc)" + }, + "preview-prompt": { + "part1": "Type a prompt and press the \"Make Image\" button.", + "part2": "You can set an \"Initial Image\" if you want to guide the AI.\n", + "part3": "You can also add modifiers like \"Realistic\", \"Pencil Sketch\", \"ArtStation\" etc by browsing through the \"Image Modifiers\" section and selecting the desired modifiers.\n", + "part4": "Click \"Advanced Settings\" for additional settings like seed, image size, number of images to generate etc.", + "part5": "Enjoy! :)" + }, + "current-task": "Current task", + "recent-create": "Recently Created", + "popup": { + "use-btn": "Use Image", + "use-btn2": "Use Image and Tags" + }, + "history": { + "fave": "Favorites Only", + "search": "Search" + }, + "advanced-settings": { + "sound": "Play sound on task completion", + "sound-disc": "Will play a sound so user can hear when image is done.", + "turbo": "Turbo mode", + "turbo-disc": "Generates images faster, but uses an additional 1 GB of GPU memory", + "cpu": "Use CPU instead of GPU", + "cpu-disc": "Warning: this will be *very* slow", + "gpu": "Use full precision", + "gpu-disc": "(for GPU-only. warning: this will consume more VRAM)", + "beta": "Beta Features", + "beta-disc": "Get the latest features immediately (but could be less stable). \nPlease restart the program after changing this.", + "save": "SAVE" + }, + "storage": { + "ast": "Automatically save to", + "ast-disc": "File path to auto save your creations", + "place": "File path", + "cps": "Cross profile sharing", + "cps-disc": "Profiles will see suggestions from each other.", + "acb": "Allow cloud backup", + "acb-disc": "A button will show up for images on hover", + "acb-place": "Choose your", + "acc-api": "Api key", + "acb-api-place": "Your API key", + "save": "SAVE" + }, + "import": { + "imp-btn": "IMPORT", + "exp-btn": "EXPORT", + "disc": "It is a good idea to leave the exported file as it is. Otherwise it may not import correctly", + "disc:2": "When importing, only profiles that are not already present on the will be added." + }, + "about": "If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!\n\nPlease feel free to join the discord community or file an issue if you have any problems or suggestions in using this interface.\n\nDisclaimer: The authors of this project are not responsible for any content generated using this interface.\n\nThis license of this software forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm,\nspread misinformation and target vulnerable groups. For the full list of restrictions please read the license.\n\nBy using this software, you consent to the terms and conditions of the license.\n" } diff --git a/ui/frontend/build_src/src/components/molecules/betaMode/index.tsx b/ui/frontend/build_src/src/components/molecules/betaMode/index.tsx index b76ef9ec..e5acd386 100644 --- a/ui/frontend/build_src/src/components/molecules/betaMode/index.tsx +++ b/ui/frontend/build_src/src/components/molecules/betaMode/index.tsx @@ -8,7 +8,10 @@ import { toggleBetaConfig, } from "../../../api"; +import { useTranslation } from "react-i18next"; + export default function BetaMode() { + const { t } = useTranslation(); // gate for the toggle const [shouldSetCofig, setShouldSetConfig] = useState(false); // next branch to get @@ -65,7 +68,7 @@ export default function BetaMode() { setShouldSetConfig(true); }} /> - Enable Beta Mode + {t("advanced-settings.beta")} {t("advanced-settings.beta-disc")} ); } diff --git a/ui/frontend/build_src/src/components/organisms/creationPanel/advancedSettings/improvementSettings/index.tsx b/ui/frontend/build_src/src/components/organisms/creationPanel/advancedSettings/improvementSettings/index.tsx index de230621..d559bcb3 100644 --- a/ui/frontend/build_src/src/components/organisms/creationPanel/advancedSettings/improvementSettings/index.tsx +++ b/ui/frontend/build_src/src/components/organisms/creationPanel/advancedSettings/improvementSettings/index.tsx @@ -10,7 +10,11 @@ import { MenuButton, // @ts-expect-error } from "../advancedsettings.css.ts"; +import { useTranslation } from "react-i18next"; + export default function ImprovementSettings() { + const { t } = useTranslation(); + // these are conditionals that should be retired and inferred from the store const isUsingFaceCorrection = useImageCreate((state) => state.isUsingFaceCorrection() @@ -74,7 +78,7 @@ export default function ImprovementSettings() {