From b3c19ea9f01a7335a204d2924b9802fec0ed7cf9 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 12 Apr 2025 15:22:44 -0400 Subject: [PATCH] translations --- app/scenes/Settings/components/ImageUpload.tsx | 10 ++++++---- shared/i18n/locales/en_US/translation.json | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/scenes/Settings/components/ImageUpload.tsx b/app/scenes/Settings/components/ImageUpload.tsx index 9f7fc4f540..c703ae3c91 100644 --- a/app/scenes/Settings/components/ImageUpload.tsx +++ b/app/scenes/Settings/components/ImageUpload.tsx @@ -4,6 +4,7 @@ import * as React from "react"; import { useState, useRef } from "react"; import AvatarEditor from "react-avatar-editor"; import Dropzone from "react-dropzone"; +import { useTranslation } from "react-i18next"; import styled from "styled-components"; import { s } from "@shared/styles"; import { AttachmentPreset } from "@shared/types"; @@ -26,12 +27,13 @@ export type Props = { const ImageUpload: React.FC = ({ onSuccess, onError, - submitText = "Crop Image", + submitText, borderRadius = 150, children, }) => { - const stores = useStores(); - const { ui } = stores; + const { ui } = useStores(); + const { t } = useTranslation(); + submitText || t("Crop image"); const [isUploading, setIsUploading] = useState(false); const [isCropping, setIsCropping] = useState(false); @@ -120,7 +122,7 @@ const ImageUpload: React.FC = ({ />
- {isUploading ? "Uploading…" : submitText} + {isUploading ? `${t(`Uploading`)}…` : submitText} diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 209eb76c0c..f6beb85df4 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -893,6 +893,8 @@ "No people left to add": "No people left to add", "Date created": "Date created", "Upload": "Upload", + "Crop image": "Crop image", + "Uploading": "Uploading", "How does this work?": "How does this work?", "You can import a zip file that was previously exported from the JSON option in another instance. In {{ appName }}, open Export in the Settings sidebar and click on Export Data.": "You can import a zip file that was previously exported from the JSON option in another instance. In {{ appName }}, open Export in the Settings sidebar and click on Export Data.", "Drag and drop the zip file from the JSON export option in {{appName}}, or click to upload": "Drag and drop the zip file from the JSON export option in {{appName}}, or click to upload", @@ -1153,6 +1155,5 @@ "You updated {{ timeAgo }}": "You updated {{ timeAgo }}", "{{ user }} updated {{ timeAgo }}": "{{ user }} updated {{ timeAgo }}", "You created {{ timeAgo }}": "You created {{ timeAgo }}", - "{{ user }} created {{ timeAgo }}": "{{ user }} created {{ timeAgo }}", - "Uploading": "Uploading" + "{{ user }} created {{ timeAgo }}": "{{ user }} created {{ timeAgo }}" }