From 71475c2e77522cfd01561df313ff3b9df6f367ee Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Tue, 20 May 2025 22:29:35 +0200 Subject: [PATCH 01/42] Translate placeholders --- src/Wallets.tsx | 14 +++++++++----- src/components/Apps/AppPublish.tsx | 20 +++++++++++++++----- src/components/Apps/AppsCategoryDesktop.tsx | 6 +++++- src/components/Apps/AppsPrivate.tsx | 4 +++- src/components/Chat/ChatDirect.tsx | 4 +++- src/components/Chat/ChatOptions.tsx | 4 +++- src/components/Group/BlockedUsersModal.tsx | 4 +++- src/components/Group/Forum/NewThread.tsx | 4 +++- src/components/Group/InviteMember.tsx | 4 +++- src/components/NotAuthenticated.tsx | 8 ++++++-- src/components/RegisterName.tsx | 4 +++- src/i18n/locales/en/auth.json | 3 ++- src/i18n/locales/en/core.json | 9 +++++++-- 13 files changed, 65 insertions(+), 23 deletions(-) diff --git a/src/Wallets.tsx b/src/Wallets.tsx index 298cb26..e8a5ae1 100644 --- a/src/Wallets.tsx +++ b/src/Wallets.tsx @@ -362,7 +362,9 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => { })} setSeedName(e.target.value)} /> @@ -370,12 +372,14 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => { setSeedValue(e.target.value)} @@ -554,7 +558,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => { })} setName(e.target.value)} sx={{ @@ -570,7 +574,7 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => { })} setNote(e.target.value)} inputProps={{ diff --git a/src/components/Apps/AppPublish.tsx b/src/components/Apps/AppPublish.tsx index d81bde3..7dfcf3c 100644 --- a/src/components/Apps/AppPublish.tsx +++ b/src/components/Apps/AppPublish.tsx @@ -292,7 +292,9 @@ export const AppPublish = ({ names, categories }) => { setName(event?.target.value)} @@ -323,7 +325,9 @@ export const AppPublish = ({ names, categories }) => { setAppType(event?.target.value)} @@ -339,11 +343,13 @@ export const AppPublish = ({ names, categories }) => { })} + {t('core:app', { postProcess: 'capitalizeFirstChar', })} + {t('core:website', { postProcess: 'capitalizeFirstChar', @@ -370,7 +376,7 @@ export const AppPublish = ({ names, categories }) => { width: '100%', maxWidth: '450px', }} - placeholder="Title" + placeholder={t('core:title', { postProcess: 'capitalizeFirstChar' })} inputProps={{ 'aria-label': 'Title', fontSize: '14px', @@ -397,7 +403,9 @@ export const AppPublish = ({ names, categories }) => { width: '100%', maxWidth: '450px', }} - placeholder="Description" + placeholder={t('core:description', { + postProcess: 'capitalizeFirstChar', + })} inputProps={{ 'aria-label': 'Description', fontSize: '14px', @@ -415,7 +423,9 @@ export const AppPublish = ({ names, categories }) => { setCategory(event?.target.value)} > diff --git a/src/components/Apps/AppsCategoryDesktop.tsx b/src/components/Apps/AppsCategoryDesktop.tsx index 7fc853a..bd52a53 100644 --- a/src/components/Apps/AppsCategoryDesktop.tsx +++ b/src/components/Apps/AppsCategoryDesktop.tsx @@ -15,6 +15,7 @@ import IconClearInput from '../../assets/svgs/ClearInput.svg'; import { Spacer } from '../../common/Spacer'; import { AppInfoSnippet } from './AppInfoSnippet'; import { Virtuoso } from 'react-virtuoso'; +import { useTranslation } from 'react-i18next'; const StyledVirtuosoContainer = styled('div')({ position: 'relative', @@ -44,6 +45,7 @@ export const AppsCategoryDesktop = ({ const [searchValue, setSearchValue] = useState(''); const virtuosoRef = useRef(null); const theme = useTheme(); + const { t } = useTranslation(['auth', 'core', 'group']); const categoryList = useMemo(() => { if (category?.id === 'all') return availableQapps; @@ -139,7 +141,9 @@ export const AppsCategoryDesktop = ({ ml: 1, paddingLeft: '12px', }} - placeholder="Search for apps" + placeholder={t('core:action.search_apps', { + postProcess: 'capitalizeFirstChar', + })} inputProps={{ 'aria-label': 'Search for apps', fontSize: '16px', diff --git a/src/components/Apps/AppsPrivate.tsx b/src/components/Apps/AppsPrivate.tsx index 8a64713..ea3b060 100644 --- a/src/components/Apps/AppsPrivate.tsx +++ b/src/components/Apps/AppsPrivate.tsx @@ -415,7 +415,9 @@ export const AppsPrivate = ({ myName }) => { {t('core:name', { postProcess: 'capitalizeFirstChar' })} setPrivateAppValues((prev) => { diff --git a/src/components/Chat/ChatDirect.tsx b/src/components/Chat/ChatDirect.tsx index 3e57f93..35370ad 100644 --- a/src/components/Chat/ChatDirect.tsx +++ b/src/components/Chat/ChatDirect.tsx @@ -589,7 +589,9 @@ export const ChatDirect = ({ fontSize: '18px', padding: '5px', }} - placeholder="Name or address" + placeholder={t('auth:message.generic.name_address', { + postProcess: 'capitalizeFirstChar', + })} value={directToValue} onChange={(e) => setDirectToValue(e.target.value)} /> diff --git a/src/components/Chat/ChatOptions.tsx b/src/components/Chat/ChatOptions.tsx index de14177..a79a4a2 100644 --- a/src/components/Chat/ChatOptions.tsx +++ b/src/components/Chat/ChatOptions.tsx @@ -422,7 +422,9 @@ export const ChatOptions = ({ value={searchValue} onChange={(e) => setSearchValue(e.target.value)} sx={{ ml: 1, flex: 1 }} - placeholder="Search chat text" + placeholder={t('core:action.search_chat_text', { + postProcess: 'capitalizeFirstChar', + })} inputProps={{ 'aria-label': 'Search for apps', fontSize: '16px', diff --git a/src/components/Group/BlockedUsersModal.tsx b/src/components/Group/BlockedUsersModal.tsx index 5ebd2fc..adc0a10 100644 --- a/src/components/Group/BlockedUsersModal.tsx +++ b/src/components/Group/BlockedUsersModal.tsx @@ -187,7 +187,9 @@ export const BlockedUsersModal = () => { }} > { setValue(e.target.value); diff --git a/src/components/Group/Forum/NewThread.tsx b/src/components/Group/Forum/NewThread.tsx index d41e9f0..763ecb6 100644 --- a/src/components/Group/Forum/NewThread.tsx +++ b/src/components/Group/Forum/NewThread.tsx @@ -476,7 +476,9 @@ export const NewThread = ({ onChange={(e) => { setThreadTitle(e.target.value); }} - placeholder="Thread Title" + placeholder={t('core:thread_title', { + postProcess: 'capitalizeFirstChar', + })} disableUnderline autoComplete="off" autoCorrect="off" diff --git a/src/components/Group/InviteMember.tsx b/src/components/Group/InviteMember.tsx index cc6e431..07ee3a7 100644 --- a/src/components/Group/InviteMember.tsx +++ b/src/components/Group/InviteMember.tsx @@ -92,7 +92,9 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => { setValue(e.target.value)} /> diff --git a/src/components/NotAuthenticated.tsx b/src/components/NotAuthenticated.tsx index f6bf34e..0ee147c 100644 --- a/src/components/NotAuthenticated.tsx +++ b/src/components/NotAuthenticated.tsx @@ -925,14 +925,18 @@ export const NotAuthenticated = ({ }} > { setUrl(e.target.value); }} /> { setCustomApiKey(e.target.value); diff --git a/src/components/RegisterName.tsx b/src/components/RegisterName.tsx index 966cb71..dab0585 100644 --- a/src/components/RegisterName.tsx +++ b/src/components/RegisterName.tsx @@ -235,7 +235,9 @@ export const RegisterName = ({ autoFocus onChange={(e) => setRegisterNameValue(e.target.value)} value={registerNameValue} - placeholder="Choose a name" + placeholder={t('core:action.choose_name', { + postProcess: 'capitalizeFirstChar', + })} /> {(!balance || (nameFee && balance && balance < nameFee)) && ( <> diff --git a/src/i18n/locales/en/auth.json b/src/i18n/locales/en/auth.json index e091927..fb84c57 100644 --- a/src/i18n/locales/en/auth.json +++ b/src/i18n/locales/en/auth.json @@ -69,6 +69,7 @@ "choose_block": "choose 'block txs' or 'all' to block chat messages", "congrats_setup": "congrats, you’re all set up!", "decide_block": "decide what to block", + "name_address": "name or address", "no_account": "no accounts saved", "no_minimum_length": "there is no minimum length requirement", "no_secret_key_published": "no secret key published yet", @@ -96,7 +97,7 @@ "note": "note", "password": "password", "password_confirmation": "confirm password", - "seed": "seed phrase", + "seed_phrase": "seed phrase", "seed_your": "your seedphrase", "tips": { "additional_wallet": "use this option to connect additional Qortal wallets you've already made, in order to login with them afterwards. You will need access to your backup JSON file in order to do so.", diff --git a/src/i18n/locales/en/core.json b/src/i18n/locales/en/core.json index eaae575..8c409ef 100644 --- a/src/i18n/locales/en/core.json +++ b/src/i18n/locales/en/core.json @@ -17,6 +17,8 @@ "choose": "choose", "choose_file": "choose file", "choose_image": "choose image", + "choose_logo": "choose a logo", + "choose_name": "choose a name", "close": "close", "close_chat": "close Direct Chat", "continue": "continue", @@ -25,8 +27,6 @@ "create_apps": "create apps", "create_file": "create file", "create_thread": "create thread", - "choose_logo": "choose a logo", - "choose_name": "choose a name", "decline": "decline", "decrypt": "decrypt", "disable_enter": "disable enter", @@ -67,6 +67,7 @@ "save_disk": "save to disk", "search": "search", "search_apps": "search for apps", + "search_chat_text": "search chat text", "select_app_type": "select App Type", "select_category": "select Category", "select_name_app": "select Name/App", @@ -289,6 +290,7 @@ "name_app": "name/App", "new_post_in": "new post in {{ title }}", "none": "none", + "note": "note", "option": "option", "option_other": "options", "page": { @@ -311,6 +313,7 @@ "receiver": "receiver", "sender": "sender", "server": "server", + "service_type": "service type", "settings": "settings", "sort": { "by_member": "by member" @@ -323,6 +326,7 @@ }, "thread": "thread", "thread_other": "threads", + "thread_title": "thread title", "time": { "day_one": "{{count}} day", "day_other": "{{count}} days", @@ -335,6 +339,7 @@ "title": "title", "to": "to", "tutorial": "tutorial", + "url": "url", "user_lookup": "user lookup", "vote": "vote", "vote_other": "{{ count }} votes", From 4abaf0648971cfbc5588bbf704cedc437e853ea4 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Tue, 20 May 2025 22:46:45 +0200 Subject: [PATCH 02/42] Translate labels and aria-labels --- src/Wallets.tsx | 4 +++- src/components/Apps/AppsDevModeNavBar.tsx | 4 +++- src/components/Apps/AppsNavBarDesktop.tsx | 4 +++- src/components/Apps/AppsPrivate.tsx | 4 +++- src/components/BuyQortInformation.tsx | 11 +++++++---- src/components/Desktop/DesktopFooter.tsx | 17 ++++++++++++++--- src/components/Group/AddGroup.tsx | 8 ++++++-- src/components/Group/Group.tsx | 4 +++- src/components/Group/GroupInvites.tsx | 7 ++++++- src/components/Group/GroupJoinRequests.tsx | 7 ++++++- .../Group/ListOfThreadPostsWatched.tsx | 7 ++++++- src/components/Group/ManageMembers.tsx | 8 ++++++-- src/components/Group/Settings.tsx | 4 +++- src/components/Language/LanguageSelector.tsx | 5 ++++- src/components/Minting/Minting.tsx | 4 +++- src/components/RegisterName.tsx | 4 +++- src/components/Tutorials/Tutorials.tsx | 12 +++++++++--- src/i18n/locales/en/core.json | 4 ++++ 18 files changed, 92 insertions(+), 26 deletions(-) diff --git a/src/Wallets.tsx b/src/Wallets.tsx index e8a5ae1..1152f87 100644 --- a/src/Wallets.tsx +++ b/src/Wallets.tsx @@ -541,7 +541,9 @@ const WalletItem = ({ wallet, updateWalletItem, idx, setSelectedWallet }) => { setIsEdit(true); }} edge="end" - aria-label="edit" + aria-label={t('core:action.edit', { + postProcess: 'capitalizeFirstChar', + })} > diff --git a/src/components/Apps/AppsDevModeNavBar.tsx b/src/components/Apps/AppsDevModeNavBar.tsx index e011ded..798929b 100644 --- a/src/components/Apps/AppsDevModeNavBar.tsx +++ b/src/components/Apps/AppsDevModeNavBar.tsx @@ -109,7 +109,9 @@ export const AppsDevModeNavBar = () => { { { { const [isOpen, setIsOpen] = useState(false); + const theme = useTheme(); + const { t } = useTranslation(['auth', 'core', 'group']); const openBuyQortInfoFunc = useCallback( (e) => { @@ -33,8 +36,6 @@ export const BuyQortInformation = ({ balance }) => { [setIsOpen] ); - const theme = useTheme(); - useEffect(() => { subscribeToEvent('openBuyQortInfo', openBuyQortInfoFunc); @@ -62,7 +63,7 @@ export const BuyQortInformation = ({ balance }) => { maxWidth: '90vw', padding: '10px', width: '400px', - }} + }} // TODO translate > Get QORT using Qortal's crosschain trade portal @@ -113,7 +114,9 @@ export const BuyQortInformation = ({ balance }) => { maxWidth: 360, width: '100%', }} - aria-label="contacts" + aria-label={t('core:contact_other', { + postProcess: 'capitalizeFirstChar', + })} > diff --git a/src/components/Desktop/DesktopFooter.tsx b/src/components/Desktop/DesktopFooter.tsx index f3912ba..b5a1d1f 100644 --- a/src/components/Desktop/DesktopFooter.tsx +++ b/src/components/Desktop/DesktopFooter.tsx @@ -7,6 +7,7 @@ import { HomeIcon } from '../../assets/Icons/HomeIcon'; import { Save } from '../Save/Save'; import { enabledDevModeAtom } from '../../atoms/global'; import { useAtom } from 'jotai'; +import { useTranslation } from 'react-i18next'; export const IconWrapper = ({ children, @@ -65,8 +66,8 @@ export const DesktopFooter = ({ setIsOpenSideViewGroups, }) => { const [isEnabledDevMode, setIsEnabledDevMode] = useAtom(enabledDevModeAtom); - const theme = useTheme(); + const { t } = useTranslation(['auth', 'core', 'group']); if (hide) return; return ( @@ -105,7 +106,12 @@ export const DesktopFooter = ({ setIsOpenSideViewGroups(false); }} > - + @@ -115,7 +121,12 @@ export const DesktopFooter = ({ setDesktopSideView('groups'); }} > - + { { diff --git a/src/components/Group/GroupInvites.tsx b/src/components/Group/GroupInvites.tsx index bd489c4..96f375c 100644 --- a/src/components/Group/GroupInvites.tsx +++ b/src/components/Group/GroupInvites.tsx @@ -162,7 +162,12 @@ export const GroupInvites = ({ myAddress, setOpenAddGroup }) => { }} disablePadding secondaryAction={ - + + { }} disablePadding secondaryAction={ - + { edge="start" color="inherit" onClick={handleClose} - aria-label="close" + aria-label={t('core:action.close', { + postProcess: 'capitalizeFirstChar', + })} > diff --git a/src/components/Language/LanguageSelector.tsx b/src/components/Language/LanguageSelector.tsx index 5700825..6352894 100644 --- a/src/components/Language/LanguageSelector.tsx +++ b/src/components/Language/LanguageSelector.tsx @@ -51,7 +51,10 @@ const LanguageSelector = () => { background: 'none', cursor: 'pointer', }} - aria-label={`Current language: ${name}`} + aria-label={t('core:current_language', { + language: name, + postProcess: 'capitalizeFirstChar', + })} > {flag} diff --git a/src/components/Minting/Minting.tsx b/src/components/Minting/Minting.tsx index c6949ea..f03235b 100644 --- a/src/components/Minting/Minting.tsx +++ b/src/components/Minting/Minting.tsx @@ -581,7 +581,9 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { }} color="inherit" onClick={() => setIsOpenMinting(false)} - aria-label="close" + aria-label={t('core:action.close', { + postProcess: 'capitalizeFirstChar', + })} > diff --git a/src/components/RegisterName.tsx b/src/components/RegisterName.tsx index dab0585..6e2bfe3 100644 --- a/src/components/RegisterName.tsx +++ b/src/components/RegisterName.tsx @@ -346,7 +346,9 @@ export const RegisterName = ({ diff --git a/src/components/Tutorials/Tutorials.tsx b/src/components/Tutorials/Tutorials.tsx index e8b6794..d480b1c 100644 --- a/src/components/Tutorials/Tutorials.tsx +++ b/src/components/Tutorials/Tutorials.tsx @@ -46,7 +46,9 @@ export const Tutorials = () => { }} value={multiNumber} onChange={(e, value) => setMultiNumber(value)} - aria-label="basic tabs example" + aria-label={t('core:basic_tabs_example', { + postProcess: 'capitalizeFirstChar', + })} > {openTutorialModal?.multi?.map((item, index) => { return ( @@ -66,7 +68,9 @@ export const Tutorials = () => { {selectedTutorial?.title} { Date: Wed, 21 May 2025 20:22:10 +0200 Subject: [PATCH 03/42] Add theme translations --- src/components/Desktop/DesktopFooter.tsx | 17 +++++++++-- src/components/Group/AddGroup.tsx | 16 ++++++---- src/components/Group/Group.tsx | 4 ++- src/components/Group/Settings.tsx | 2 +- src/components/ReactionPicker.tsx | 2 -- src/components/Theme/ThemeManager.tsx | 37 ++++++++++++++++++------ src/i18n/locales/en/core.json | 18 +++++++++--- src/i18n/locales/en/group.json | 7 +++-- 8 files changed, 75 insertions(+), 28 deletions(-) diff --git a/src/components/Desktop/DesktopFooter.tsx b/src/components/Desktop/DesktopFooter.tsx index b5a1d1f..ac567ec 100644 --- a/src/components/Desktop/DesktopFooter.tsx +++ b/src/components/Desktop/DesktopFooter.tsx @@ -94,7 +94,10 @@ export const DesktopFooter = ({ goToHome(); }} > - + @@ -145,7 +148,12 @@ export const DesktopFooter = ({ setDesktopSideView('directs'); }} > - + - + diff --git a/src/components/Group/AddGroup.tsx b/src/components/Group/AddGroup.tsx index 9d86252..2028dea 100644 --- a/src/components/Group/AddGroup.tsx +++ b/src/components/Group/AddGroup.tsx @@ -388,7 +388,9 @@ export const AddGroup = ({ address, open, setOpen }) => { labelId="demo-simple-select-label" id="demo-simple-select" value={groupType} - label="Group Type" + label={t('group:group.type', { + postProcess: 'capitalizeFirstChar', + })} onChange={handleChangeGroupType} > @@ -469,7 +471,7 @@ export const AddGroup = ({ address, open, setOpen }) => { }} > @@ -478,7 +480,9 @@ export const AddGroup = ({ address, open, setOpen }) => { labelId="demo-simple-select-label" id="demo-simple-select" value={minBlock} - label="Minimum Block delay" + label={t('group:block_delay.minimum', { + postProcess: 'capitalizeFirstChar', + })} onChange={handleChangeMinBlock} > @@ -528,7 +532,7 @@ export const AddGroup = ({ address, open, setOpen }) => { }} > @@ -537,7 +541,9 @@ export const AddGroup = ({ address, open, setOpen }) => { labelId="demo-simple-select-label" id="demo-simple-select" value={maxBlock} - label="Maximum Block delay" + label={t('group:block_delay.minimum', { + postProcess: 'capitalizeFirstChar', + })} onChange={handleChangeMaxBlock} > diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index c4ff643..8283fce 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -1680,7 +1680,9 @@ export const Group = ({ ? theme.palette.text.primary : theme.palette.text.secondary } - label="Messaging" + label={t('group:group.messaging', { + postProcess: 'capitalizeFirstChar', + })} selected={desktopSideView === 'directs'} > { }} /> } - label={t('group:action.enable_dev_mode', { + label={t('core:action.enable_dev_mode', { postProcess: 'capitalizeFirstChar', })} /> diff --git a/src/components/ReactionPicker.tsx b/src/components/ReactionPicker.tsx index 0bba748..e7a4a43 100644 --- a/src/components/ReactionPicker.tsx +++ b/src/components/ReactionPicker.tsx @@ -105,8 +105,6 @@ export const ReactionPicker = ({ onReaction }) => { height={400} onEmojiClick={handlePicker} onReactionClick={handleReaction} - // reactionsDefaultOpen={true} - // open={true} theme={Theme.DARK} width={350} /> diff --git a/src/components/Theme/ThemeManager.tsx b/src/components/Theme/ThemeManager.tsx index badcb42..b8a51f6 100644 --- a/src/components/Theme/ThemeManager.tsx +++ b/src/components/Theme/ThemeManager.tsx @@ -1,4 +1,4 @@ -import React, { useState, useRef, useEffect } from 'react'; +import { useState, useRef, useEffect } from 'react'; import { Box, Button, @@ -29,6 +29,8 @@ import { rgbStringToHsva, rgbaStringToHsva } from '@uiw/color-convert'; import FileDownloadIcon from '@mui/icons-material/FileDownload'; import { saveFileToDiskGeneric } from '../../utils/generateWallet/generateWallet'; import { handleImportClick } from '../../utils/fileReading'; +import { useTranslation } from 'react-i18next'; + const uid = new ShortUniqueId({ length: 8 }); function detectColorFormat(color) { @@ -80,6 +82,7 @@ export default function ThemeManager() { }); const [currentTab, setCurrentTab] = useState('light'); const nameInputRef = useRef(null); + const { t } = useTranslation(['auth', 'core', 'group']); useEffect(() => { if (openEditor && nameInputRef.current) { @@ -208,7 +211,11 @@ export default function ThemeManager() { const fileContent = await handleImportClick('.json'); const importedTheme = JSON.parse(fileContent); if (!validateTheme(importedTheme)) { - throw new Error('Invalid theme format'); + throw new Error( + t('core:message.generic.invalid_theme_format', { + postProcess: 'capitalizeFirstChar', + }) + ); } const newTheme = { ...importedTheme, id: uid.rnd() }; const updatedThemes = [...userThemes, newTheme]; @@ -223,7 +230,7 @@ export default function ThemeManager() { return ( - Theme Manager + {t('core:theme.manager', { postProcess: 'capitalizeFirstChar' })} + + {userThemes?.map((theme, index) => ( - {themeDraft.id ? 'Edit Theme' : 'Add New Theme'} + {themeDraft.id + ? t('core:action.edit_theme', { + postProcess: 'capitalizeFirstChar', + }) + : t('core:action.new.theme', { + postProcess: 'capitalizeFirstChar', + })} + @@ -391,14 +407,17 @@ export default function ThemeManager() { )} + - + diff --git a/src/i18n/locales/en/core.json b/src/i18n/locales/en/core.json index 82dfda9..954b754 100644 --- a/src/i18n/locales/en/core.json +++ b/src/i18n/locales/en/core.json @@ -1,11 +1,12 @@ { "action": { - "add": "add", - "add_custom_framework": "add custom framework", - "add_reaction": "add reaction", "accept": "accept", "access": "access", "access_app": "access app", + "add": "add", + "add_custom_framework": "add custom framework", + "add_reaction": "add reaction", + "add_theme": "add theme", "backup_account": "backup account", "backup_wallet": "backup wallet", "cancel": "cancel", @@ -33,11 +34,14 @@ "download": "download", "download_file": "download file", "edit": "edit", + "edit_theme": "edit theme", + "enable_dev_mode": "enable dev mode", "enter_name": "enter a name", "export": "export", "get_qort": "get QORT at Q-Trade", "hide": "hide", "import": "import", + "import_theme": "import theme", "invite": "invite", "join": "join", "leave_comment": "leave comment", @@ -47,6 +51,7 @@ "new": { "chat": "new chat", "post": "new post", + "theme": "new theme", "thread": "new thread" }, "notify": "notify", @@ -115,6 +120,7 @@ }, "current_language": "current language: {{ language }}", "dev": "dev", + "dev_mode": "dev Mode", "domain": "domain", "ui": { "version": "UI version" @@ -134,6 +140,7 @@ "for": "for", "general": "general", "general_settings": "general settings", + "home": "home", "identifier": "identifier", "image_embed": "image embed", "last_height": "last height", @@ -164,6 +171,7 @@ "invalid_poll_embed_link_name": "invalid poll embed link. Missing name.", "invalid_image_embed_link_name": "invalid image embed link. Missing param.", "invalid_signature": "invalid signature", + "invalid_theme_format": "invalid theme format", "invalid_zip": "invalid zip", "message_loading": "error loading message.", "message_size": "your message size is of {{ size }} bytes out of a maximum of {{ maximum }}", @@ -326,7 +334,9 @@ "tags": "tags", "theme": { "dark": "dark mode", - "light": "light mode" + "light": "light mode", + "manager": "theme Manager", + "name": "theme name" }, "thread": "thread", "thread_other": "threads", diff --git a/src/i18n/locales/en/group.json b/src/i18n/locales/en/group.json index c58e88c..e96466a 100644 --- a/src/i18n/locales/en/group.json +++ b/src/i18n/locales/en/group.json @@ -6,7 +6,6 @@ "copy_private_key": "copy private key", "create_group": "create group", "disable_push_notifications": "disable all push notifications", - "enable_dev_mode": "enable dev mode", "export_password": "export password", "export_private_key": "export private key", "find_group": "find group", @@ -33,8 +32,8 @@ "approval_threshold": "group Approval Threshold (number / percentage of Admins that must approve a transaction)", "ban_list": "ban list", "block_delay": { - "minimum": "minimum Block delay for Group Transaction Approvals", - "maximum": "maximum Block delay for Group Transaction Approvals" + "minimum": "Minimum Block delay", + "maximum": "Maximum Block delay" }, "group": { "avatar": "group avatar", @@ -68,6 +67,8 @@ "avatar_registered_name": "a registered name is required to set an avatar", "admin_only": "only groups where you are an admin will be shown", "already_in_group": "you are already in this group!", + "block_delay_minimum": "minimum Block delay for Group Transaction Approvals", + "block_delay_maximum": "maximum Block delay for Group Transaction Approvals", "closed_group": "this is a closed/private group, so you will need to wait until an admin accepts your request", "descrypt_wallet": "decrypting wallet...", "encryption_key": "the group's first common encryption key is in the process of creation. Please wait a few minutes for it to be retrieved by the network. Checking every 2 minutes...", From 4240cec2e1c29e590b3f035ce9ee93586c672b3e Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Wed, 21 May 2025 20:44:41 +0200 Subject: [PATCH 04/42] Add label translations --- src/components/Apps/AppsCategoryDesktop.tsx | 4 +++- src/components/Chat/ChatOptions.tsx | 4 +++- src/components/Group/AddGroup.tsx | 6 ++++-- src/components/Group/AddGroupList.tsx | 10 ++++++++-- .../Group/ListOfGroupPromotions.tsx | 4 +++- src/components/Group/ManageMembers.tsx | 20 ++++++++++++++----- src/components/Theme/ThemeManager.tsx | 15 ++++++++++++-- src/components/Theme/ThemeSelector.tsx | 5 ++--- src/i18n/locales/en/core.json | 15 +++++++++++--- src/i18n/locales/en/group.json | 3 ++- 10 files changed, 65 insertions(+), 21 deletions(-) diff --git a/src/components/Apps/AppsCategoryDesktop.tsx b/src/components/Apps/AppsCategoryDesktop.tsx index bd52a53..4c4a541 100644 --- a/src/components/Apps/AppsCategoryDesktop.tsx +++ b/src/components/Apps/AppsCategoryDesktop.tsx @@ -145,7 +145,9 @@ export const AppsCategoryDesktop = ({ postProcess: 'capitalizeFirstChar', })} inputProps={{ - 'aria-label': 'Search for apps', + 'aria-label': t('core:action.search_apps', { + postProcess: 'capitalizeFirstChar', + }), fontSize: '16px', fontWeight: 400, }} diff --git a/src/components/Chat/ChatOptions.tsx b/src/components/Chat/ChatOptions.tsx index a79a4a2..f4dfb9c 100644 --- a/src/components/Chat/ChatOptions.tsx +++ b/src/components/Chat/ChatOptions.tsx @@ -426,7 +426,9 @@ export const ChatOptions = ({ postProcess: 'capitalizeFirstChar', })} inputProps={{ - 'aria-label': 'Search for apps', + 'aria-label': t('core:action.search_apps', { + postProcess: 'capitalizeFirstChar', + }), fontSize: '16px', fontWeight: 400, }} diff --git a/src/components/Group/AddGroup.tsx b/src/components/Group/AddGroup.tsx index 2028dea..1916aaa 100644 --- a/src/components/Group/AddGroup.tsx +++ b/src/components/Group/AddGroup.tsx @@ -433,7 +433,7 @@ export const AddGroup = ({ address, open, setOpen }) => { }} > @@ -442,7 +442,9 @@ export const AddGroup = ({ address, open, setOpen }) => { labelId="demo-simple-select-label" id="demo-simple-select" value={approvalThreshold} - label="Group Approval Threshold" + label={t('group:group.approval_threshold', { + postProcess: 'capitalizeFirstChar', + })} onChange={handleChangeApprovalThreshold} > diff --git a/src/components/Group/AddGroupList.tsx b/src/components/Group/AddGroupList.tsx index 64c4b3b..eaa7f4d 100644 --- a/src/components/Group/AddGroupList.tsx +++ b/src/components/Group/AddGroupList.tsx @@ -312,9 +312,15 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => { flexGrow: 1, }} > -

Groups list

+

+ {t('core:list.groups', { + postProcess: 'capitalizeFirstChar', + })} +

{ setCurrentTab(newValue)} sx={{ mt: 2, mb: 2 }} > - - + +
@@ -412,6 +422,7 @@ export default function ThemeManager() { +